How harsha-code-per/rostra works
Rostra is a multi-tenant HR workspace for Indian teams. Employees and HR use the web app to manage attendance, leave, employee records, and payroll; payroll calculations use attendance and approved paid leave to derive payable days and net pay. Platform owners provision or suspend company workspaces and triage inquiries. The frontend’s typed API client connects the Next.js app to FastAPI; API routes delegate business work to services and persist tenant-scoped records. Major workflows are documented, but many frontend-to-endpoint calls and service internals were not sampled, so those links rely on the README or are omitted.
Main entry points: router.py API route registry · api.ts Typed API client · database.py Database session · email_service.py Email delivery
Components 27
Web workspace
- Next.js workspace
frontend/app/dashboard/layout.tsx - HR dashboards
frontend/app/dashboard/admin/page.tsx - Employee dashboard
frontend/app/dashboard/employee/page.tsx - Platform console
frontend/app/platform-admin/page.tsx - Sign-in
frontend/app/login/page.tsx - Typed API client
frontend/lib/api.ts
HR operations
- Employees and profiles
backend/app/api/employees.py - Attendance
backend/app/api/attendance.py - Attendance rules
backend/app/services/attendance_service.py - Leave requests
backend/app/api/leaves.py - Leave decisions
backend/app/services/leave_service.py - Payroll and payslips
backend/app/api/payroll.py - Payroll calculation
backend/app/services/payroll_service.py - Analytics
backend/app/api/analytics.py - Notifications
backend/app/api/notifications.py
Platform administration
- Platform controls
backend/app/api/super_admin.py - Workspace provisioning
backend/app/services/super_admin_service.py - Workspace inquiries
backend/app/api/inquiries.py
API and data
- Authentication
backend/app/api/auth.py - Email delivery
backend/app/services/email_service.py - FastAPI application
backend/app/main.py - API route registry
backend/app/api/router.py - Database session
backend/app/database.py - PostgreSQL
Other components
- Employees and HR
- Platform owner
- SMTP provider
Connections 31
- Employees and HR → Next.js workspace: uses
README.md - Platform owner → Platform console: manages workspaces
README.md - Next.js workspace → Typed API client: uses client
README.md - Sign-in → Typed API client: signs in through
README.md - HR dashboards → Typed API client: requests HR data
README.md - Employee dashboard → Typed API client: requests employee data
README.md - Platform console → Typed API client: requests platform data
README.md - Typed API client → FastAPI application: sends REST requests
README.md - FastAPI application → API route registry: mounts routes
backend/app/main.py - API route registry → Authentication: registers
backend/app/api/router.py - API route registry → Employees and profiles: registers
backend/app/api/router.py - API route registry → Attendance: registers
backend/app/api/router.py - API route registry → Leave requests: registers
backend/app/api/router.py - API route registry → Payroll and payslips: registers
backend/app/api/router.py - API route registry → Analytics: registers
backend/app/api/router.py - API route registry → Notifications: registers
backend/app/api/router.py - API route registry → Platform controls: registers
backend/app/api/router.py - API route registry → Workspace inquiries: registers
backend/app/api/router.py - Attendance → Attendance rules: delegates rules
backend/app/api/attendance.py - Leave requests → Leave decisions: delegates decisions
backend/app/api/leaves.py - Payroll and payslips → Payroll calculation: delegates calculations
backend/app/api/payroll.py - Platform controls → Workspace provisioning: delegates operations
backend/app/api/super_admin.py - Authentication → Email delivery: sends account email
backend/app/api/auth.py - Workspace provisioning → Email delivery: sends invitations
backend/app/services/super_admin_service.py - Workspace provisioning → Email delivery: notifies inquiries
backend/app/services/super_admin_service.py - FastAPI application → Database session: uses engine
backend/app/main.py - Database session → PostgreSQL: connects to
README.md - Attendance rules → Database session: persists records
- Leave decisions → Database session: persists requests
- Payroll calculation → Database session: reads and writes
- Email delivery → SMTP provider: sends mail
README.md