No description
Both guards were fully implemented but never actually wired in -- Nest doesn't enforce a guard just because its module is imported, it needs an explicit APP_GUARD registration. Registered both globally so every new controller is deny-by-default and rate-limited unless it opts out. Added a @Public() decorator (checked via Reflector in TenantGuard) for routes that legitimately have no session, applied it to /health so the global guard doesn't break it. CORS was wide open (enableCors() with no origin restriction, effectively allow-any-origin). Now reads an explicit CORS_ORIGINS allowlist from env, defaulting to localhost:3000 for local dev. |
||
|---|---|---|
| drizzle | ||
| src | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| Dockerfile | ||
| drizzle.config.ts | ||
| nest-cli.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
ceo-api
NestJS API pentru CEO-OS. Se conecteaza la Supabase (Postgres/Auth) si Redis, deployat prin Coolify pe proiectul CEO-OS.
Dezvoltare
npm install
cp .env.example .env
npm run start:dev
GET /health returneaza statusul serviciului. GET /docs expune Swagger UI.
Stack
NestJS, Drizzle ORM (src/db), Supabase Admin SDK (src/supabase), BullMQ/Redis, class-validator/Zod, Helmet, rate limiting (Throttler), logging Pino.
Migratii
npm run db:generate
npm run db:migrate