NeuralChat is a personal AI workspace for authenticated GPT-5 chat, persistent memory, project-scoped collaboration, file-grounded answers, plan-first agents, enforced usage limits, and owner-managed access controls.
This repository is the workspace root. The app itself lives in NeuralChat/.
NeuralChat is built as an AI workspace rather than a single chat box.
Today it already supports:
- authenticated GPT-5 chat with NDJSON streaming
- global user memory for standard chats
- project-scoped chat, files, and Project Brain memory
- file-grounded answers from uploaded documents
- optional Tavily-backed web search with source metadata
- plan-first Agent Mode with saved plans and execution logs
- daily and monthly usage limits with real backend enforcement
- owner-managed access control for
owner,member, anduser - frontend caching plus backend caching to reduce cold-start and reload pain
PROJECT/
├── NeuralChat/
│ ├── backend/ # FastAPI app mounted through Azure Functions ASGI
│ ├── frontend/ # React + TypeScript client
│ ├── docs/ # Architecture, deployment, roadmap
│ └── README.md # App-level technical reference
├── README.md # Root overview + navigation
└── .gitignore
- authenticated chat flow with GPT-5
- streaming token responses
- local and AI-refined conversation titles
- usage-aware request blocking when limits are reached
- global user memory for normal chats
- Project Brain memory for project chats
- file upload, parsing, chunk reuse, and grounded answers
- optional web search with cached sources
- project workspaces with isolated chats
- project-level memory and files
- project chat shells and workspace views
- project templates and custom project prompts
- create a plan first
- run the plan explicitly
- stream progress into the UI
- persist plan history and execution logs
- daily and monthly usage monitoring
- enforced budgets with warning and block states
- access management for workspace users
- owner-level user role, feature, and per-user budget controls
flowchart LR
UI[React Frontend] --> AUTH[Clerk]
UI --> API[FastAPI on Azure Functions]
API --> AOAI[Azure OpenAI GPT-5]
API --> TAVILY[Tavily Search]
API --> BLOB[Azure Blob Storage]
API --> CLERK[Clerk Backend API]
BLOB --> CONV[Conversations]
BLOB --> PROFILE[Profiles + Memory]
BLOB --> FILES[Uploads + Parsed Chunks]
BLOB --> AGENTS[Plans + Logs]
BLOB --> PROJECTS[Projects + Project Brain]
BLOB --> USAGE[Usage Records]
- Frontend: React 18, TypeScript, Vite, Clerk React, React Query, Framer Motion, Recharts, Markdown + KaTeX rendering
- Backend: FastAPI, Azure Functions ASGI, Pydantic, HTTPX
- Model provider: Azure OpenAI GPT-5
- Search provider: Tavily
- Agent orchestration: LangChain + LangGraph
- Storage: Azure Blob Storage
- Auth: Clerk JWT verification and Clerk Backend API calls
- Document parsing: PyMuPDF, python-docx, multipart upload handling
Key current areas in NeuralChat/frontend/src/:
App.tsx: app shell, routing, chat orchestration, project switching, notifications, usage gatingmain.tsx: Clerk boot, React Query provider, keep-alive startup, theme initializationcomponents/Sidebar.tsx: primary navigation and workspace switchingcomponents/ChatWindow.tsxandcomponents/MessageBubble.tsx: transcript renderingcomponents/ProjectBrainPanel.tsx: project memory visibility and editingcomponents/AgentProgress.tsxandcomponents/AgentHistory.tsx: plan-first agent UXcomponents/CostDashboard.tsx: budget controls and usage reportingcomponents/AccessManagementPanel.tsx: owner-facing access management UIpages/ProjectsPage.tsxandpages/ProjectWorkspacePage.tsx: project index and workspace viewsapi/: typed frontend clients for chat, usage, agent, members, and project routes
Key current areas in NeuralChat/backend/app/:
main.py: FastAPI routes and request orchestrationauth.py: Clerk token validation and user extractionaccess.py: global access model, owner seeding, feature overrides, member profilesrouters/members.py: owner-only member list, invite, role, feature, limit, and removal routesservices/chat_service.py: GPT chat generation and streamingservices/memory.py: global memory extraction and prompt buildingservices/projects.py: project CRUD, project chats, Project Brain, and project filesservices/file_handler.py: upload validation, parsing, chunking, and retrievalservices/agent.py: plan generation, execution, and persisted logsservices/cost_tracker.py: usage logging, summaries, budgets, and enforcementservices/cache.py: in-memory TTL cache for read-heavy endpointsservices/search.py: Tavily search and cache handlingservices/blob_paths.py: readable Blob path naming and migration helpers
Public endpoints:
GET /api/healthGET /api/keep-warmGET /api/search/statusGET /api/projects/templates
Protected endpoint groups:
/api/chat/api/meand/api/me/memory/api/upload,/api/files,/api/conversations/*/api/projects/*/api/agent/*/api/usage/*/api/members/*
- App overview and technical reference: NeuralChat/README.md
- Architecture: NeuralChat/docs/ARCHITECTURE.md
- Deployment: NeuralChat/docs/DEPLOYMENT.md
- Roadmap: NeuralChat/docs/ROADMAP.md
NeuralChat is being built to grow into a broader AI workspace.
Likely next areas include:
- MCP tools and external tool connectivity
- richer multi-step agents and deeper tool execution
- voice input and voice-driven interactions
- image generation workflows
- multimodal understanding for images and documents
- stronger retrieval quality and provenance
- deeper collaboration and admin controls
These are roadmap directions, not shipped features unless they are explicitly documented as present in the app-level README or code.
If you want the real implementation details first:
- Read NeuralChat/README.md
- Check NeuralChat/docs/ARCHITECTURE.md
- Use NeuralChat/docs/DEPLOYMENT.md for local or Azure setup