How noice-noise/gogamify-students works
Purpose and execution model
GoGamify Education is a Node.js/Express, MongoDB-backed education platform for teachers, students, and administrators. Teachers turn learning resources into gamified journeys, resources, and collectibles; students join and complete them. The server entry point is index.js; a separate source/template entry exists at src/index.js. Deployment targets Heroku, and the client includes installable PWA assets.
HTTP application boundary
Express routes partition the application by role and domain, dispatching requests to controllers: routes/authRoute.js, routes/gamifyRoutes.js, and routes/collectionRoutes.js; corresponding handlers include controllers/authController.js, controllers/gamifyController.js, and controllers/collectionController.js. Server-rendered EJS views provide teacher/admin/auth flows, while public PWA pages support learner-facing use.
Identity, sessions, and roles
Authentication configuration and Passport integration form the security boundary, with password/session/cookie handling described by the project: config/authConfig.js, config/passportConfig.js, models/user.js. Role-specific identity data is separated into models/student.js and models/teacher.js, with administration managed through controllers/adminController.js and routes/adminRoutes.js.
Learning-resource gamification pipeline
Teachers create and manage learning resources, then gamify them into playable material; the README identifies rich-text-to-HTML conversion and Mammoth.js as part of this capability. Core persistence and orchestration reside in models/learningResource.js, controllers/learningResourceController.js, and controllers/gamifyController.js. Teacher authoring UIs are rendered from views/gamify/create.ejs and views/gamify/details.ejs.
Journey, enrollment, and student progression
Student-facing flow includes joining a journey, browsing content, completing material, and receiving summary/done states. This is represented by controllers/studentController.js, routes/studentRoutes.js, and server views such as views/app/join-code.ejs, views/app/browse-journey.ejs, and views/app/journey-summary.ejs. The PWA provides parallel static journey/module experiences at public/pwa/journey/journey.html and public/pwa/learning-module/module.html.
Collectibles and reward system
Collectibles are a distinct domain used for badges, achievements, or themes earned through progression. Its API/controller/model boundary is routes/collectionRoutes.js, controllers/collectionController.js, and models/collectible.js; management views live in views/collection/index.ejs and views/collection/details.ejs. Reward presentation also exists in the learner PWA at public/pwa/collections/collections.html.
Client delivery and infrastructure
The project serves static browser assets and EJS-rendered pages from public/ and views/, with Tailwind CSS artifacts/configuration at public/tailwind.css and tailwind.config.js. PWA install/offline behavior is anchored by public/manifest.json and public/service-worker.js. MongoDB is accessed through Mongoose models; Heroku is the stated hosting platform. data/schools.json supplies local school reference data.
Main entry points: collectible.js Collectibles · index.js Express server · gamifyRoutes.js Role & domain routes · journey.html Learner PWA
Components 20
HTTP application
- Express server · Primary application entry point.
index.js - Role & domain routes
routes/gamifyRoutes.js
Identity & roles
- Auth controller
controllers/authController.js - Passport & sessions
config/passportConfig.js - Users and role profiles · User, student, and teacher identities.
models/user.js - Administration
controllers/adminController.js
Learning journey
- Learning resources
models/learningResource.js - Resource authoring · Creates resources and converts rich text or documents to playable HTML.
controllers/learningResourceController.js - Gamification orchestration · Turns teacher resources into journey material.
controllers/gamifyController.js - Teacher authoring views
views/gamify/create.ejs - Student progression · Joins journeys, browses content, and records completion.
controllers/studentController.js - Student journey views
views/app/browse-journey.ejs - Collectibles · Badges, achievements, and themes earned through progression.
models/collectible.js - Collection management
views/collection/index.ejs
Client delivery
- Server-rendered UI · Teacher, admin, authentication, and student browser flows.
- Learner PWA · Parallel journey, module, and reward experiences.
public/pwa/journey/journey.html - PWA install & offline
public/service-worker.js
Other components
- MongoDB · Persistent store accessed through Mongoose models.
- School reference data
data/schools.json - Heroku
Connections 23
- Heroku → Express server: hosts
- Express server → Role & domain routes: mounts
- Express server → Server-rendered UI: renders
- Express server → Learner PWA: serves static assets
- Learner PWA → PWA install & offline: uses
- Role & domain routes → Auth controller: auth requests
- Role & domain routes → Gamification orchestration: gamification requests
- Role & domain routes → Collectibles: collection requests
- Auth controller → Passport & sessions: authenticates via
- Passport & sessions → Users and role profiles: loads sessions and users
- Administration → Users and role profiles: manages
- Resource authoring → Learning resources: creates and updates
- Gamification orchestration → Learning resources: gamifies
- Teacher authoring views → Resource authoring: submits authoring
- Student progression → Learning resources: browses and completes
- Student journey views → Student progression: drives
- Student progression → Collectibles: awards through progression
- Collection management → Collectibles: manages
- Learner PWA → Student progression: parallel learner flow
- Learner PWA → Collectibles: shows rewards
- Users and role profiles → MongoDB: persists
- Learning resources → MongoDB: persists
- Collectibles → MongoDB: persists