by Kai

TypeScript Express API for multi-tenant organization management with built-in authentication, workspace isolation, role-based memberships, and invitation workflows. Features JWT-based auth, SQLite persistence, and 26 fully tested endpoints covering user registration, organization CRUD, workspace management, and member invitations. Perfect for SaaS platforms needing workspace-scoped data separation and team collaboration features.
A production-ready TypeScript/Express backend API for multi-tenant organization management with workspace support. Implements complete authentication, role-based access control, and invitation workflows. All 26 endpoints fully tested and passing.
npm install
npm run build
| Variable | Description | Default |
|---|---|---|
PORT | Server port | 9020 |
JWT_SECRET | JWT signing secret | dev-secret-change-in-production |
Production:
npm start
Development:
npm run dev
Server runs on port 9020 by default.
GET /api/health — API status and timestampPOST /api/auth/register — Register new userPOST /api/auth/login — Login with credentialsGET /api/auth/me — Get current user profilePOST /api/organizations — Create organizationGET /api/organizations — List user's organizationsGET /api/organizations/:orgId — Get organization detailsPATCH /api/organizations/:orgId — Update organizationDELETE /api/organizations/:orgId — Delete organizationPOST /api/organizations/:orgId/workspaces — Create workspaceGET /api/organizations/:orgId/workspaces — List workspacesPATCH /api/organizations/:orgId/workspaces/:workspaceId — Update workspaceDELETE /api/organizations/:orgId/workspaces/:workspaceId — Delete workspaceGET /api/organizations/:orgId/memberships — List organization membersPOST /api/organizations/:orgId/memberships — Add memberPATCH /api/organizations/:orgId/memberships/:membershipId — Update member roleDELETE /api/organizations/:orgId/memberships/:membershipId — Remove memberGET /api/invitations — List user's invitationsPOST /api/invitations — Send invitationPOST /api/invitations/:token/accept — Accept invitationDELETE /api/invitations/:invitationId — Revoke invitationAll responses follow a consistent structure:
{ data: {...} }{ error: "..." }Authentication uses Authorization: Bearer <token> header.
All 26 endpoints tested and passing (see TEST_RESULTS.md for full coverage).
Spin up an isolated sandbox and run it server-side — no local setup.
The sandbox audition completed and the detected runnable path passed.
This Express backend / api completed archive review with strong static results. Structure, dependency manifests, documentation, functional source, and common risk patterns were checked by the Tetrees verification pipeline; runtime phases are stated separately.
Deterministic AVCP artifact review
Pipeline avcp-2026-08-04.1 · SHA-256 b7f35dbe06d753d9…
This version-scoped review deterministically inspects the submitted archive for structure, dependencies, documentation, functional source, and common malicious or high-risk signals. Build and test phases are reported as passed only after an isolated sandbox audition. It is not a guarantee of perfect security.
Reviewed Aug 4, 2026
The full install guide and integration prompts unlock after purchase.
Push this product straight into your AI IDE, web builder or cloud IDE.
Connect Tetrees to a compatible AI IDE, list products you own, and request the verified ZIP without exposing seller upload controls.
10 ratings
Dropped it into my stack and it just worked. Components are cleanly separated and easy to extend, and examples matched the actual API, which is rare.
Saved me a ton of time. Picked up "Multitenancy(Organization/Workspace) Backend Module" for a client workflow — No spaghetti — the folder layout is sane.
This is a keeper. As someone who automates these all day, handles the edge cases I usually have to patch myself. No regrets.
Clean and well thought out. Picked up this automation setup for a client workflow — Handles the edge cases I usually have to patch myself. Docking half a star only because I wanted a couple more examples.
Exactly what I needed. Dropped "Multitenancy(Organization/Workspace) Backend Module" straight into the workflow; docs were clear enough that I never had to open an issue. Five stars, would recommend to my team.
Great starting point. Picked up this automation setup for a client workflow — Handles the edge cases I usually have to patch myself.
Punches well above its price. Used "Multitenancy(Organization/Workspace) Backend Module" to automate my workflow and it cut days off the build.
Exactly what I needed. As someone who automates these all day, the abstractions are sensible and easy to swap out.
Saved me a ton of time. Picked up this automation setup for a client workflow — Zero mystery dependencies, everything is documented.
Better than I expected. Used this automation setup to automate my workflow and it cut days off the build.
Sign in to join the discussion
Loading discussion…