This is the backend service for the Sisar App, built with NestJS. It provides RESTful APIs and background services for managing users, organizations, plans, schedules, and more.
- Modular architecture (users, auth, organization, plans, schedules, services)
- PostgreSQL database integration (via Prisma ORM)
- Redis caching
- Authentication and authorization
- Email notifications
- Background scheduling
- Comprehensive test coverage
src/
app.module.ts # Main NestJS module
main.ts # Application entry point
modules/ # Feature modules (auth, users, organization, etc.)
infrastructure/ # Data access, gateways, and integrations
shared/ # Shared utilities, enums, decorators, etc.
scheduler/ # Background job scheduling
test/ # End-to-end tests
orm-build/
generated/prisma/ # Prisma client and schema
- Node.js (v18+ recommended)
- pnpm (or npm/yarn)
- PostgreSQL database
- Redis server
pnpm installCreate a .env file in the root directory and configure your database, Redis, and other secrets as needed.
Generate and apply Prisma migrations:
pnpm prisma migrate devpnpm start:devpnpm testpnpm lintstart- Run the app in production modestart:dev- Run the app in development mode (with hot reload)start:debug- Run the app in debug modestart:prod- Run the compiled app in productionstart:worker- Run the background scheduler workerbuild- Compile the TypeScript sourceformat- Format code with Prettierlint- Run ESLint and auto-fix issuesset:initial:data- Seed the database with initial datatest- Run unit teststest:watch- Run unit tests in watch modetest:cov- Run tests with coverage reporttest:debug- Run tests in debug modetest:e2e- Run end-to-end testsformat:schema- Format the Prisma schemamigrate- Run Prisma migrationsgen- Generate Prisma clientprisma- Run Prisma CLI commands
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.