Documentation Index
Fetch the complete documentation index at: https://mintlify.com/chamals3n4/OpenATS/llms.txt
Use this file to discover all available pages before exploring further.
System Overview
OpenATS is built as a modern monorepo containing two primary applications:web/- Next.js frontend applicationapi/- Express.js backend API
Tech Stack
Frontend (web/)
The frontend is a modern Next.js application built with the latest React features.
Next.js 16
React framework with App Router, server components, and server actions
React 19
Latest React with improved concurrent features and automatic batching
TypeScript
Full type safety across the entire frontend codebase
Tailwind CSS 4
Utility-first CSS framework for rapid UI development
shadcn/ui
High-quality React components built with Radix UI and Tailwind
WSO2 Asgardeo
Enterprise SSO and authentication with @asgardeo/nextjs
Key Frontend Dependencies
package.json
Frontend Features
- Server Components: Optimized page loads with React Server Components
- Drag & Drop: Candidate pipeline management with
react-dnd - Dark Mode: System-aware theming with
next-themes - Charts & Analytics: Hiring metrics visualization with Recharts
- Toast Notifications: User feedback with Sonner
- Responsive Design: Mobile-first approach with Tailwind breakpoints
Backend (api/)
The backend is a TypeScript-based Express application with comprehensive API documentation.
Express.js 5
Fast, unopinionated web framework for Node.js
TypeScript
Type-safe backend with full IDE autocomplete support
Drizzle ORM
Type-safe ORM with automatic TypeScript types from schema
PostgreSQL
Robust relational database with ACID compliance
Socket.io
Real-time bidirectional communication for live updates
Swagger UI
Interactive API documentation at /api-docs
Key Backend Dependencies
package.json
Backend Features
- RESTful API: Standard HTTP methods for all resources
- Request Validation: Schema validation with Zod
- Error Handling: Centralized error middleware in
api/src/middlewares/error.middleware.ts:4 - File Uploads: Resume handling with Multer and S3-compatible storage
- Real-time Events: WebSocket notifications via Socket.io
- API Documentation: Auto-generated Swagger docs from OpenAPI spec
Database Schema
OpenATS uses PostgreSQL with Drizzle ORM for type-safe database operations. The schema is defined in TypeScript and located inapi/src/db/schema/.
Core Tables
- Jobs
- Candidates
- Assessments
- Pipeline
jobs table (api/src/db/schema/jobs.ts)Stores job postings with comprehensive details:job_skills for required skills per jobDatabase Migrations
OpenATS uses Drizzle Kit for schema migrations:Authentication Flow
OpenATS uses WSO2 Asgardeo for enterprise-grade authentication:Authentication Features
- OAuth 2.0 / OIDC: Industry-standard authentication protocol
- SSO Support: Single sign-on with existing enterprise identity providers
- Session Management: Secure session handling with
@asgardeo/nextjs - Role-Based Access: User roles and permissions (future enhancement)
File Storage Architecture
Resumes and documents are stored in Cloudflare R2 (S3-compatible storage):Configuration
.env
Real-time Communication
Socket.io enables real-time features for collaborative hiring:api/src/server.ts
Real-time Features
- Candidate Updates: Live notifications when candidates move through pipeline
- Application Alerts: Real-time alerts for new applications
- Collaborative Hiring: Multiple recruiters can see live updates
- System Events: Broadcast system-wide notifications
Email Infrastructure
OpenATS integrates with Resend for transactional emails:.env
Email Use Cases
- Assessment invitations with unique tokens
- Application confirmations
- Interview scheduling
- Offer letters
- Pipeline status updates
API Architecture
The Express API is organized with clear separation of concerns:API Endpoints
All API routes are prefixed with/api (defined in api/src/app.ts:13):
- Health Check:
GET /health- Server status - API Docs:
GET /api-docs- Interactive Swagger UI - Jobs:
GET|POST|PUT|DELETE /api/jobs - Candidates:
GET|POST|PUT|DELETE /api/candidates - Assessments:
GET|POST|PUT|DELETE /api/assessments - Pipeline:
GET|POST|PUT|DELETE /api/pipeline
Visit
http://localhost:8080/api-docs when running locally to explore the complete API documentation.Development Workflow
Design Decisions
Why Drizzle ORM?
Why Drizzle ORM?
Drizzle provides the best balance of type safety, performance, and developer experience:
- Full TypeScript inference from schema
- Zero runtime overhead
- SQL-like query builder
- Automatic migration generation
- No decorators or experimental features
Why Separate Frontend/Backend?
Why Separate Frontend/Backend?
While Next.js could handle both, separating them provides:
- Clear API boundaries
- Independent scaling
- Easier testing
- Flexibility to add other clients (mobile apps, CLI)
- Simpler deployment strategies
Why PostgreSQL?
Why PostgreSQL?
PostgreSQL offers:
- ACID compliance for data integrity
- Rich data types (JSON, arrays)
- Powerful indexing and query optimization
- Excellent tooling ecosystem
- Free and open source
Why WSO2 Asgardeo?
Why WSO2 Asgardeo?
Asgardeo provides enterprise features without complexity:
- OAuth 2.0 / OIDC compliance
- Social login providers
- Multi-factor authentication
- Free tier for development
- Easy integration with Next.js
Performance Considerations
- Database Indexes: Key fields indexed for fast queries (see schema definitions)
- Connection Pooling: PostgreSQL connections pooled via
pgdriver - Incremental Static Regeneration: Next.js ISR for optimized page loads
- Code Splitting: Automatic route-based splitting in Next.js
- Image Optimization: Next.js Image component for optimized images
- WebSocket Efficiency: Socket.io rooms for targeted real-time updates
Security Measures
Input Validation
All API inputs validated with Zod schemas
SQL Injection Protection
Drizzle ORM parameterized queries
CORS Configuration
Configured CORS policies for API access
Environment Variables
Sensitive data in .env files (never committed)
Authentication
OAuth 2.0 via WSO2 Asgardeo
File Upload Limits
Multer validation for file types and sizes
Next Steps
Contributing Guide
Learn how to extend and customize OpenATS
API Reference
Explore detailed API endpoint documentation
Database Schema
Deep dive into the data model
Development Setup
Set up OpenATS for local development