How adityasinh-sodha/airlink works
Main System Components
• Frontend Client: Represent the user’s browser rendering HTML from the index.html template. This also loads CSS (static/styles.css) and JavaScript (static/script.js). The static/assets directory contains all media and font assets.
• Backend Server: The core is the Flask application (app.py), which handles HTTP requests, routes, and template rendering.
• Real-Time Communication Module: Since Socket.IO is used for enabling real-time file transfers and messaging, include this as a distinct module integrated within the backend.
• Network & Device Discovery: Highlight that part of the logic (likely in both backend and frontend code) detects devices on the same network and handles file routing.
• External Dependencies: Include external libraries such as Flask and Socket.IO (as well as any Python dependencies defined in requirements.txt).
Out Relationships and Interactions
• The User Browser sends HTTP GET requests to the Flask server.
• The server responds with rendered HTML and associated static content.
• Once loaded, the JavaScript on the client establishes a Socket.IO connection to the backend.
• Real-time events (such as file sending and messaging) flow between devices via the server’s Socket.IO endpoints.
• The frontend displays available devices and any communication via dynamic updates that are pushed from the server.
Architectural Patterns and Design Principles
• Minimal but clear modular breakdown: Since the project isn’t split into many subdirectories (e.g., no separate backend and frontend folders), show that while the structure is simple, the components serve specific clear purposes.
– “Web Browser” that connects to the “Flask Server.”
– Within the Flask Server, indicate two integrated modules: (1) API/HTTP Handler (for serving pages and static files) and (2) Real-Time Socket.IO Handler.
– From the Web Browser to the Flask Server labeled “HTTP Requests” and “Page Rendering.”
• If relevant, a separate section can note “Device Discovery Logic” (this could either be a part of the JavaScript on the client or a background process in the server) to indicate how devices on the network are detected.