{"repo":"Shaisolaris/node-multitenant-api","free":true,"listed":false,"github":"https://github.com/Shaisolaris/node-multitenant-api","clone":"git clone https://github.com/Shaisolaris/node-multitenant-api.git","description":"Production-ready multi-tenant REST API — Node.js, TypeScript, Express, Prisma, JWT auth with refresh rotation, RBAC, API key management","language":"TypeScript","stars":30,"topics":["express","jwt","multi-tenant","nodejs","prisma","rbac","rest-api","typescript"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Multi-Tenant REST API Production-ready multi-tenant API built with Node.js , TypeScript , Express , and Prisma . Full tenant isolation, JWT authentication with refresh token rotation, role-based access control, and API key management — structured for real SaaS workloads. Architecture Stack - Runtime : Node.js 20 + TypeScript (strict mode) - Framework : Express 4 - ORM : Prisma with PostgreSQL - Auth : JWT (access + refresh token rotation), bcrypt password hashing - Validation : Zod on all request bodies and query params - Security : Helmet, CORS, express-rate-limit (global + per-route) Features - Multi-tenancy : Every resource is scoped to a tenant via tenantId . Cross-tenant data leakage is structurally impossible. - JWT rotation : Access tokens (15m), refresh tokens (7d) stored hashed in DB, rotated on every refresh. - RBAC : Four roles — OWNER , ADMIN , MEMBER , VIEWER — enforced at route level. - API keys : SHA-256 hashed, prefix-indexed, permission-scoped, optional expiry. Raw key returned once only. - Pagination : All list endpoints support page + limit with total/totalPages metadata. - Soft deletes : Projects use status-based soft delete to preserve audit trail. - Graceful shutdown : SIGTERM/SIGINT handlers flush DB connections cleanly. API Endpoints Auth Method Path Description -------- ------ ------------- POST /api/v1/auth/register Register tenant + owner account POST /api/v1/auth/login Login (returns access + refresh tokens) POST /api/v1/auth/refresh Rotate refresh","default_branch":null,"files":null,"tree":[],"storefront":"/r/Shaisolaris","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Shaisolaris/node-multitenant-api/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}