gohorsejobs/backoffice
2025-12-26 10:30:10 -03:00
..
src Add Stripe controller routes and full Plans CRUD in backoffice 2025-12-26 10:30:10 -03:00
test fix(auth): correct seeder pepper and add backoffice e2e tests 2025-12-24 13:53:30 -03:00
.dockerignore feat(backoffice): migrate to Fastify adapter with pnpm, Pino logging, and ultra-optimized Dockerfile 2025-12-23 23:44:02 -03:00
.env.example feat(auth): add cookie parsing and JWT auth guard to backoffice 2025-12-24 10:27:04 -03:00
.gitignore feat(backoffice): 🏗️ initialized NestJS backoffice API 2025-12-15 09:44:16 -03:00
.prettierrc feat(backoffice): 🏗️ initialized NestJS backoffice API 2025-12-15 09:44:16 -03:00
Dockerfile chore(backoffice): allow build with outdated lockfile to unblock deploy 2025-12-24 18:33:01 -03:00
eslint.config.mjs feat(backoffice): 🏗️ initialized NestJS backoffice API 2025-12-15 09:44:16 -03:00
nest-cli.json feat(backoffice): 🏗️ initialized NestJS backoffice API 2025-12-15 09:44:16 -03:00
package.json fix(backoffice): upgrade @fastify/cookie to v11 for Fastify 5 compatibility 2025-12-25 22:44:49 -03:00
pnpm-lock.yaml chore: update pnpm-lock.yaml 2025-12-24 18:28:23 -03:00
README.md docs: comprehensive documentation update 2025-12-24 11:12:52 -03:00
tsconfig.build.json feat(backoffice): 🏗️ initialized NestJS backoffice API 2025-12-15 09:44:16 -03:00
tsconfig.json feat(backoffice): migrate to Fastify adapter with pnpm, Pino logging, and ultra-optimized Dockerfile 2025-12-23 23:44:02 -03:00

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

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