How dodero10/smartlearn works
Out the Main Components
• Frontend:
• React application (located in the “frontend” folder) which includes pages (ChatPage.jsx, Profile.jsx), components for chat, quiz, video, and settings.
• That it consumes REST APIs (or WebSocket endpoints) exposed by the backend.
• Backend:
• A central API server (triggered via uvicorn on FastAPI or similar, as implied from the “main.py” and run command).
• Core submodules:
• Chat Query Module (in backend/chat_query): Responsible for processing chat-related input.
• File Processing Module (backend/file_processing): Handles operations on files.
• Lecture Generation Module (backend/gen_lecture): Contains submodules for generating audio, video, slide processing, etc.
• Constant configurations (backend/constants) and utility modules (backend/utils) that support various functionalities.
• Asynchronous task system using Celery (celery_app.py and tasks.py) for background jobs.
• Configuration management (backend/config) such as Celery and Minio client configuration.
• Data and Storage:
• “Chromadb” folder holding SQLite and binary files – possibly for indexing or vector-based retrieval.
• A separateSeed script to initialize/seed the database.
• Integration with Minio (via the “minio_client.py” in both the root and backend/config) showing object storage usage.
• Containerization and Orchestration:
• Docker Compose’s role (docker-compose.yaml files in both the project root and inside backend) that ties together the frontend, backend, and possibly other services (Celery worker containers, Minio or database containers).
Relationships and Interactions
• From the Backend, illustrate calls to internal modules:
• How the Chat Query, File Processing, and Lecture Generation components are invoked as part of the API logic.
• Asynchronous processing by having the Backend dispatch jobs to the Celery worker and then reporting results back.
• Connectivity between the Backend and external or integrated services:
• Data flow to storage services (Minio and Chromadb).
• Configuration management components affecting service operation.
Architectural Patterns and Technologies
• Separation of concerns:
• The separation between the frontend (UI) and backend (core logic, business rules, and task processing).
• Use of asynchronous task processing (Celery), which decouples time‐consuming operations (like file processing or lecture generation) from the main API response flow.
• Containerized deployment (using Docker and Docker Compose) which suggests that each service (or microservice-like module) might be deployed separately.
• Supporting technologies:
• Python for backend logic (with modules organized under directories like chat_query, file_processing, gen_lecture, etc.).
• React for the frontend.
• Additional infrastructure technologies like Minio for object storage and embedded SQLite/Chromadb for data persistence.