How calmxz/project_apt works
Crux is an adaptive AI study companion: a learner starts or resumes a topic session, chats with a tutor grounded in uploaded course material, and gets learner-profile updates and checks that inform later turns. Separate flows handle document ingestion, profile and session views, and spaced review. The README documents the chat/tool workflow and major capabilities; sampled source confirms retrieval, ingestion, review scheduling, and app startup details, but not every route-to-service call, so uncertain wiring is omitted.
Main entry points: App.vue Vue application · database.py Application database · main.py FastAPI app · ingestion_service.py Ingestion pipeline
Components 27
Study interface
- Vue application
frontend/src/App.vue - Study session
frontend/src/views/SessionView.vue - Chat stream
frontend/src/services/chatStreamService.js - Session library
frontend/src/views/SessionsLibraryView.vue - Profile views
frontend/src/views/ProfileView.vue - Review view
frontend/src/views/ReviewView.vue - Upload client
frontend/src/services/uploadApi.js
API and tutor
- FastAPI app
backend/main.py - Chat endpoint
backend/routes/chat.py - Tutor agent
backend/agent/tutor.py - Agent tools
backend/agent/tools.py
Learning and state
- Learner profile
backend/services/profile_service.py - Knowledge checks
backend/services/check_question_service.py - Review scheduler
backend/services/review_queue_service.py - Session routes
backend/routes/sessions.py - Profile routes
backend/routes/profile.py - Review routes
backend/routes/review.py - Application database
backend/db/database.py
Course materials
- Upload routes
backend/routes/upload.py - Document routes
backend/routes/documents.py - Ingestion pipeline
backend/services/ingestion_service.py - RAG retrieval
backend/services/retrieval_service.py - Vector store
backend/services/pgvector_store.py - File storage
backend/services/object_store.py
Other components
- Learner
- LLM provider
- Supabase services
Connections 36
- Learner → Vue application: uses
- Vue application → Study session: renders
- Study session → Chat stream: streams turns
- Chat stream → Chat endpoint: posts turns
- Vue application → FastAPI app: calls API
- FastAPI app → Chat endpoint: mounts routes
- Chat endpoint → Tutor agent: runs turn
- Tutor agent → LLM provider: requests completion
- Tutor agent → Agent tools: dispatches tools
- Agent tools → RAG retrieval: retrieves chunks
- RAG retrieval → LLM provider: embeds query
- RAG retrieval → Vector store: searches chunks
- Agent tools → Learner profile: updates profile
- Agent tools → Knowledge checks: registers checks
- Chat endpoint → Application database: loads and saves turn
- Learner profile → Application database: reads and writes
- Knowledge checks → Application database: records outcomes
- Vue application → Session library: renders
- Session library → Session routes: loads sessions
- Vue application → Profile views: renders
- Profile views → Profile routes: loads profiles
- Vue application → Review view: renders
- Review view → Review routes: loads due concepts
- Review routes → Review scheduler: computes schedule
- Review routes → Application database: loads learning events
- Learner → Upload client: uploads materials
- Upload client → Upload routes: submits files
- FastAPI app → Upload routes: mounts routes
- FastAPI app → Document routes: mounts routes
- Upload routes → File storage: stores file
- Ingestion pipeline → File storage: loads file
- Ingestion pipeline → LLM provider: embeds chunks
- Ingestion pipeline → Vector store: stores embeddings
- Ingestion pipeline → Application database: updates document state
- RAG retrieval → Application database: checks readiness
- FastAPI app → Supabase services: validates auth