IncidentHub API is a production-style incident management backend built using Node.js, Express, PostgreSQL, and Prisma. It supports authentication, role-based access control, project and ticket workflows, comments, filtering, pagination, and interactive API documentation using Swagger.
- API Base URL: https://incidenthub-api.onrender.com/api
- Swagger Docs: https://incidenthub-api.onrender.com/docs
⚠️ Note: The service may take a few seconds to wake up due to free-tier hosting.
- 🔐 JWT Authentication
- 👥 Role-Based Access Control (ADMIN, AGENT, VIEWER)
- 📁 Project Management
- 🎫 Ticket Management (Create, Update, Assign, Status, Priority)
- 💬 Comments on Tickets
- 🔍 Filtering, Search, Sorting, Pagination
⚠️ Centralized Error Handling- 📄 Swagger / OpenAPI Documentation
- ❤️ Health & Readiness Endpoints
- Node.js
- Express.js
- PostgreSQL
- Prisma ORM
- JWT (jsonwebtoken)
- bcrypt
- Swagger UI / OpenAPI
- NeonDB
src/
config/
controllers/
middleware/
routes/
utils/
app.js
server.js
prisma/
schema.prisma
docs/
openapi.yaml
Access interactive API docs:
/docs
Test endpoints directly from the browser using Swagger UI.
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/me
POST /api/projectsGET /api/projectsGET /api/projects/:id
POST /api/ticketsGET /api/ticketsGET /api/tickets/:idPATCH /api/tickets/:idPATCH /api/tickets/:id/assignPATCH /api/tickets/:id/statusPATCH /api/tickets/:id/priority
POST /api/tickets/:id/commentsGET /api/tickets/:id/comments
git clone https://github.com/AmeyParle/incidenthub-api/
cd incidenthub-api
npm install
Create .env file:
PORT=5000
DATABASE_URL="postgresql://USERNAME:PASSWORD@HOST:5432/DATABASE_NAME?sslmode=require"
JWT_SECRET="your-super-secret-key"
npx prisma migrate dev --name init_schema
npx prisma generate
npm run dev
/health→ API status/ready→ readiness check
- Notification microservice integration
- Input validation using Zod
- Rate limiting & security enhancements
- API testing (Jest / Supertest)
- Logging & observability
Amey Parle