mirror of
https://git.meshkee.com/Meshkee/backend.git
synced 2026-08-11 22:30:59 +04:30
Serve public storefront docs at /docs/website, expose api.{domain} hosts for API SSL sync, and require push-then-pull deploys instead of rsync.
Co-authored-by: Cursor <cursoragent@cursor.com>
37 lines
1.4 KiB
Plaintext
37 lines
1.4 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
|
|
- **Production deploy:** push to git first, then pull/build on the API VM — see `.cursor/rules/git-deploy.mdc` (never rsync as the normal path)
|