How vanessalin9/twitter-fullstack-2020 works
Project type and purpose
• This is a full-stack, server-rendered Twitter-like application built on Node.js/Express, using Sequelize ORM (MySQL), Handlebars templates for the front end, and Passport for authentication.
• It includes both a public user interface (tweet feed, replies, likes, private/public chat) and an admin interface under /admin for managing users and content.
File structure
• Top-level:
• app.js – entry point, Express setup
• config/ – environment, DB config, Passport, Handlebars helpers
• controllers/ – MVC controllers, including controllers/api for RESTful endpoints
• services/ – business logic layer, abstracts DB operations
• models/ – Sequelize models and models/index.js
• migrations/ & seeders/ – DB schema and initial data
• routes/ – Express routers (routes/apis.js, routes/index.js, routes/routes.js)
• public/ – static assets (CSS)
• views/ – Handlebars templates (partials, layouts, admin and user pages)
• test/ – unit and integration tests
README for additional insights
• Confirms MySQL as persistent store, Sequelize CLI for migrations/seeds
• npm run dev spins up a development server
• Testing uses NODE_ENV=test with a separate test database