How motsimaslam/afri-ai-tutor works
Project Components
• Main Application: The entry point is app.py, which runs the Streamlit application. This file contains the core logic to render the AI tutor interface, interactive lessons, tutoring forms, and the admin panel.
• Dependencies & Environment: The requirements.txt file lists Python packages (including Streamlit and integration libraries for OpenAI, ElevenLabs, and Stability APIs). The .devcontainer folder ensures a smooth containerized development environment.
• External Services: The application integrates with several external APIs for AI-powered functionalities:
• OpenAI for AI tutoring.
• ElevenLabs for voice integration.
• Stability for potentially generating offline or lightweight AI responses.
• User Interfaces: The README details several UI segments (multilingual chat interface, voice-enabled responses, career guidance pages, tutoring request forms, and an admin panel).
Architectural Relationships
• User Interface Layer: This comprises components for language selection, chat with the AI tutor, voice assistance, career guidance, and admin functionalities.
• Business Logic & API Integration Layer: This deals with processing user inputs, managing tutoring and career guidance requests, and interfacing with external APIs.
• Data Flow & External Interactions:
• Inputs come from users selecting languages, typing questions, or submitting forms.
• The application then uses direct API calls to interact with external services (OpenAI, ElevenLabs, Stability) to generate responses or content.
• The admin panel provides monitoring/management pathways for these requests.
• Development & Deployment Tools: The .devcontainer configuration indicates that development (and potentially deployment) is containerized for consistency.
Architectural Patterns & Technologies
• Pattern: Although built as a single application (with one main app.py), it is effectively modular, separating UI components and business logic.
• Technologies:
• Python and Streamlit for the web application.
• Containerization via the devcontainer setup.
• External APIs for AI, voice synthesis, and possibly stability models.
• Design Principle: Emphasis on a service-oriented approach where external services are decoupled from the core application and integrated via clear API boundaries.