← Back to project overview


1. Languages and Frameworks

  • Python - backend and MCP services.
  • TypeScript - dashboard frontend.
  • FastAPI - REST/SSE/WebSocket backend API.
  • Next.js (App Router) - dashboard UI.
  • React 19 - frontend rendering layer.

2. Backend Core Libraries

From backend/requirements.txt and current code usage:

  • fastapi - API framework.
  • uvicorn - ASGI server.
  • mangum - AWS Lambda adapter for ASGI.
  • slowapi - route-based rate limiting.
  • pydantic-settings - env/config management.
  • python-dotenv - .env loading.
  • psycopg2-binary - PostgreSQL driver.
  • bcrypt - password hashing.
  • email-validator - schema-level email validation.
  • simple-salesforce - Salesforce API client.
  • requests - token/auth and API calls (indirectly via services).

3. AI/Agent Stack

  • langchain-classic - AgentExecutor, tool-calling agent orchestration, memory.
  • langchain-aws - ChatBedrockConverse integration with Bedrock.
  • langchain-mcp-adapters - loads MCP tools into LangChain.
  • fastmcp (in mcp_server/requirements.txt) - MCP server runtime.
  • AWS Bedrock Runtime - model inference service (default model: us.amazon.nova-lite-v1:0).

4. Frontend Libraries

From dashboard/package.json:

  • axios - API HTTP client.
  • zustand - client state management.
  • sonner - toast notifications.
  • react-markdown, remark-gfm - markdown rendering.
  • framer-motion - animation.
  • lucide-react - icons.
  • @radix-ui/* - UI primitives.
  • tailwindcss, tailwind-merge, class-variance-authority, clsx - styling system.

5. Data Stores and Persistence

  • PostgreSQL (tickets table) for support tickets.
  • In-memory user store for local mirror/test/dev user records.
  • In-memory OTP state (TTL + counters; suitable for single-node/dev).
  • In-memory chat session memory (ConversationBufferMemory per session).

6. External Services

  • AWS Bedrock
    • chat generation
    • ticket triage decisioning
    • ticket intent extraction for automated actions
  • Salesforce
    • OAuth token lifecycle
    • user provisioning
    • password reset email trigger
    • optional user listing source for /api/users

7. Runtime Components

  • FastAPI backend process (backend/main.py)
  • FastMCP server process (mcp_server/server.py)
  • Next.js dashboard process (dashboard)
  • PostgreSQL service (docker-compose.postgres.yaml)

8. Development and Test Tooling

  • pytest, pytest-asyncio - backend tests.
  • Docker / Docker Compose - local service orchestration.
  • ESLint + TypeScript tooling - frontend linting/build.
  • Next.js build pipeline (next build, next start).

9. Operational/Infra Patterns in Code

  • Startup lifecycle with dependency warm-up (Salesforce token + DB init).
  • Background scheduler loop for ticket triage.
  • MCP tool registry with async-to-sync shim for compatibility.
  • Config-driven behavior via env variables (backend/config.py).
  • Structured log masking for sensitive user identifiers.

10. Important Environment Variables (Backend)

  • AWS_REGION
  • BEDROCK_MODEL_ID
  • AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKEN (optional if role/profile exists)
  • MCP_SERVER_URL
  • DATABASE_URL
  • SALESFORCE_CLIENT_ID, SALESFORCE_CLIENT_SECRET, SALESFORCE_USERNAME, SALESFORCE_PASSWORD, SALESFORCE_TOKEN_URL
  • TICKET_SCHEDULER_ENABLED, TICKET_SCHEDULER_INTERVAL_SECONDS