Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,292 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏒 Strata Platform

Build Coverage Coverage codecov

⚑ The second badge updates automatically after each main merge. Enable GitHub Pages (Source: GitHub Actions) in repo settings to activate it. TypeScript Next.js Convex License Vercel

All-in-One HR Management SaaS Platform

Live Demo Β· Report Bug Β· Request Feature


πŸ“‹ Table of Contents


🎯 About

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.

The Problem

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

The Solution

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.


✨ Features

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-Based Access Control (5 Roles)

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

πŸ›  Tech Stack

Frontend

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

Backend & Database

Technology Purpose
Convex Real-time database + serverless functions
NextAuth.js v5 Authentication framework
Upstash Redis Rate limiting & caching

Integrations

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

DevOps

Tool Purpose
Vercel (EU, fra1) Hosting & Edge Functions
GitHub Actions CI/CD pipeline
Playwright E2E testing
Jest + RTL Unit & integration testing

πŸ— Architecture

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
Loading

Data Flows

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

πŸš€ Getting Started

Prerequisites

  • Node.js 20+ (LTS recommended)
  • npm 10+ or pnpm 9+
  • Convex account β€” sign up free
  • Vercel account β€” sign up free

Installation

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 dev

Quick Commands

npm 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 report

πŸ”‘ Environment Variables

Create .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=true

πŸ“ Project Structure

hr-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

πŸ§ͺ Testing

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 main merge via scripts/ratchet-coverage.mjs. Coverage history tracked on Codecov. Run node scripts/ratchet-coverage.mjs --apply to bump them manually.

Runs on every PR

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 main merge.

Codecov History

Codecov tracks coverage over time and posts coverage summaries on every PR. To activate:

  1. Sign in at codecov.io with your GitHub account
  2. Add the hr-project repo
  3. Copy the Repository Upload Token from repo settings β†’ add as CODECOV_TOKEN in GitHub Secrets
  4. Copy the Badge token from Codecov Settings β†’ replace YOUR_CODECOV_TOKEN in the badge URL above
  5. The unit-tests job will upload coverage automatically on every CI run

Codecov graph

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.


🚒 Deployment

Deployed on Vercel in EU (fra1) for GDPR compliance.

git push origin main    # Auto-deploy
vercel --prod           # Manual deploy

πŸ”’ Security

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

🌐 Internationalization

Code Language Status
en πŸ‡¬πŸ‡§ English βœ… Complete
ru πŸ‡·πŸ‡Ί Russian βœ… Complete
hy πŸ‡¦πŸ‡² Armenian βœ… Complete

🀝 Contributing

  1. Fork β†’ 2. Branch (feature/x) β†’ 3. Commit (Conventional Commits) β†’ 4. Push β†’ 5. PR

πŸ—Ί Roadmap

  • 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)

πŸ“„ License

MIT License


πŸ‘¨β€πŸ’» Author

Roman Gulanyan β€” @roma-frontend β€” romangulanyan@gmail.com

Built with ❀️ using Next.js + Convex + Microsoft 365

Releases

Packages

Used by

Contributors

Languages