How gbowne1/flickpicker works
Project type and purpose
• Full-stack web application (voting system for Discord movie night)
• Static/PWA frontend served from Frontend/client/public
• Node.js/Express backend in Backend/
• Simple file-based datastore under Data/ (JSON) with a helper script generate_json.py
• Potential external integration: Discord API (for voting via Discord)
File structure
• Top-level directories:
– Backend/: Express server (app.js, routes.js, controllers.js)
– Frontend/client/: client application
· public/: static assets (HTML, CSS, JS modules, service-worker, manifest)
· src/components/: source modules (bundled via webpack.config.js)
– Data/: JSON files for movies and users & JSON schema
• Config/build files:
– Backend/package.json (Express dependencies)
– Frontend/client/package.json + webpack config (bundling front end)
– generate_json.py (data generation)
• Miscellaneous: PWA files (service-worker.js, manifest.json), SEO (robots.txt, sitemap.xml), metadata (structured-data.json)
Relationships and data flow
• User → Browser UI (HTTP, WebSocket if used)
• Browser UI → Service Worker (cache retrieval, fetch interception)
• Browser UI → Express API (AJAX/fetch)
• Express API ↔ Data Store (read/write JSON or later a DB)
• Express API → Discord API (outgoing webhooks or REST calls)
• Python script → Data Store (batch update of movie list)
Architectural patterns & principles
• Separation of concerns:
– Frontend (UI & PWA) vs Backend (API & business logic) vs Data Store
• Modular JS: ES modules in public/ and webpack-bundled components in src/
• RESTful API design in Express controllers/routes
• Progressive enhancement via Service Worker caching
• File-based prototyping (easy swap to real DB later)
Technologies and frameworks
• Frontend: Vanilla JS modules, Bootstrap & FontAwesome via CDN, Webpack
• Backend: Node.js, Express
• Data: JSON schemas, Python for data generation
• PWA: manifest.json, service-worker.js