How penguinoneshaw/nudc2019-organisation works
Project type and purpose
• This is a Node.js full-stack web application serving two distinct functions:
a. A presentation framework (slides, event details) under the /presentation route
b. An invoice and event-details management endpoint under /invoices
• It uses Express.js for HTTP routing, Handlebars for server-side templating, Rollup for bundling frontend code, and SCSS for styles.
File structure
• Top-level:
• index.js ← main Express server
• framework/ ← custom presentation framework (components, styles, templates)
• handlebars_templates/ ← invoice and event templates
• data/ ← events.js (JS data source), slides.json
• public/ ← generated frontend assets (bundle, CSS)
• rollup.config.js ← build config
• Procfile ← Heroku deployment
• Patterns:
• MVC-like separation:
• “data” as model
• Handlebars templates as views
• index.js routes as controllers
• A static generation layer for presentation (client assets) and a dynamic templating layer for invoices.
README
• Confirms two functional blocks—presentation & invoices—both served by the same Express server.
• NPM start boots the server.
• Future plans mention static generation for competition details (presentation).
a. Main components
1. Client Browser
2. Express Server (index.js)
• Router: /presentation
• Router: /invoices
3. Presentation Framework
• framework/index.js — assembles components
• framework/components/*.js & .scss
• data/slides.json
• Rollup bundle → public/framework.bundle.js
• public/style.css
4. Invoice/Event System
• handlebars_templates/*.hbs
• data/events.js
• index.js loads data & passes to templates
5. Build/Deploy
• rollup.config.js
• Procfile & Heroku
6. Yarn & cache (local dev dependencies)
b. Relationships & interactions
• Browser GET /presentation → Express serves framework/index.hbs + bundle + CSS
• Browser GET /invoices → Express compiles Handlebars with data/events.js → HTML response
• Rollup reads framework/*.js & SCSS and outputs to public/
• Data files feed both presentation and invoices pipelines.
c. Architectural patterns/design principles
• MVC pattern: routes/controllers, templates/views, data/models
• Single server monolith serving both static assets and dynamic pages
• Build pipeline for frontend assets (Rollup + SCSS)
d. Key technologies
• Node.js + Express.js
• Handlebars.js
• Rollup.js
• SCSS
• Yarn Plug’n’Play