How gauravmkale/projects works
File Structure Analysis
• Top-level:
• app.py – the main Flask application entrypoint
• helpers.py – shared utility functions (e.g., DB helpers, form validators)
• flask_session/ – filesystem session store (server-side session files)
• users.db – SQLite database for user accounts
• static/ – CSS, uploads directory for user-submitted files
• templates/ – Jinja2 HTML templates (layout, index, login, register, buy, sell, etc.)
• No separate “frontend” folder: static assets are served by Flask.
• No containerization or multi-service directories—this is a single Python service.
README Insights
• The README simply labels this as a “Development and Coding project” without architectural details.
a. Main Components
• Client (Web Browser)
• HTTP Server / Reverse Proxy (e.g., nginx or built-in Flask dev server)
• WSGI Application Server (e.g., Gunicorn or uWSGI)
• Flask App (app.py + helpers.py + Jinja2 templates)
• Session Store (flask_session directory on disk)
• SQLite Database (users.db)
• Static File Store (static directory, including uploads)
• (Optional) External SMTP service for contact form
b. Interactions
• Browser → HTTP(S) → Reverse Proxy → WSGI → Flask routes
• Flask reads/writes sessions to flask_session files
• Flask queries/updates users.db for authentication/CRUD
• Static assets served directly from static/ by the server
• File uploads written to static/uploads and later served as static files
• Contact form triggers outbound SMTP request
c. Architectural Patterns
• MVC-style separation: Controllers (Flask route handlers), Views (Jinja2 templates), Models (SQLite accessed via helpers.py)
• Server-side session management (filesystem)
• Single deployable unit (monolith)
d. Key Technologies
• Python 3.x, Flask microframework, Jinja2 templating
• SQLite for persistence
• Filesystem-based sessions (Flask-Session)
• CSS in static/, optional JS if extended