mirror of
https://git.meshkee.com/Meshkee/backend.git
synced 2026-08-11 22:30:59 +04:30
Add invoice template CRUD, key points/accounts, public GET endpoint, and migration 039 for account_holder_name. Co-authored-by: Cursor <cursoragent@cursor.com>
39 lines
1.7 KiB
Plaintext
39 lines
1.7 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)
|
|
- **Website API docs:** when storefront APIs change, update `docs/website-api/` + `src/website-docs/static/` — see `.cursor/rules/website-api-docs.mdc`
|
|
- **Clients:** websites always use remote API; dashboards use local API in dev and remote after deploy — coordinate dashboard releases with backend — see `.cursor/rules/env-clients-deploy.mdc`
|