CoreMVP

Projects

View as Markdown

Projects is the included, persisted application domain you can build on after signing in.

Every Project belongs to one Organization; your private Personal Organization owns the Projects you make by default. The server checks your membership on every request.

Give your agent this prompt
Add <field or behavior> to Projects while preserving Organization authorization and data scope.
Follow https://coremvp.com/en/docs/projects.md; ask me before removing tables or data.
Finish when ./coremvp e2e projects passes and a focused UI or API check proves the requested change persists or behaves as intended.
Report the changes, the test result, and anything you could not run.

Create and manage a Project

Start the app as in the Quickstart, then sign in with a non-anonymous account. On a clean installation, bunx supabase start applies the normal migrations, including Organizations and Projects. If an older custom public.projects table already exists, the migration stops rather than adopting or deleting it; resolve that collision before continuing.

  1. In the dashboard, select Personal or a shared Organization, then open Projects from the sidebar.
  2. Choose New project, enter a Project name, and select Create Project. The new Project opens at /dashboard/projects/[projectId].
  3. Change Project name and select Save name, or select Archive Project. Open the Archived filter and select Restore Project to make it active again. An archived Project cannot be renamed until it is restored.

The Project ID, not its display name, identifies the row. Two Projects can have the same name. Archive is reversible; there is no hard-delete action.

Who can access a Project?

Organization roleProject access
OwnerView, create, rename, archive, restore
AdminView, create, rename, archive, restore
MemberView only
NonmemberNo access

The owner sets admin or member on the Organization members screen. Those roles apply to every Project in that Organization; there is no viewer role or per-Project grant. A Personal Organization cannot invite another member. For shared access, use the Organization invitation and role flow—not a Project invite.

The service verifies the Supabase Auth user and reloads the Organization role; the repository scopes the write to both organization_id and the Project ID. A selected Organization in the browser is presentation state, not permission. The public demo shows fixed sample Projects and does not save them.

Follow a Project change

The live screen in connects the shared UI in to the hooks in . The hooks call /api/projects on the same origin; the native adapter passes the request to Hono. Follow the existing caller into the layer that owns your change:

ChangeEdit
Stored Project fields (ID, Organization, name, timestamps, archive time) and
Persisted reads or writes
Product rules, permissions or lifecycle and
HTTP input or response
Browser requests and caching
Screen presentation

The Project routes are the only framework-specific files:

PageNext.jsTanStack Start
Project list
One Project

For a new page or URL, add a route beside these and reuse the existing components and hooks; Add a dashboard page shows the steps. Keep authorization in the service: a visible button or browser-supplied identity does not grant access.

To add a Project field, follow the worked description example in order. Do not recreate public.projects.

  1. Change Database Schema
  2. Query Application Data
  3. Add Business Logic
  4. Create API Endpoint
  5. Fetch and Update Data

Verify the local path

With local Supabase and the app running, run this from the application repository root:

./coremvp e2e projects

The clip shows the owner's browser from one passing local run, at 2.5× speed.

The command should exit successfully. The Projects suite checks the browser and API lifecycle, cross-account denial, direct Data API denial, the sample-only demo and the custom-table migration collision. For an extension, also check through the UI or API that the requested behavior works and any new value persists after reload. Run ./coremvp e2e organizations when you change shared membership or role behavior.

Keep, hide, or remove the included domain

Keep the automatically created Personal Organization and do not create another one; its Projects remain private to its owner. You do not need a shared workspace to use the ownership model.

Hide Projects. Remove the sidebar entry and routes and leave the schema in place. Auth and the private ownership boundary keep working.

Remove Projects. There is no runtime feature flag that uninstalls the Organizations and Projects domains. The migration, signup trigger, dashboard and demo compositions, API, services, repositories, models and tests share one contract.

Remove the consumers together

In a new project, before applying in , remove every consumer of the domain. Use TypeScript, a clean local database reset and the Auth checks to confirm nothing still depends on it.

Clean up an installation that already has the tables

Do not delete an already-applied migration; it does not remove deployed tables or data. Export anything you need, then create a new forward migration for the exact destructive cleanup your product requires.

Was this page helpful?

On this page