Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

179 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Forge

Forge by RodiumAI β€” landing

Tests Next.js React FastAPI Python Node.js Docker License: MIT

πŸ‡«πŸ‡· Version franΓ§aise

Forge is an open-source, AI-powered website builder. Describe your site in a chat and the agent generates a frontend-only React app, previewed instantly in the browser β€” no node_modules, no Vite β€” and published as a static ESM site.

Architecture

forge-web/
β”œβ”€β”€ apps/
β”‚ β”œβ”€β”€ web/ # Next.js 15 + TypeScript β€” builder UI
β”‚ └── api/ # FastAPI + SQLAlchemy + Postgres β€” API, agent, orchestration
β”‚ └── runtime/ # In-browser Babel runner (pure JS) + packages.json manifest
β”œβ”€β”€ data/
β”‚ └── templates/ # 24 starter templates (see docs/TEMPLATES.md)
└── infra/ # Docker local + CI helpers

Supporting services: MinIO (S3 uploads), Valkey (run queue / cancellation), Caddy (published sites at *.lvh.me:8080), Adminer (DB console). LLM calls go through the RodiumAI gateway (API key supplied by the user in settings).

Key features

  • Chat-to-site: describe a site, the agent generates a frontend-only React app.
  • Instant preview: in-browser Babel/ESM runner β€” transforms code in the browser with a CDN import map (esm.sh). No node_modules, no Vite.
  • Publishing: static ESM site served by Caddy.
  • Visual editing: text and images, directly on the preview.
  • History / rollback: per-project git snapshots.
  • ZIP export: a real, runnable Vite project.
  • 24 templates: see docs/TEMPLATES.md.
  • Runtime manifest: packages.json is the single source of truth for the import map, the AST allowlist, and Monaco types.
  • Asset vs reference attachments: logos land in public/; screenshots guide layout (and multi-page plans). Paste a site URL to auto-capture desktop/mobile references (Playwright).

Forge builder β€” chat and live preview

Prerequisites

Tool Version Needed for
Docker + Compose v2 any current release the quick start below
Node.js 22 (.nvmrc) running apps/web on the host
Python 3.12 (.python-version) running apps/api on the host

CI runs on exactly these versions. Older runtimes may build locally and still fail CI β€” ruff targets py312 and several dependencies are version-sensitive.

Sign-in works out of the box. Forge has its own accounts β€” email/password, plus optional Google. Nothing in this repository depends on a service you cannot run. "Continue with RodiumAI" is an extra that appears only when you configure the OIDC client; with RODIUM_OIDC_CLIENT_ID empty (the default) the button is simply hidden.

Quick start (Docker)

cp .env.example .env
make up # docker compose up -d --build, then applies the schema

Without make, run the two steps yourself β€” a fresh volume has no tables until the second one:

cp .env.example .env
docker compose up -d --build
docker compose exec -T api python -c "from app.db import init_db; init_db()"
Service URL
Builder UI http://localhost:3100
API docs http://localhost:8100/docs
Published sites http://<slug>.lvh.me:8080
MinIO console http://localhost:9001
Adminer http://localhost:8089
Mail (Mailpit) http://localhost:8026

First run: account and generation key

1. Create an account. Open http://localhost:3100/register and sign up. You are signed in immediately.

2. Confirm your email. The stack ships a Mailpit container, so mail is real β€” it just never leaves your machine. Open http://localhost:8026 and the confirmation message is waiting, link included. Password reset works the same way.

Running the API on the host instead of in Docker? mailpit does not resolve there, so set MAIL_TRANSPORT=console and the links are printed in the API log. Set MAIL_TRANSPORT=ses (plus the AWS_* credentials) for real delivery.

3. Add a generation key. Forge does not ship a model β€” you bring the credentials for one. Create a free account on rodiumai.io, copy an API key (rd_sk_prod_...), and paste it in Forge under Settings β†’ Generation. The Test button next to the field confirms it before you rely on it.

RODIUM_BASE_URL must match where that key is valid. The shipped default, https://api.rodiumai.io/v1, is right for a key from rodiumai.io; change it only if you run your own gateway.

Google sign-in is optional: fill in the FIREBASE_* (API) and NEXT_PUBLIC_FIREBASE_* (web build) values to enable the Google button on /login and /register. Leave them empty and the button is not rendered. Reuse the same Firebase web app as the RodiumAI user dashboard; enable Google only in the Firebase console and add forge.rodiumai.io under Authorized domains. GitHub is not offered in the Forge UI.

Hybrid development (Docker infra + local api/web)

Run infra with Docker, then run the API and/or web app locally.

API

cd apps/api
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements-dev.txt # runtime deps + ruff + pytest
cp .env.example .env
uvicorn app.main:app --reload --port 8100

Web

cd apps/web
npm install
npm run dev # port 3100

Tests and checks

These are exactly what CI runs, so a green local run means a green pipeline.

# apps/web
npm run lint && npm run typecheck && npm test
FORGE_FONT_MODE=fallback npm run build
# apps/api (TEMPLATES_ROOT must point at data/templates)
ruff check app tests && ruff format --check app tests
pytest -q
# apps/api/runtime
npm ci && npm test

Environment variables

Copy .env.example to .env and adjust as needed β€” it documents every essential variable (database, MinIO, Valkey, RodiumAI gateway, etc.). apps/api and apps/web each carry their own .env.example for host-run development.

Contributing

Contributions are welcome. CONTRIBUTING.md covers the dev setup, the checks to run before pushing, the PR process, and how to submit a template kit. Please also read the Code of Conduct.

By contributing, you agree that your contributions are licensed under the MIT License that covers this project.

Documentation

About

Create a prototype in 5 minutes with one prompt

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

46 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /