8000 GitHub - project-minigraf/minigraf-playground · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

191 Commits

Folders and files

Repository files navigation

Minigraf Playground

An interactive, browser-based tutorial for Minigraf — a tiny embedded graph database with Datalog querying and bi-temporal time travel.

Open the Playground →

What's inside

Five tutorials cover basic queries, recursion, negation, and queries about past data:

  • Basic Datalog — facts, rules, and simple graph queries
  • Marketplace — multi-hop paths and recursive reachability
  • Org Chart — hierarchies, recursive ancestry, and negation
  • Sports League — bi-temporal contracts, transfer chains, and aggregates
  • City Transit — timetable queries, reachability under constraints, and negation

In Sandbox, write facts and rules in a graph saved in your browser. You can ask the tutor for help.

The AI tutor can answer questions about each tutorial and explain your results. Use your own API key or the free Groq option.

Visualize ↗ next to Share opens the facts in your editor in the Minigraf time travel visualizer. It replays your transact, retract and rule forms and shows how the graph changes over transaction time and valid time. The Sports League tutorial is a good one to try. The link puts the code after #, in the URL fragment. Browsers do not send fragments in HTTP requests.

Tutor models

Choose a provider and model in Settings. The free option uses Groq. For other providers, add your own API key; model availability and charges depend on your account. If an upgrade removes a saved model, the Playground picks the default for the same provider.

Current catalogs: OpenAI, Anthropic, Google, xAI, and Groq.

Privacy

The Playground saves your graph, tutor history, and API keys in your browser's IndexedDB. Tutor requests can include earlier messages, queries, and lesson context. Requests that use an OpenAI, Google, or xAI key go directly to that provider. Requests to Anthropic go through the Playground server with your Anthropic key. The free Groq option also uses the Playground server but does not need a personal key. If you save a Groq key, the tutor currently sends it to the Playground server in a request header. See the Terms for details.

Live tutor documentation

When a question matches a documentation topic, the tutor can consult the live MiniGraf docs site for the version used by this Playground. It looks up matching pages in the browser and includes short excerpts and links in the request to your selected tutor provider. The docs site receives requests for public pages, not your question, query data, or API key. If the site is unavailable or there is no match, the tutor answers without those excerpts.

Releases

Packages

Contributors

Languages

0