β‘ The second badge updates automatically after each
mainmerge. Enable GitHub Pages (Source: GitHub Actions) in repo settings to activate it.![]()
![]()
![]()
![]()
All-in-One HR Management SaaS Platform
- About
- Features
- Tech Stack
- Architecture
- Getting Started
- Environment Variables
- Project Structure
- Testing
- Deployment
- Security
- Internationalization
- API Reference
- Contributing
- Roadmap
- License
Strata is a comprehensive, enterprise-grade HR management platform that centralizes all HR operations into a single, real-time application. Built for organizations that need modern workforce management β from employee lifecycle and attendance tracking (with face recognition) to AI-powered analytics and Microsoft 365 integration.
HR processes are typically fragmented across multiple disconnected tools:
- Employee data scattered in spreadsheets and SharePoint lists
- Leave requests handled via email with no calendar visibility
- Attendance tracked manually β error-prone and time-consuming
- No centralized task management or real-time analytics
Strata replaces all fragmented tools with a unified platform β zero manual data entry, single source of truth synced from SharePoint, and automated Outlook Calendar integration for approved leaves.
| Module | Description | Highlights |
|---|---|---|
| π€ Employee Lifecycle | Full employee profile management | Documents, performance metrics, onboarding/offboarding |
| π Face Recognition | Biometric attendance check-in/out | Browser-based camera, daily logs, anomaly detection |
| π Leave Management | End-to-end leave workflow | Multi-level approval, auto Outlook Calendar sync, entitlement rules |
| π Task Management | Kanban board with drag-and-drop | Assignment, deadlines, progress tracking, notifications |
| π¬ Team Chat | Real-time messaging | File sharing, channels, direct messages |
| π€ AI HR Assistant | Conversational HR chatbot | Policy Q&A, smart insights, analytics queries |
| π Driver Management | Vehicle/driver booking system | Availability tracking, scheduling, route management |
| π AI Analytics | Workforce intelligence dashboard | Headcount trends, leave patterns, attendance heatmaps |
| π M365 Integration | SharePoint + Outlook sync | Auto employee sync, calendar events for leave |
| π³ Multi-Tenant Billing | Stripe subscription management | Plans, invoicing, usage tracking |
| Role | Permissions |
|---|---|
| Superadmin | Full system access, tenant management, billing |
| Admin | Organization settings, user management, approvals |
| Supervisor | Team management, leave/task approvals, reports |
| Employee | Self-service: profile, leave requests, tasks, chat |
| Driver | Booking management, availability, schedule view |
| Technology | Purpose |
|---|---|
| Next.js 16 | React framework (SSR/SSG/ISR) |
| React 19 | UI library |
| TypeScript 5.x | Type safety |
| Tailwind CSS | Utility-first styling |
| Shadcn/ui | Accessible component library |
| Technology | Purpose |
|---|---|
| Convex | Real-time database + serverless functions |
| NextAuth.js v5 | Authentication framework |
| Upstash Redis | Rate limiting & caching |
| Service | Purpose |
|---|---|
| Microsoft Graph API | SharePoint sync + Outlook Calendar |
| Google Calendar API | Calendar sync (alternative) |
| Stripe | Subscription billing |
| Resend | Transactional email |
| Cloudinary | Media storage & optimization |
| Sentry + OpenTelemetry | Error tracking & observability |
| Tool | Purpose |
|---|---|
| Vercel (EU, fra1) | Hosting & Edge Functions |
| GitHub Actions | CI/CD pipeline |
| Playwright | E2E testing |
| Jest + RTL | Unit & integration testing |
graph TB
subgraph "Client Layer"
A["Next.js 16 + React 19<br/>TypeScript + Tailwind"]
B["Face Recognition<br/>MediaDevices API"]
end
subgraph "Auth Layer"
C[NextAuth.js v5]
C1[Azure AD OAuth 2.0]
C2[Google OAuth]
C3[TOTP 2FA]
C4[WebAuthn Passkeys]
end
subgraph "Backend Layer"
D["Convex<br/>Real-time DB + Functions"]
E["Upstash Redis<br/>Rate Limiting + Cache"]
end
subgraph "Microsoft 365"
F["SharePoint Lists<br/>Employee Data β Source of Truth"]
G["Outlook Calendar<br/>Leave Events"]
H[Microsoft Graph API]
end
subgraph "External Services"
I["Stripe<br/>Billing"]
J["Resend<br/>Email"]
K["Cloudinary<br/>Media"]
L["Google Calendar<br/>Sync"]
end
subgraph "Observability"
M["Sentry<br/>Error Tracking"]
N["OpenTelemetry<br/>Traces"]
O["Vercel Analytics<br/>Performance"]
end
A --> C
C --> C1 & C2 & C3 & C4
A --> D
A --> B
D --> E
D <-->|"Flow A: Employee Sync"| H
D -->|"Flow B: Leave to Calendar"| H
H --> F & G
D --> I & J & K & L
A --> M & N & O
style A fill:#0070f3,color:#fff
style D fill:#ff6f00,color:#fff
style H fill:#0078d4,color:#fff
style F fill:#217346,color:#fff
style G fill:#0072c6,color:#fff
Flow A (Employee Sync):
SharePoint List β Microsoft Graph API β Convex DB β Strata UI
Flow B (Leave Calendar Sync):
Strata (Leave Approved) β Convex Action β Microsoft Graph API β Outlook Calendar Event
- Node.js 20+ (LTS recommended)
- npm 10+ or pnpm 9+
- Convex account β sign up free
- Vercel account β sign up free
git clone https://github.com/roma-frontend/hr-project.git
cd hr-project
npm install
npx convex dev
cp .env.example .env.local
npm run devnpm run dev # Start development server + Convex sync
npm run build # Production build
npm run start # Start production server
npm run lint # ESLint check
npm run type-check # TypeScript type check
npm run test # Run unit tests
npm run test:e2e # Run Playwright E2E tests
npm run test:coverage # Run tests with coverage reportCreate .env.local from .env.example:
# CONVEX
CONVEX_DEPLOYMENT=
NEXT_PUBLIC_CONVEX_URL=
# AUTHENTICATION β NextAuth.js v5
NEXTAUTH_SECRET=
NEXTAUTH_URL=http://localhost:3000
# MICROSOFT 365 / AZURE AD (Entra ID)
MICROSOFT_CLIENT_ID=
MICROSOFT_CLIENT_SECRET=
MICROSOFT_TENANT_ID=
SHAREPOINT_SITE_ID=
SHAREPOINT_LIST_ID=
# GOOGLE OAUTH
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# STRIPE (Billing)
STRIPE_SECRET_KEY=
STRIPE_PUBLISHABLE_KEY=
STRIPE_WEBHOOK_SECRET=
# RESEND (Email)
RESEND_API_KEY=
# CLOUDINARY (Media Storage)
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
# UPSTASH REDIS (Rate Limiting & Cache)
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
# SENTRY (Error Monitoring)
SENTRY_DSN=
SENTRY_AUTH_TOKEN=
# FEATURE FLAGS
NEXT_PUBLIC_ENABLE_FACE_RECOGNITION=true
NEXT_PUBLIC_ENABLE_AI_ASSISTANT=true
NEXT_PUBLIC_ENABLE_DRIVER_MODULE=truehr-project/
βββ .github/workflows/ci.yml
βββ app/
β βββ (auth)/
β βββ (dashboard)/
β β βββ employees/
β β βββ attendance/
β β βββ leaves/
β β βββ tasks/
β β βββ chat/
β β βββ ai-assistant/
β β βββ drivers/
β β βββ analytics/
β β βββ settings/
β β βββ billing/
β βββ api/
βββ components/
βββ convex/
βββ lib/
βββ hooks/
βββ locales/ (en.json, ru.json, hy.json)
βββ types/
βββ tests/
βββ TEST_PLAN.md
βββ README.md
Coverage thresholds are enforced in CI (jest.config.js) and ratcheted up
as coverage improves. Coverage reports and badges are published to GitHub
Pages on every merge to main.
| Metric | Current gate | Target |
|---|---|---|
| Lines | β₯ 9% | β₯ 80% |
| Branches | β₯ 6% | β₯ 75% |
| Functions | β₯ 8% | β₯ 80% |
| Statements | β₯ 9% | β₯ 80% |
β‘ Thresholds are auto-ratcheted after each
mainmerge viascripts/ratchet-coverage.mjs. Coverage history tracked on Codecov. Runnode scripts/ratchet-coverage.mjs --applyto bump them manually.
| Job | What it checks |
|---|---|
lint |
ESLint + Prettier |
type-check |
TypeScript --noEmit |
unit-tests |
Jest + coverage thresholds + JUnit report + Codecov upload |
build |
Next.js production build |
e2e-tests |
Playwright cross-browser E2E (Chrome + Firefox + WebKit) |
security-audit |
npm audit + Dependency Review |
codeql |
GitHub CodeQL SAST |
coverage-report |
Posts coverage summary as a PR comment (PRs only) |
coverage-badge |
Publishes live badge JSON to GitHub Pages (main only) |
π‘ Enable GitHub Pages in your repo settings (Source: GitHub Actions) and the second coverage badge will update automatically after each
mainmerge.
Codecov tracks coverage over time and posts coverage summaries on every PR. To activate:
- Sign in at codecov.io with your GitHub account
- Add the
hr-projectrepo - Copy the Repository Upload Token from repo settings β add as
CODECOV_TOKENin GitHub Secrets - Copy the Badge token from Codecov Settings β replace
YOUR_CODECOV_TOKENin the badge URL above - The
unit-testsjob will upload coverage automatically on every CI run
Existing test suites live in src/__tests__/ (Jest) and e2e/ (Playwright).
Add tests alongside features: src/__tests__/<area>.test.ts or e2e/<flow>.spec.ts.
Deployed on Vercel in EU (fra1) for GDPR compliance.
git push origin main # Auto-deploy
vercel --prod # Manual deploy| Layer | Implementation |
|---|---|
| Authentication | OAuth 2.0 (Azure AD + Google), NextAuth.js v5 |
| Multi-Factor | TOTP 2FA + WebAuthn Passkeys |
| Biometric | Face Recognition (attendance) |
| Password Hashing | bcrypt (12 rounds) |
| Authorization | Convex RLS, 5-tier RBAC |
| Transport | HSTS, TLS 1.3 |
| XSS Prevention | CSP headers |
| Rate Limiting | Upstash Redis |
| Monitoring | Sentry + OpenTelemetry |
| Code | Language | Status |
|---|---|---|
en |
π¬π§ English | β Complete |
ru |
π·πΊ Russian | β Complete |
hy |
π¦π² Armenian | β Complete |
- Fork β 2. Branch (
feature/x) β 3. Commit (Conventional Commits) β 4. Push β 5. PR
- Employee lifecycle, Face recognition, Leave management, Tasks, Chat, AI, Drivers, Analytics
- Microsoft 365 integration, Stripe billing, i18n (EN/RU/HY/DE)
- Performance reviews, Payroll, E-signatures, PDF export
- Mobile app (React Native)
MIT License
Roman Gulanyan β @roma-frontend β romangulanyan@gmail.com