# iasis-gestao-backend NestJS 11 REST API for managing service orders, contracts, professionals, and clients. Uses PostgreSQL via Prisma ORM and JWT authentication with role-based access control (ADMIN, OPERATOR, CLIENT). ## Requirements - Node.js 22 - PostgreSQL - Copy `.env.example` to `.env` and set `DATABASE_URL` and `JWT_SECRET` ## Setup ```bash npm ci npm run prisma:migrate npm run start:dev ``` ## Commands ```bash npm run start:dev # Dev server with watch mode npm run build # Compile to dist/ npm run start:prod # Run compiled production build npm run lint:fix # ESLint with auto-fix npm run format # Prettier formatting npm run test # Unit tests npm run test:e2e # E2E tests npm run prisma:migrate # Create and apply DB migrations npm run prisma:generate # Regenerate Prisma client after schema changes ``` ## Deployment See [DEPLOY.md](DEPLOY.md) for the full Azure App Service deployment guide, including GitHub Actions CI/CD, pre-commit hooks, and database migration instructions.