Enter password to view the HorixOS main blueprint page.
Consolidated presentation document built from all requirement files: macro architecture, workflow, SaaS services, monorepo directory design, RBAC permission matrix, and API/route catalog — all in a light-theme, structured format.
Tenant registry, subscription/billing, plan enforcement, usage metering, Redis rate limiting, feature flags, tenant provisioning, telemetry, internal admin.
Subdomain resolver, JWT auth middleware, tenant resolver, plan validator, rate limiter, request router.
Data acquisition, ATS core, matching engine, workforce intelligence, compliance manager, supervised AI execution.
VOIP, call recording, STT, NLP/sentiment, talk/listen ratio, compliance phrase detection, email intent analysis, engagement scoring.
Event bus backbone, real-time analytics, ROI engine, behavioral/burnout models, vector database, AI services, audit & observability.
PostgreSQL (platform/product/analytics), object storage (calls/resumes/docs), Redis (queues/rate/session), vector DB (pgvector or Pinecone).
Platform Control Plane
↓
API Gateway
↓
Product Execution + Communication Intelligence + Intelligence/Data Plane
candidate_created
job_posted
call_completed
email_sent
pipeline_stage_changed
ai_suggestion_generated
recruiter_session_started
compliance_flag_detected
Users (Owner | Manager | Recruiter) → Frontend (Next.js) → API Gateway → Auth + Tenant + Plan + Rate Guard → Core Services → Queues/Workers (heavy tasks) → DB + Event Bus → Analytics + Dashboard updates
JWT + OAuth (Google/Microsoft), request validation.
Multi-tenant isolation and provisioning.
Stripe checkout, subscriptions, invoices, portal, usage metering.
Jobs, candidates, pipeline, placements, compliance.
Playwright worker + parsing + AI structuring into ATS.
Rule filtering + pgvector cosine similarity + weighted rank.
Twilio/VOIP + Email provider + transcript/email intelligence.
OpenAI/Gemini/Anthropic for parsing, generation, analysis, embeddings.
Sessions, activity, productivity, burnout indicators.
AI tokens, call minutes, storage, API and seats.
Redis streams consumers for analytics, ROI, notifications, billing.
Authentication Flow Login → Auth Service → JWT/OAuth JWT in HTTP-only cookie Every request validated at gateway
Billing Flow (Stripe) Owner selects plan → Checkout session Payment → Webhook → subscription update Plan enforcement + metering active
Call Intelligence Recruiter call → Twilio Recording stored → Webhook Transcription queue → AI analysis Sentiment/engagement stored → Event emitted
Email Intelligence Email send/receive → provider webhook Thread stored → AI context extraction Intent + engagement score updated
| Function | Primary | Alternatives |
|---|---|---|
| Hosting | Oracle / AWS | GCP / Fly.io |
| Frontend | Vercel / Next.js | Cloudflare Pages |
| Backend | NestJS | Fastify / Express |
| Database | Postgres | MySQL |
| Vector | pgvector | Pinecone |
| AI | OpenAI | Gemini / Anthropic |
| VOIP | Twilio | Plivo / Vonage |
| Resend | SendGrid / SES | |
| Payments | Stripe | Paddle / Razorpay |
| Queue | Redis | Kafka / SQS |
| Auth | JWT | Clerk / Auth0 |
Agency signs up → Tenant provisioned → Owner configures org → Jobs created → Data ingestion/sourcing → Matching ranks candidates → Recruiters communicate → Calls & emails analyzed → Candidate moves in pipeline → Placement completed → Performance & ROI tracked → AI optimizes decisions
Call Workflow Call initiate → record → store → transcribe → AI transcript analysis → engagement score → metrics saved → event emitted → dashboard update
Email Workflow Email sent via platform → thread stored → intent extraction → engagement scoring → response tracking → pipeline suggestions
Candidate Lifecycle Profile created → Enriched/classified → Matched → Contacted → Screened → Interview → Offer → Placement → Post-placement tracking
Recruiter action → event generated → event bus storage → AI learns patterns → predictive model updated → future recommendations improved
Examples: recruiter-close-rate learning, burnout trend detection, matching-weight adjustment, drop-off prediction.
Recommended monorepo: pnpm + Turborepo (or Nx).
horixos/ ├── apps/ │ ├── web/ # Next.js frontend │ ├── api/ # NestJS backend │ └── workers/ # background worker processes ├── packages/ │ ├── shared-types/ │ ├── shared-config/ │ ├── shared-utils/ │ └── ui-kit/ ├── infra/ │ ├── docker/ │ ├── nginx/ │ ├── terraform/ │ └── scripts/ ├── docs/ ├── .env.example ├── package.json └── turbo.json
web/ ├── app/ │ ├── (marketing)/ │ ├── (auth)/login | register | oauth-callback │ ├── (dashboard)/owner | manager | recruiter | analytics | billing | settings │ ├── jobs/ | candidates/ | pipeline/ │ ├── communication/calls | emails | transcripts │ ├── admin/ │ └── layout.tsx ├── components/ui | dashboard | pipeline | communication | charts | billing ├── hooks/ ├── lib/api-client.ts | auth.ts | tenant.ts | stripe.ts ├── middleware.ts # subdomain -> tenant resolver └── styles/
src/ ├── core/ (database, redis, storage, event-bus, logging, guards, interceptors, middlewares) ├── auth/ ├── platform/ (tenants, billing, usage, rate-limit, feature-flags, admin) ├── ats/ (jobs, candidates, pipeline, placements, compliance) ├── scraping/ (controllers, services, workers, parsers, dto) ├── matching/ (scoring, vector, services) ├── communication/ │ ├── voip/ (twilio.service.ts, call.controller.ts, call.webhook.ts) │ ├── email/ (smtp.service.ts, email.webhook.ts) │ ├── transcription/ (transcription.worker.ts, whisper.adapter.ts) │ └── nlp/ (sentiment, engagement, compliance services) ├── ai/ (providers, resume-parser, jd-generator, transcript-analysis, embeddings, recommendations) ├── workforce/ (sessions, activity, productivity) ├── analytics/ (aggregations, roi, dashboards, reports) └── events/ (publishers, consumers, event-types.ts)
scraping.worker.ts, transcription.worker.ts, ai.worker.ts, analytics.worker.ts, billing.worker.ts, worker.module.ts.
platform.* (tenants, subscriptions, usage_logs, feature_flags), product.* (users, jobs, candidates, applications, pipeline_stages, calls, transcripts, emails), analytics.* (recruiter_metrics, roi_metrics, engagement_scores, burnout_index).
scraping.queue.ts, transcription.queue.ts, ai.queue.ts, analytics.queue.ts, billing.queue.ts.
jwt.strategy.ts, google.strategy.ts, microsoft.strategy.ts, auth.controller.ts, auth.service.ts.
stripe.service.ts, webhook.controller.ts, subscription.service.ts, metering.service.ts.
ai.interface.ts, openai.provider.ts, gemini.provider.ts for provider switching per tenant/plan.
ats, scraping, matching, communication, workforce.
billing, usage, tenant, rate-limit.
ai, analytics, events.
Roles: Platform Admin (internal), Owner (tenant), Manager (team), Recruiter (operational).
Cross-tenant management, system health, global billing oversight; no recruitment execution.
Full tenant access including billing, team management, strategic analytics, feature control.
Team oversight, supervision, performance/compliance monitoring; no billing control.
ATS execution, communication, AI-assisted tasks; no team/billing control.
Authentication, Tenant/Platform, Billing, User Management, ATS, Scraping, Matching, Communication, AI Usage, Workforce Analytics, ROI Analytics, Compliance, System Flags, Notifications, Event Audit.
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| Login | ✅ | ✅ | ✅ | ✅ |
| Update own profile | ✅ | ✅ | ✅ | ✅ |
| Reset own password | ✅ | ✅ | ✅ | ✅ |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| View tenant info | ✅ (all tenants) | ✅ | 🟡 (view only) | ❌ |
| Update tenant config | ✅ | ✅ | ❌ | ❌ |
| Suspend tenant | ✅ | ❌ | ❌ | ❌ |
| View feature flags | ✅ | ✅ | 🟡 | ❌ |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| View subscription | ✅ | ✅ | ❌ | ❌ |
| Upgrade/downgrade plan | ❌ | ✅ | ❌ | ❌ |
| View invoices | ✅ | ✅ | ❌ | ❌ |
| Access billing portal | ❌ | ✅ | ❌ | ❌ |
| View usage metering | ✅ | ✅ | 🟡 (team level) | ❌ |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| Invite user | ❌ | ✅ | 🟡 (recruiter only) | ❌ |
| Change role | ❌ | ✅ | ❌ | ❌ |
| Remove user | ❌ | ✅ | ❌ | ❌ |
| View team | ❌ | ✅ | ✅ | ❌ |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| Create job | ❌ | ✅ | ✅ | ✅ |
| Edit job | ❌ | ✅ | ✅ | 🟡 (own jobs only) |
| Close job | ❌ | ✅ | ✅ | ❌ |
| Delete job | ❌ | ✅ | ❌ | ❌ |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| Create candidate | ❌ | ✅ | ✅ | ✅ |
| Edit candidate | ❌ | ✅ | ✅ | 🟡 (assigned only) |
| Delete candidate | ❌ | ✅ | ❌ | ❌ |
| Upload resume | ❌ | ✅ | ✅ | ✅ |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| Move candidate stage | ❌ | ✅ | ✅ | ✅ |
| Create stage | ❌ | ✅ | ❌ | ❌ |
| Edit stage | ❌ | ✅ | ❌ | ❌ |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| Create scrape job | ❌ | ✅ | 🟡 (if enabled) | ❌ |
| Cancel scrape job | ❌ | ✅ | ❌ | ❌ |
| View scrape results | ❌ | ✅ | ✅ | 🟡 |
Scraping is often plan-restricted.
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| Run matching | ❌ | ✅ | ✅ | ✅ |
| Adjust matching weights | ❌ | ✅ | ❌ | ❌ |
| View match explanation | ❌ | ✅ | ✅ | ✅ |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| Initiate call | ❌ | ✅ | ✅ | ✅ |
| View all call logs | ❌ | ✅ | ✅ | ❌ |
| View own call logs | ❌ | ❌ | ❌ | ✅ |
| Delete recording | ❌ | ✅ | ❌ | ❌ |
| View transcript analysis | ❌ | ✅ | ✅ | 🟡 (own only) |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| Send email | ❌ | ✅ | ✅ | ✅ |
| View all threads | ❌ | ✅ | ✅ | ❌ |
| View own threads | ❌ | ❌ | ❌ | ✅ |
| View AI email insights | ❌ | ✅ | ✅ | 🟡 |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| Use AI tools | ❌ | ✅ | ✅ | ✅ |
| View AI token usage | ✅ | ✅ | 🟡 | ❌ |
| Override AI limits | ❌ | ✅ | ❌ | ❌ |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| View personal productivity | ❌ | ❌ | ❌ | ✅ |
| View team productivity | ❌ | ❌ | ✅ | ❌ |
| View company productivity | ❌ | ✅ | ❌ | ❌ |
| View burnout indicators | ❌ | ✅ | ✅ | ❌ |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| View ROI dashboard | ❌ | ✅ | ❌ | ❌ |
| View revenue impact | ❌ | ✅ | ❌ | ❌ |
| View AI efficiency gains | ❌ | ✅ | 🟡 | ❌ |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| Set compliance rules | ❌ | ✅ | ❌ | ❌ |
| View compliance flags | ❌ | ✅ | ✅ | 🟡 |
| Edit compliance records | ❌ | ✅ | ❌ | ❌ |
| Action | Platform Admin | Owner | Manager | Recruiter |
|---|---|---|---|---|
| View all tenants | ✅ | ❌ | ❌ | ❌ |
| Suspend tenant | ✅ | ❌ | ❌ | ❌ |
| View global usage | ✅ | ❌ | ❌ | ❌ |
| System health | ✅ | ❌ | ❌ | ❌ |
Own jobs, assigned candidates, own calls/emails.
Team members and assigned recruiters; no billing.
Entire tenant, billing access, feature controls.
Cross-tenant platform controls, no operational recruitment actions.
Use NestJS Role Guard + Permission Guard + Resource Scope Guard + Plan Guard Example: @Roles(Role.Owner, Role.Manager) @Permissions(Permission.VIEW_TEAM_ANALYTICS)
Base URL: https://{tenant}.horixos.com/api | Admin base: https://admin.horixos.com/api | Auth: JWT cookie or Bearer token | Tenant-scoped endpoints | RBAC via guards.
| Method | Endpoint | Use Case |
|---|---|---|
| POST | /auth/register | Register tenant owner + create tenant |
| POST | /auth/login | Email/password login |
| POST | /auth/logout | Invalidate refresh token |
| POST | /auth/refresh | Refresh JWT |
| GET | /auth/me | Current user profile |
| GET | /auth/google | Google OAuth redirect |
| GET | /auth/google/callback | Google OAuth callback |
| GET | /auth/microsoft | Microsoft OAuth login |
| GET | /auth/microsoft/callback | Microsoft OAuth callback |
| Method | Endpoint | Use Case |
|---|---|---|
| GET | /platform/tenant | Get tenant info |
| PATCH | /platform/tenant | Update tenant config |
| GET | /platform/tenant/usage | Current usage stats |
| GET | /platform/tenant/features | Feature flags |
| Method | Endpoint | Use Case |
|---|---|---|
| POST | /billing/checkout-session | Create Stripe checkout |
| GET | /billing/subscription | Subscription details |
| POST | /billing/portal | Stripe customer portal |
| POST | /billing/webhook | Stripe webhook handler |
| GET | /billing/invoices | List invoices |
| GET | /billing/usage | Metered usage breakdown |
Supports plan upgrades, overages, seat billing, AI token metering.
| Method | Endpoint | Use Case |
|---|---|---|
| POST | /users | Invite user |
| GET | /users | List users |
| GET | /users/:id | Get user |
| PATCH | /users/:id | Update role |
| DELETE | /users/:id | Remove user |
| POST | /users/:id/reset-password | Reset password |
| Method | Endpoint | Use Case |
|---|---|---|
| POST | /jobs | Create job |
| GET | /jobs | List jobs |
| GET | /jobs/:id | Job details |
| PATCH | /jobs/:id | Update job |
| DELETE | /jobs/:id | Archive job |
| POST | /jobs/:id/close | Close job |
| POST | /jobs/:id/match | Run matching engine |
| Method | Endpoint | Use Case |
|---|---|---|
| POST | /candidates | Create candidate |
| GET | /candidates | List candidates |
| GET | /candidates/:id | Candidate details |
| PATCH | /candidates/:id | Update profile |
| DELETE | /candidates/:id | Archive |
| POST | /candidates/:id/upload-resume | Upload resume |
| GET | /candidates/:id/matches | Matching jobs |
| Method | Endpoint | Use Case |
|---|---|---|
| GET | /pipeline/:jobId | Get job pipeline |
| POST | /pipeline/move | Move candidate stage |
| GET | /pipeline/stages | List stages |
| PATCH | /pipeline/stages/:id | Edit stage |
| POST | /pipeline/stages | Create stage |
| Method | Endpoint | Use Case |
|---|---|---|
| POST | /scraping/job | Create scrape job |
| GET | /scraping/jobs | List scrape jobs |
| GET | /scraping/jobs/:id | Status |
| DELETE | /scraping/jobs/:id | Cancel |
| POST | /scraping/parse | Parse raw data |
| Method | Endpoint | Use Case |
|---|---|---|
| POST | /matching/job/:jobId | Rank candidates |
| POST | /matching/candidate/:id | Find jobs |
| POST | /matching/weights | Adjust scoring weights |
| GET | /matching/explain/:matchId | AI explanation |
| Method | Endpoint | Use Case |
|---|---|---|
| POST | /calls/initiate | Start call |
| GET | /calls | List calls |
| GET | /calls/:id | Call details |
| POST | /calls/webhook | Twilio webhook |
| GET | /calls/:id/transcript | Transcript |
| GET | /calls/:id/analysis | AI sentiment |
| DELETE | /calls/:id | Delete recording |
| Method | Endpoint | Use Case |
|---|---|---|
| POST | /email/send | Send email |
| GET | /email/threads | List threads |
| GET | /email/thread/:id | Thread details |
| POST | /email/webhook | SMTP webhook |
| GET | /email/:id/analysis | AI insights |
| Method | Endpoint | Use Case |
|---|---|---|
| POST | /ai/parse-resume | AI resume parsing |
| POST | /ai/generate-jd | Generate job description |
| POST | /ai/analyze-transcript | Transcript NLP |
| POST | /ai/suggest-tasks | Recruiter suggestions |
| GET | /ai/usage | Token usage |
| POST | /ai/test | Debug endpoint |
| Method | Endpoint | Use Case |
|---|---|---|
| POST | /workforce/session/start | Start session |
| POST | /workforce/session/end | End session |
| GET | /workforce/productivity | Recruiter metrics |
| GET | /workforce/team-metrics | Manager view |
| GET | /workforce/burnout | Burnout indicators |
| Method | Endpoint | Use Case |
|---|---|---|
| GET | /analytics/dashboard | Owner dashboard |
| GET | /analytics/conversion | Pipeline conversion |
| GET | /analytics/roi | Revenue impact |
| GET | /analytics/ai-impact | AI productivity gain |
| GET | /analytics/capacity | Team capacity |
| Method | Endpoint | Use Case |
|---|---|---|
| GET | /notifications | List notifications |
| PATCH | /notifications/:id/read | Mark read |
| DELETE | /notifications/:id | Delete notification |
| Method | Endpoint | Use Case |
|---|---|---|
| GET | /admin/tenants | List tenants |
| GET | /admin/tenant/:id | Tenant details |
| PATCH | /admin/tenant/:id/suspend | Suspend tenant |
| GET | /admin/system/health | Infrastructure health |
| GET | /admin/usage/global | Global usage metrics |
| Method | Endpoint | Use Case |
|---|---|---|
| POST | /events/publish | Emit event |
| GET | /events/logs | Debug logs |
Typically internal-only endpoints.
Client → Frontend → API Gateway → Auth Guard → Tenant Guard → Rate Limit Guard → Controller → Service → Queue (if heavy) → Worker → External API → DB → Event Bus → Analytics update
HorixOS is a vertically integrated, AI-powered healthcare recruitment infrastructure operating system combining ATS workflows, autonomous data ingestion, communication intelligence, workforce analytics, billing governance, and tenant-aware SaaS controls into one unified cloud platform.