gram/packages/playground
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-14 19:54:26 +02:00
..
src refactor(parser): make parser universal and clean up playground build 2026-06-13 23:42:24 +02:00
build.js refactor(parser): make parser universal and clean up playground build 2026-06-13 23:42:24 +02:00
CHANGELOG.md feat: release v.0.10.1 - implement Turborepo & updated dependencies 2026-06-14 19:54:26 +02:00
favicon.png refactor: Moved source code to new packages folder 2026-01-02 20:16:03 +01:00
index.html refactor: extract analyzer logic into its own package and remove legacy ingredient data files 2026-06-07 13:31:15 +02:00
package.json feat: release v.0.10.1 - implement Turborepo & updated dependencies 2026-06-14 19:54:26 +02:00
README.md docs: Fixed mandatory usage of bun instead of npm 2026-06-14 10:58:02 +02:00

@gram/playground

The official browser-based playground for the GRAM Language. It allows you to write, edit, and physically analyze recipes in real-time.


📚 General Documentation

For full syntax specifications, grammar details, cheatsheets, and best practices, please refer to the central GRAM Documentation Index.


⚡ Features

  • Real-time Rendering: Instantly compiles your recipe into JSON, Markdown, and a gorgeous interactive Preview card.
  • Physical Analysis: Simulates Net vs Gross weights and nutritional macronutrient curves dynamically by loading a CIQUAL/USDA derived database.
  • Gantt Scheduler: Displays active and total durations dynamically.
  • Pre-built Example Library: Access various recipes to quickly learn the grammar.
  • Deduplicated Tree Explorer: Browse the nested JSON output interactively.

🛠️ Local Development & Running

To run the playground locally from the repository root:

  1. Install Monorepo Dependencies:
    bun install
    
  2. Build the Parser, Compiler, Analyzer, and Renderer:
    bun run build
    
  3. Start the Playground Dev Server:
    bun run dev
    
    Open http://localhost:3000 in your web browser.

🏗️ Bundle Process

  • The playground uses esbuild (build.js) to bundle all sources (shims, styles, external dependencies) into the dist/ directory.
  • The large ingredient database is compiled into a lazy-loaded chunk (chunks/db_bundle.js) to ensure fast page loads.