Define
Choose a preset, then describe users, entities, fields, roles, states, prompts, and triggers in the project model.
src/course/student-project.jsonStandard course package
The platform gives every student the same secure, deployable technical foundation while leaving the product model, workflow, branding, and founder story open to change.
Student implementation path
Lovable owns the design draft. The project model owns business structure. The platform client owns browser-to-server calls. Protected server routes own data, AI, and side effects.
Choose a preset, then describe users, entities, fields, roles, states, prompts, and triggers in the project model.
src/course/student-project.jsonBuild the approved user journey in Lovable. Keep stable feature IDs on actions that will need real behaviour.
npm run lovable:briefSynchronise the design and use Cursor to replace prototype handlers with the standard platform client.
npm run lovable:syncRun the shared checks, push to GitHub, and let the isolated Cloud Run workflow publish and health-check the project.
npm run setup:checkCursor implementation contract
Import platform from src/lib/platform/client.ts. The method signatures expose the common operations while keeping credentials and privileged checks on the server.
platform.records.create() / .list()platform.workflows.transition()platform.automation.evaluate()platform.ai.run()platform.project.syncStatus()Framework function registry
5 included functions
Standard ways to identify users, maintain sessions, and enforce who can see or change data.
Choose the smallest useful role set and decide which pages or actions each role needs. Keep the shared callback and session plumbing unchanged.
student-project.json → roles + authSupabase one-time sign-in links with a safe server callback.
SignInFormSetup registers one course identity, configures Supabase, and uses the shared callback flow.
/auth/callbackCookie-backed sessions are refreshed in middleware for pages and API routes.
src/lib/supabase/middleware.tsProject roles control workflow transitions and server operations.
student-project.json → rolesDatabase policies isolate owner records while allowing approved teacher oversight.
supabase/migrationsLive project definition
Students define business nouns and rules in one validated file. Shared forms, APIs, workflows, and agent guidance read the same configuration.
provider_profileA vetted student helper profile using demo-safe labels.
facilityA demo-safe facility record for filtering bookings without storing resident details.
listingA support session that a verified student can offer.
bookingA coordinator request for a supervised session.
reviewA coordinator feedback record after completion.
Relationships
booking.listing_title → listing · many-to-onebooking.facility_alias → facility · many-to-onereview.booking_reference → booking · many-to-oneAccess configuration
GitHub is the single root identity. Password and magic-link access remain separate recovery paths and never receive the GitHub password.
Configured triggers
Rules use the same condition evaluator demonstrated by LoomGuard and produce standard action plans.
workflow.transitioned → 2 actionsworkflow.transitioned → 2 actionsIntegration requirements
Each external service stays disabled until its student-owned provider, credentials, and server adapter are ready.
oauthConfigured automatically in Supabase from the course-owned GitHub OAuth application.Standard controllers
These stable controllers sit between generated views and project data. Students can add business-specific routes without rebuilding authentication, validation, or health handling.
| Method | Path | Purpose | Access |
|---|---|---|---|
| GET | /api/health | Deployment and emergency-switch health | Public |
| GET | /api/framework | Sanitized model and function catalogue | Public |
| GET | /api/records | List owned records by entity | Signed in |
| POST | /api/records | Validate and create a model record | Signed in |
| POST | /api/records/:id/transition | Apply an allowed workflow transition | Signed in |
| POST | /api/automation/evaluate | Evaluate configured triggers without external side effects | Signed in |
| POST | /api/ai | Run an enabled, budgeted AI prompt | Signed in |
| POST | /api/project-status | Publish status for teacher oversight | Signed in |
| GET | /auth/callback | Complete magic-link or OAuth sign-in | Provider callback |
Machine-readable catalogueThe same sanitized model and function registry is available at /api/framework for dashboards, setup checks, and coding agents.
Clear ownership boundary
The course is designed so students can focus on the business requirement without becoming responsible for every infrastructure concern.
Student-owned work
Standard package
Current project controls
These controls are read from the same project definition and remain visible when students replace the product interface.
Course demo uses aliases only. Real deployment would need guardian permission, facility approval, background-check policy, and explicit data retention rules.
Enabled project prompt budget: 0.00 USD.