How negin-mgdm/oscars-library works
Project type and purpose
• This is a small full-stack web application (“Oscars Library”) built on Node.js/Express, with a single-page frontend (homepage.html + client.js) that reads and visualizes static Oscars data (oscars.json). It’s deployed as a monolith on Heroku (Procfile).
File structure
• Top level:
• server.js – Express-based HTTP server & API
• client.js – browser-side JS for interactivity/visualisation
• homepage.html – main UI shell
• oscars.json – embedded data store
• package.json / Procfile – dependency & deployment descriptors
• .gitignore, README.md – project metadata
• No separate “frontend” vs. “backend” repos—everything lives in one codebase. There’s no external database: oscars.json is the data source.
Extract architectural hints from the README
• Backend framework: Express.js on Node.js
• Frontend: vanilla HTML/CSS + client-side JS
• Data: in-repo JSON file
• Deployment target: Heroku
Main components & interactions
a. Client (Browser)
• Loads homepage.html
• Runs client.js to fetch data and render charts/tables
b. Server (Node.js/Express)
• Serves homepage.html + client.js + static assets
• Exposes one or more REST endpoints (e.g., GET /api/oscars) that read oscars.json and return JSON
c. Data Store (oscars.json)
• Local file; no external DB
d. Hosting Platform (Heroku)
• Procfile instructs Heroku to run node server.js
e. (Optional) External dependencies
• Could be npm packages (Express, etc.)
Architectural patterns & principles
• Monolithic server + static asset hosting
• Single-page application (SPA) style: client.js drives UI logic and data visualization
• Separation of concerns: server handles I/O & API, client handles rendering
• No microservices, no caching layer, no external DB for simplicity