- DATABASE.md: Complete schema with ER diagram, all tables, migrations history - ROADMAP.md: Project status, completed/in-progress/backlog items - TASKS.md: Detailed task list to avoid rework - README.md: Added documentation links table - backoffice/README.md: Added auth section (JWT Bearer + Cookie) Schema notes: - Core tables use SERIAL (INT): users, companies, jobs - Newer tables use UUID v4: notifications, tickets, payments - Schema is unified (removed core_* redundant tables) |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .prettierrc | ||
| Dockerfile | ||
| eslint.config.mjs | ||
| nest-cli.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
Backoffice API - NestJS
GoHorse Jobs SaaS Administration and Subscription Management API.
Features
- 💳 Stripe Integration - Payment processing and subscriptions
- 📊 Dashboard Stats - Platform analytics
- 👥 User Management - Admin controls for users
- 🏢 Company Management - Tenant administration
- 📋 Subscription Plans - Monthly/yearly plans
- 🔐 JWT Authentication - Bearer token and Cookie support
Authentication
The backoffice supports two authentication methods:
- Bearer Token -
Authorization: Bearer <token> - JWT Cookie -
jwt=<token>(fallback)
This is implemented in src/auth/jwt-auth.guard.ts.
Tech Stack
- NestJS 10+
- TypeScript
- Stripe SDK
- Swagger (OpenAPI)
- JWT (jsonwebtoken)
Getting Started
npm install
npm run start:dev
Environment Variables
PORT=3001
STRIPE_SECRET_KEY=sk_test_xxx
STRIPE_WEBHOOK_SECRET=whsec_xxx
API Documentation
Visit: http://localhost:3001/api/docs
Docker
docker build -t gohorse-backoffice .
docker run -p 3001:3001 gohorse-backoffice