How spyroslon/fitoverlays works
Main Components
• Client Side (Frontend):
– Browser-based interface that displays pages such as index.html (and index_backup.html for versioning/fallback).
– Static assets (in the static folder, e.g., images) that are used to design overlays and other UI elements.
• Web Server (Backend):
– server.py: This is the main entry point of the Python-based web server. It handles HTTP requests, routes, and business logic.
– validators.py: Contains helper functions or modules that likely validate user input (e.g., checking the pasted Strava URL).
• Activity/Logging/Cache:
– The activities folder stores JSON files (responses from Strava activities) that could be used as logs, caches, or direct inputs for generating overlays.
• External Integration:
– Although not explicitly shown as separate components/files, the README describes “Instant Strava Integration”. This implies that server.py is responsible for making HTTP requests to Strava’s API/endpoint when a user submits an activity link.
Architectural Patterns and Principles
• Separation of Concerns – The client (presentation) is separated from business logic (server.py) and validation logic (validators.py).
• Modular Design – Key functionalities (API integration, overlay generation, input validation) are separated into different files or modules.
• Simplicity and Direct Flow – The system design is straightforward, with a clear linear flow: User input → Validation → External API Integration → Data processing → Overlay generation → Response.
• Component is clearly labeled and that every processing or communication flow (user input, validation, API request, data logging, and response output) is depicted.
• Relevant details noted in the README (e.g., “Optimized for Instagram Stories”, “Multiple Overlay Styles”) by possibly annotating the web server’s overlay generation module or by including a side note.