How wei-hsiang86/care-together works
Project type and purpose
• Care-Together is a full-stack web application built with Node.js, Express, Sequelize (MySQL) and Handlebars.
• It serves two user roles—patients and medical staff—allowing patients to log vitals and social interactions, and staff to review, annotate, and record medical cases.
File structure
• Top-level artifacts:
• app.js – entry point, Express app setup
• config/ – database and authentication configuration (Sequelize, Passport)
• controllers/ – request handlers organized by domain (user, patient, comment, note, record, friend, contest, admin)
• models/ – Sequelize models and associations for user, patient, records, notes, comments, friendships, acquaintance
• routes/ – Express routers that map URL paths to controllers
• middleware/ – Express middleware for auth, file upload (multer), error handling
• views/ – Handlebars templates (layouts, partials, domain views)
• public/ – static assets and client-side scripts
• migrations/ & seeders/ – Sequelize schema and data initialization
• Architectural pattern: Classic MVC layered: routes → controllers → models → database; views rendered on server.
README
• Describes key features: user registration, login, vitals submission, social/friend features, annotations, record keeping.
• Tech stack: Node, Express, MySQL, Sequelize, Handlebars, Passport.
Detailed capture of essential elements
• For each feature (e.g., “Add Patient Data”), annotate which controller, model, and view are involved.
• Authentication flow: login route → Passport middleware → session store.
• File-upload path: Browser → Multer middleware → Disk (public/demo or uploads).
• Friend/Acquaintance management: controllers invoking friendship and acquaintance models.