mirror of
https://git.meshkee.com/Meshkee/backend.git
synced 2026-08-11 22:30:59 +04:30
Initial commit: Meshkee CMS API
NestJS backend with Prisma, Docker Compose for Postgres/Redis, and deploy docs for the production VM.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
---
|
||||
description: Meshkee CMS API project context and architecture essentials
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
# Meshkee CMS API
|
||||
|
||||
Read `docs/PROJECT_CONTEXT.md` for full reference before large changes.
|
||||
|
||||
## Stack
|
||||
|
||||
NestJS 11 + TypeScript + Prisma 6 + PostgreSQL 16 + Redis + S3 (Parmin).
|
||||
|
||||
API prefix: `/api/v1`. Package name: `meshkee-cms-api`.
|
||||
|
||||
## Architecture
|
||||
|
||||
- Multi-tenant: `Business` is the tenant root; routes are `businesses/:businessId/...`
|
||||
- **Content Category** (`categories`) ≠ **Business Category** (`business_categories`) — do not confuse them
|
||||
- **Location Cities** (`cities`) — system reference tree (country → province → city) for address forms; not business-scoped. Distinct from **Addresses** (`addresses`) which store user/business street addresses
|
||||
- Blogs/portfolios exist in DB + permissions but have no Prisma models or API modules yet
|
||||
|
||||
## Schema changes
|
||||
|
||||
1. Add SQL file in `database/migrations/`
|
||||
2. Apply via `./database/migrate.sh`
|
||||
3. Run `npm run prisma:pull` then `npm run prisma:generate`
|
||||
|
||||
Do **not** use Prisma Migrate. SQL migrations are authoritative.
|
||||
|
||||
## Scope discipline
|
||||
|
||||
- Minimize diff scope; match existing module patterns
|
||||
- Reuse existing services/guards instead of reimplementing
|
||||
- No commits unless explicitly requested
|
||||
Reference in New Issue
Block a user