Files
backend/.cursor/rules/meshkee-project.mdc
T
Ali Reza bb59d5e9ba Initial commit: Meshkee CMS API
NestJS backend with Prisma, Docker Compose for Postgres/Redis, and deploy docs for the production VM.
2026-07-21 17:52:36 +03:30

36 lines
1.2 KiB
Plaintext

---
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