How iamkazbrekker/empowerher works
Project type and purpose
• This is a full-stack web application called “EmpowerHer.”
• The Node.js server (server.js) serves a static front end under /public and reads a local JSON data store (/data/testimonials.json).
• The client side is a multi-page, gamified learning platform: home, login/signup, profile, training modules (“functions”), all built in vanilla HTML/CSS/JS.
File structure
• Top-level
• server.js – the HTTP server entrypoint
• data/testimonials.json – static data used by the UI
• utils/ – helper code to map file extensions to MIME types and to route URLs to file paths
• public/ – the entire client-side codebase, organized by feature:
• public/home – landing page and video demo modules
• public/login – login and signup pages
• public/profile – user profile, edit-profile, shop pages
• public/functions – interactive lesson pages (testimonials, resources, stories, help)
• package.json – metadata and dependencies
Key technology insights from README
• Front end: Vanilla JavaScript, CSS, HTML, YouTube IFrame API for videos, LocalStorage for progress
• Back end: Node.js (no external framework), static file serving, potential future integration with Firebase/MongoDB for cloud-persisted progress
Main components
a. Client Browser
• Modules: Home, Login/Signup, Profile, Training Lessons
• LocalStorage for storing lesson progress and user badges
• YouTube IFrame API embedded in lesson pages
b. Node.js Server
• HTTP server that:
• Serves static assets (HTML/CSS/JS from /public)
• Reads data/testimonials.json to populate the testimonials module
• Uses utils/getContentType.js and utils/redirectToPath.js to handle MIME types and friendly URLs
c. Data Store
• Local JSON file (testimonials.json)
• (Future) Optional Cloud DB (Firebase or MongoDB) for user accounts & persisted progress
d. External Services
• YouTube as video host via IFrame API
Relationships and data flow
• Client → Server: HTTP GET for HTML/CSS/JS assets
• Client → Local JSON: Server reads and injects JSON into client lesson pages
• Client ↔ YouTube IFrame API: load videos, track completion
• Client → LocalStorage: persist progress, badges
• (Optional) Client ↔ Cloud DB: fetch/save user profiles and progress
Architectural patterns and principles
• Separation of concerns:
• Static asset layer under /public (UI)
• Data layer under /data (testimonials)
• Server logic (routing + file serving) in server.js + utils/
• Feature-based directory structure on the front end (modules grouped by functionality)
• Progressive enhancement: offline-first with LocalStorage, cloud sync as a future step