Spaces:
Paused
Paused
|
Download README.md from 3SCError404/miracle: direct link, hf CLI and curl.
- Browser
- Download file 4.94 kB
-
https://huggingface.co/spaces/3SCError404/miracle/resolve/main/README.md
- Command line
-
hf download hf://spaces/3SCError404/miracle/README.md
-
curl -L -o README.md https://huggingface.co/spaces/3SCError404/miracle/resolve/main/README.md
4.94 kB
metadata
title: Nexus
emoji: π
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
Nexus β AI-Powered Customer Support Platform
Nexus is a production-grade, multi-tenant customer support platform with an embedded AI agent layer. It combines a FastAPI backend, a React frontend, PostgreSQL with pgvector semantic search, and LangGraph-powered agents into a single deployable unit.
Live demo: https://3scerror404-nexus.hf.space/
API docs: https://3scerror404-nexus.hf.space/docs
What it does
- Ticket management β Multi-workspace support ticket lifecycle (OPEN β ACKNOWLEDGED β IN_PROGRESS β RESOLVED β CLOSED) with priorities P0βP3 and SLA enforcement.
- AI master agent (Nexus) β Natural language workspace queries via a LangGraph agent that routes to knowledge base search, ticket operations, analytics, and remediation nodes.
- Semantic search β Hybrid search over tickets and KB articles: pgvector HNSW similarity + PostgreSQL full-text (TSVECTOR/GIN).
- Real-time updates β WebSocket pub/sub (Redis-backed) broadcasts ticket changes, new messages, and SLA alerts to connected clients.
- Background AI workers β ARQ heavy lane runs auto-summarization, KB embedding/chunking, memory crystallization, and workspace insight generation.
- Multi-workspace RBAC β Six roles (SUPERADMIN, SC_ADMIN, SC_LEAD, SC_AGENT, CUSTOMER_ADMIN, CUSTOMER_USER) with per-workspace role overrides.
Repository layout
Hackathon/
βββ main.py # FastAPI application entry point
βββ nexus_worker.py # ARQ worker definitions (regular + heavy lanes)
βββ Dockerfile # Multi-stage production image
βββ alembic/ # Database migrations
βββ api/v1/ # HTTP route handlers (20 modules)
βββ agents/ # LangGraph agent graphs, nodes, and tools
βββ core/ # Config, auth, DB engine, cache, websockets, RBAC
βββ models/ # SQLAlchemy ORM models (30 entities)
βββ schemas/ # Pydantic request/response schemas
βββ services/ # Business logic layer
βββ tasks/ # ARQ background job definitions
βββ scripts/ # Dev and production helper scripts
βββ docs/ # Full documentation
βββ frontend/
βββ apps/customer/ # Customer-facing portal (React + Vite)
βββ apps/internal/ # Internal ops console (React + Vite)
βββ packages/shared/ # Shared components and hooks
Tech stack
| Layer | Technology |
|---|---|
| API framework | FastAPI 0.115 + Uvicorn / Gunicorn |
| Database | PostgreSQL (Supabase/Neon in cloud) |
| ORM | SQLAlchemy 2.0 async + asyncpg |
| Vector search | pgvector (HNSW index, 768-dim embeddings) |
| Cache / pub-sub | Redis (Upstash in cloud, local Redis in dev) |
| Job queue | ARQ (dual worker lanes) |
| AI orchestration | LangGraph 0.2 + LangChain 0.3 |
| LLM providers | Anthropic Claude (primary), Ollama (local/embeddings), Google Gemini |
| Frontend | React 19 + TypeScript 5 + Vite 8 |
| Resend | |
| Observability | OpenTelemetry (OTLP exporter) |
| Container | Docker (multi-stage build) |
Quick start
# 1. Copy and configure environment
cp .env.example .env # fill in DATABASE_URL, REDIS_URL, ANTHROPIC_API_KEY, etc.
# 2a. Docker (recommended β matches production)
./scripts/start_local.bat # Windows one-click
# or: docker compose -f compose.example.yml up
# 2b. Manual (no Docker)
uvicorn main:app --reload # API on :8000
arq nexus_worker.RegularWorkerSettings &
arq nexus_worker.HeavyWorkerSettings &
npm run dev -w frontend/apps/customer # customer portal
npm run dev -w frontend/apps/internal # internal portal
# 3. Run migrations (first time or after schema changes)
alembic upgrade head
Documentation
| Doc | Contents |
|---|---|
| Architecture | System design, data flow, caching layers, WebSocket pub/sub |
| API Reference | All HTTP and WebSocket endpoints with parameters and response shapes |
| AI Agents | LangGraph agent graphs, tools, RBAC output masking |
| Development | Environment variables, local setup, migrations, testing |
| Deployment | Docker build, Hugging Face Spaces, Railway failover |
| Backend Insights | 15 deep-dive technical design docs |
Deployment tiers
| Tier | Target | When |
|---|---|---|
| Primary | Hugging Face Spaces (Docker) | All production traffic |
| Failover | Railway (auto-detects railway.json) |
HF Spaces outage |
| Local | Docker or bare processes | Development |