A proof-of-concept implementation of the Lovable.dev AI-native application platform architecture. See docs/ for full system design documentation.
| Component | Path | Description |
|---|---|---|
| Scaffold | apps/scaffold |
Frozen Tier 1–3 blocks, Plant Pal reference app |
| Platform UI | apps/platform |
Simplified chat + preview builder |
| Block registry | packages/block-registry |
Manifest schema, activation recipes |
| Agent core | packages/agent-core |
Classifier, planner, build gate |
| Shared | packages/shared |
Types, env validation |
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run scaffold dev server (Plant Pal app)
pnpm --filter @app/scaffold dev
# Run platform builder UI (separate terminal)
pnpm --filter @app/platform devOpen http://localhost:5173 for the Plant Pal app.
Open http://localhost:3001 for the platform landing page, or go directly to http://localhost:3001/builder for the builder UI (Google sign-in required unless BUILDER_AUTH_DISABLED=1).
The builder at /builder requires Google sign-in. Set these env vars when running the platform (see .env.sample):
BETTER_AUTH_SECRET=... # openssl rand -base64 32
BETTER_AUTH_URL=http://localhost:3001
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...Create OAuth credentials in Google Cloud Console with redirect URI http://localhost:3001/api/auth/callback/google.
To skip auth during local development: BUILDER_AUTH_DISABLED=1 pnpm --filter @app/platform dev
cd apps/scaffold
# Start local Supabase stack
supabase start
# Apply migrations + seed
supabase db reset
# Copy env vars from supabase status output
cp .env.sample apps/scaffold/.env
# Fill in VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEYBlocks start in stub mode. Activate deterministically:
pnpm blocks:activate auth
pnpm blocks:activate storage
pnpm blocks:activate ai
pnpm blocks:activate rbac
# Validate manifest
pnpm blocks:validate-manifest
# Deactivate
pnpm blocks:deactivate auth- Activate blocks:
auth,storage,ai - Sign up at
/signup - Upload a plant photo at
/analyze - View history at
/history
RLS ensures users only see their own plant_checks rows.
The platform UI (apps/platform) demonstrates the simplified agent loop:
- Block activation — deterministic recipes, no LLM
- Feature generation — template-based patches (LLM hook ready)
- Build gate —
pnpm buildvalidation - Plan mode — preview diffs before apply
Example prompts:
"Add login"→ block activation (auth)"Add a plants page that lists my plants"→ feature generation
- Connect GitHub repo to Vercel
- Set root directory to
apps/scaffold - Add env vars:
VITE_SUPABASE_URL,VITE_SUPABASE_ANON_KEY - Deploy —
vercel.jsonhandles SPA routing
- Create project at supabase.com
supabase link --project-ref <ref>supabase db pushsupabase functions deploy admin-metrics analyze-plant send-email
Free tier projects pause after ~1 week of inactivity. Restore from the Supabase dashboard.
pnpm export:scaffold
# Output: export/scaffold/ (standalone repo)pnpm test # Unit tests
pnpm --filter @app/scaffold test:e2e # Playwright E2EAgent boundaries are defined in LOVABLE.md. CI validates protected path diffs:
pnpm policy:check-protected-paths| Doc | Description |
|---|---|
| system-design.md | Platform architecture |
| reusable-blocks.md | Block catalog |
| generated-app-anatomy.md | Runtime anatomy |
| agent-loop.md | Agent orchestration |
| implementation-plan.md | This POC plan |
- Vercel Hobby + Supabase free tier
- Simplified agent (no MCP server, no Visual Edits)
- Tier 3 blocks (Stripe, multi-tenant) are stubs only
- Cold starts and manual Supabase restores are acceptable