How ijameela/sda-bootcamp-project works
Project Type and Purpose
• This is a Python-based chatbot application. The focus is on a backend (backend.py) and chatbot functionality (chatbot.py), with logging (chroma.log) and persistence provided via a SQLite database (chroma.sqlite3).
• The README specifies that this project is now at the stage of deploying the application on an Azure Virtual Machine. It involves manual setup of infrastructure components (e.g., network security group, virtual network, public IP address, subnet, disk, network interface) and setting up systemd service files for the database, frontend, and backend.
File Structure
• Top-Level Files: The main executable scripts (backend.py, chatbot.py), a requirements file (requirements.txt) for dependency management, and configuration files like .gitignore.
• Database Artifacts: A SQLite database file (chroma.sqlite3) reflecting the project's state persistence, and an associated log file (chroma.log) for tracking events.
a. Infrastructure Components on Azure:
• Azure Virtual Machine (Ubuntu 24.04 LTS) as the host.
• Network Components: Azure Virtual Network, Subnet, Public IP address, Network Interface, and a Network Security Group that controls inbound/outbound rules.
b. Application Components:
• Backend Service: Represented by backend.py. This component handles core business logic and likely acts as an API layer.
• Chatbot Engine: Represented by chatbot.py; it may interact with the backend to engage with user inputs.
• Database Service: Represented by chroma.sqlite3 (with chroma.log for logging) which stores persistent data. Even though it’s a file-based SQLite DB, it’s important to denote it as the persistence layer.
• Frontend (if applicable): Though not visible in the file tree, the README instructs deploying and running frontend services. It should be included as a distinct component that interacts with users either through a web portal or another UI.
c. Deployment and Service Management:
Relationships and Interactions
• User requests coming into the frontend (if applicable) and forwarded to the backend.
• The backend interacting with the chatbot component or vice versa.
• Both services interfacing with the SQLite database for reading/writing persistence data.
• How the VM’s network security group and associated network components safeguard access to these services.
• That these applications and services operate on one VM, but conceptually separate them to highlight modularity.
Architectural Patterns and Design Principles
• Though this is a small, mono-repository project, the division into core components (chatbot, backend, database, and implicit frontend) follows a modular separation.
• The manual configuration of Azure infrastructure stresses explicit separation and clear boundaries for security and manageability.
• That the system is built to facilitate both local debugging (as evident from a simple file structure) and production-like deployment on a VM.
Technologies and Frameworks
• Python as the main programming language.
• SQLite for the database.
• Systemd for service management.
• Azure’s virtual networking components and VM infrastructure.
• Any packages specified in requirements.txt (not listed here but ensure to reference them if they reveal additional libraries or frameworks).