System Design Full-Stack Cloud AI 11 min read · July 28, 2026

How I Built JobNinjas.ai: AI Platform Architecture

By Sairam Kumar Reddy Veereddy · Creator & Lead AI Engineer

Shipping a modern generative AI product solo is no longer just about calling an LLM endpoint. Production readiness requires authentication, transactional messaging, document storage, vector databases, background event orchestration, latency-sensitive voice streaming, and cost control.

I designed and launched JobNinjas.ai entirely on my own. In this article, I outline the full architectural blueprint: how AWS cloud primitives, a FastAPI microservice backend, LangChain RAG agents, 8 production n8n workflows, and real-time WebRTC voice interact to create a resilient user experience.

High-Level System Topology

The platform separates concerns into four clear tiers:

JobNinjas.ai Full-Stack Architecture
flowchart TD
    subgraph Client [Client Tier]
        UI[Web UI]
        Voice[WebRTC Voice Channel]
    end

    subgraph AWS [AWS Cloud Infrastructure]
        Cognito[AWS Cognito Auth]
        S3[AWS S3 Document Lake]
        RDS[(AWS RDS PostgreSQL)]
        SES[AWS SES Email Gateway]
    end

    subgraph Backend [FastAPI Backend]
        API[FastAPI Router]
        RAG[LangChain RAG Agent]
        Chroma[(ChromaDB Vector Store)]
    end

    subgraph Automations [Automation Tier]
        n8nCluster[8 n8n Production Workflows]
    end

    subgraph VoiceEngine [Speech Tier]
        Vapi[Vapi Realtime Engine]
        Whisper[Faster-Whisper STT]
    end

    UI --> Cognito
    UI --> API
    Voice <--> Vapi
    Vapi <--> Whisper
    Vapi <--> API

    API --> RDS
    API --> S3
    API --> RAG
    RAG --> Chroma

    API -->|Webhooks| n8nCluster
    n8nCluster --> SES
    n8nCluster --> RDS
          

FastAPI Backend & Asynchronous Tool Execution

We chose FastAPI because native Python asynchronous support (asyncio) allows high concurrency without blocking thread pools during external LLM and vector store calls:

Python (FastAPI RAG Router)
from fastapi import APIRouter, Depends, HTTPException, BackgroundTasks
from langchain.chains import RetrievalQA
from core.auth import get_current_user_cognito
from services.rag_engine import job_rag_agent

router = APIRouter(prefix="/api/v1/dossier", tags=["Dossier RAG"])

@router.post("/adapt-bullet")
async def adapt_resume_bullet(
    bullet_req: BulletAdaptationRequest,
    background_tasks: BackgroundTasks,
    user: dict = Depends(get_current_user_cognito)
):
    """Adapt experience bullet point against target job description with RAG citations."""
    try:
        adapted_content = await job_rag_agent.aexecute_bullet_adaptation(
            user_id=user["sub"],
            raw_experience=bullet_req.bullet_text,
            target_role=bullet_req.target_job_title
        )
        
        # Dispatch background event to n8n for user analytics and logging
        background_tasks.add_task(
            dispatch_n8n_event, 
            event_type="bullet_adaptation_completed",
            payload={"user_id": user["sub"], "tokens": adapted_content.token_usage}
        )
        return adapted_content
    except Exception as exc:
        raise HTTPException(status_code=500, detail=str(exc))

Why 8 n8n Workflows? (Separation of Synchronous vs Asynchronous Work)

A common anti-pattern in early AI projects is cramming background tasks—email delivery, document chunking, CRM updates, and PDF rendering—directly into API endpoints. This inflates API latency and causes HTTP timeouts.

In JobNinjas.ai, I delegated these jobs to 8 independent n8n workflows:

  1. Document Ingestion & OCR: Normalizes uploaded PDFs from S3 and chunks text for embedding.
  2. Vector Index Refresher: Re-indexes ChromaDB embeddings when a user updates their profile.
  3. Welcome & Onboarding Sequence: Dispatches personalized emails via AWS SES.
  4. Interview Analytics Compiler: Gathers Vapi voice logs and formats a strengths-and-weaknesses report.
  5. Daily Job Match Alert: Queries indexed job feeds and matches candidates based on semantic distance.
  6. Billing & Subscription Lifecycle: Processes Stripe webhook events and updates AWS RDS entitlements.
  7. Dead Letter Queue Auditor: Retries failed external API calls with exponential backoff.
  8. System Observability Alert: Sends automated Slack notifications on API latency spikes.

Real-Time Voice Architecture with WebRTC

For realistic mock interviews, standard HTTP audio requests feel disjointed due to 3-second latency lags. JobNinjas.ai implements WebRTC audio streams connecting directly to a Vapi voice bridge running Faster-Whisper for transcription and low-latency neural speech synthesis. Conversational turnarounds average under 750 milliseconds, providing an experience that feels remarkably human.

← Previous: NYC PULSE with Mistral Next: Evaluating AI Agent Reliability →