- Backend: Email producer (LavinMQ), EmailService interface - Backend: CRUD API for email_templates and email_settings - Backend: avatar_url field in users table + UpdateMyProfile support - Backend: StorageService for pre-signed URLs - NestJS: Email consumer with Nodemailer and Handlebars - Frontend: Email Templates admin pages (list/edit) - Frontend: Updated profileApi.uploadAvatar with pre-signed URL flow - Frontend: New /post-job public page (company registration + job creation wizard) - Migrations: 027_create_email_system.sql, 028_add_avatar_url_to_users.sql
55 lines
1.1 KiB
Markdown
55 lines
1.1 KiB
Markdown
# 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**:
|
|
|
|
1. **Bearer Token** - `Authorization: Bearer <token>`
|
|
2. **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
|
|
|
|
```bash
|
|
npm install
|
|
npm run start:dev
|
|
```
|
|
|
|
## Environment Variables
|
|
|
|
```env
|
|
PORT=3001
|
|
STRIPE_SECRET_KEY=sk_test_xxx
|
|
STRIPE_WEBHOOK_SECRET=whsec_xxx
|
|
```
|
|
|
|
## API Documentation
|
|
|
|
Visit: `http://localhost:3001/api/docs`
|
|
|
|
## Docker
|
|
|
|
```bash
|
|
docker build -t gohorse-backoffice .
|
|
docker run -p 3001:3001 gohorse-backoffice
|
|
```
|