How cheocarmine/skycode works
Main Components Identification
• Frontend:
• Templates: The HTML templates in the “templates” directory (e.g., “base.html”, “login.html”, “reports.html”, etc.) provide the user interface for various pages such as authentication, enrollment, reports, and schedules.
• Static Files: The “static” directory includes CSS (for styles), JavaScript (for interactivity, charts, and other client-side functionalities), images, and pre-generated PDF reports. This represents client-side resources for the web interface.
• Backend:
• Application Entry Point: The “app.py” file initializes the application, likely sets up routing and dependency injection.
• Routing & Services: “routes.py” handles the HTTP routes, and “services.py” likely encapsulates business logic.
• Business Logic Modules: Under the “functions” directory, there are organized subdirectories (like “academic_progress”, “auth”, “enrollment”, “evaluations”, “reports”, “schedule”, “statistics”, “sync_data”, and “user_management”) grouping the core functionalities. These modules form the backbone of the application’s operations.
• Database Layer: “database.py” manages database connections and interactions, with “models.py” likely defining the data structure (ORM models) used across the system.
• Configurations: “config.py” and the handling of environment variables (.env file using the example file) manage system configuration such as database URI, secret keys, and debug settings.
• External Integration:
• Modules like those in “functions/sync_data” (e.g., “sync_with_teacher_system.py”) illustrate that the system synchronizes data with an external teacher system, integrating schedules, grades, and active subjects from another source.
Relationships and Interactions
• Data Flow and Requests:
• The client-side (frontend) makes HTTP requests (form submissions, AJAX calls) interacting with endpoints defined in “routes.py.”
• Routes pass requests to relevant business logic functions in the “functions” modules, which process data, manage logic (e.g., enrollment, academic progress, evaluations, user management), and interact with the database via “database.py” and “models.py.”
• Once processed, data is sent back to the frontend, often rendered within HTML templates.
• External Communication:
• The “sync_data” module clearly indicates a dedicated pathway for synchronizing or fetching data from an external teacher system, ensuring that the academic data remains up-to-date.
Technologies and Frameworks
• Python 3.13+ as the runtime environment.
• Likely using a Python web framework (Flask or similar) given the structure (app.py, routes.py, templates, static).
• Integration libraries for chart generation and dynamic reporting in the “static/JS” directory.
• A dependency manager (requirements.txt) ensures reproducibility.
Elements
• Frontend: Templates and Static Assets
• Backend Core (with submodules like authentication, enrollment, evaluation, etc.)
• Database/Model Layer
• External Systems Integration (teacher system)