How kaimkaur/smart-hr works
Smart HR is a role-based HR platform: employees, managers, HR, recruiters, and administrators use the Next.js application to manage workforce operations and recruitment. The principal workflow runs from browser pages through frontend services to FastAPI routes/controllers and domain services, which persist records in PostgreSQL and return results to the UI. Recruitment adds optional AI-assisted resume screening; reporting supports operational summaries and exports. Backend wiring is described at the module level because most service implementations were not sampled.
Main entry points: main.py FastAPI application · database.py PostgreSQL · recruitment Recruitment · services API services
Components 19
Web experience
- Role-based pages
frontend/src/app - API services
frontend/src/services - Token storage
frontend/src/lib/auth-storage.ts
API platform
- FastAPI application
backend/app/main.py - Authentication
backend/app/modules/auth - Users and roles
backend/app/modules/user - Audit logs
backend/app/modules/audit_logs
Workforce operations
- Employee records
backend/app/modules/employee - Org structure
backend/app/modules/organization - Attendance
backend/app/modules/attendance - Leave management
backend/app/modules/leave - Performance reviews
backend/app/modules/performance - Notifications
backend/app/modules/notifications
Talent and insights
- Recruitment
backend/app/modules/recruitment - AI screening
backend/app/ai - Reports and exports
backend/app/modules/reporting
Persistence and AI
- PostgreSQL
backend/app/core/database.py
Other components
- HR platform users
- LLM provider
Connections 28
- HR platform users → Role-based pages: use
- Role-based pages → API services: request
- API services → FastAPI application: HTTP calls
- FastAPI application → Authentication: dispatches
- FastAPI application → Users and roles: dispatches
- FastAPI application → Employee records: dispatches
- FastAPI application → Org structure: dispatches
- FastAPI application → Attendance: dispatches
- FastAPI application → Leave management: dispatches
- FastAPI application → Performance reviews: dispatches
- FastAPI application → Notifications: dispatches
- FastAPI application → Recruitment: dispatches
- FastAPI application → Reports and exports: dispatches
- FastAPI application → Audit logs: dispatches
- Authentication → Token storage: returns tokens
- Token storage → API services: provides tokens
- Employee records → PostgreSQL: reads/writes
- Org structure → PostgreSQL: reads/writes
- Attendance → PostgreSQL: reads/writes
- Leave management → PostgreSQL: reads/writes
- Performance reviews → PostgreSQL: reads/writes
- Notifications → PostgreSQL: reads/writes
- Recruitment → PostgreSQL: reads/writes
- Users and roles → PostgreSQL: reads/writes
- Reports and exports → PostgreSQL: queries
- Audit logs → PostgreSQL: reads/writes
- Recruitment → AI screening: screens candidates
- AI screening → LLM provider: requests analysis