How ramcharan79-web/wanderlust-fullstack works
WanderLust is a server-rendered property-listing application. Visitors browse listing collections and details; signed-in users can create, edit, and delete listings, while users can register, log in, and add or remove reviews. Express dispatches requests to route modules, which apply validation and access checks, read or write Mongoose models, then render EJS pages or redirect with feedback. The README also documents seed-data initialization. The principal runtime files are excerpted; template and browser behavior is represented at subsystem level from the tree and README.
Main entry points: app.js Express application · user.js Account routes · listing.js Listing routes · review.js Review routes
Components 17
Web application
- Express application
app.js - Listing routes
routes/listing.js - Review routes
routes/review.js - Account routes
routes/user.js
Listing and review domain
- Listing model
models/listing.js - Review model
models/review.js - User model
models/user.js - Seed initializer
init/index.js - Sample listings
init/data.js
Identity and validation
- Access and validation
middleware.js - Joi schemas
schema.js
Rendered interface
- EJS templates
views - Browser behavior
public/js/script.js - Stylesheet
public/css/style.css
Other components
- Visitor
- MongoDB
- Passport local auth
Connections 23
- Visitor → Express application: sends requests
README.md - Express application → Listing routes: mounts routes
app.js - Express application → Review routes: mounts routes
app.js - Express application → Account routes: mounts routes
app.js - Express application → MongoDB: connects database
app.js - Express application → User model: configures sessions
app.js - Listing routes → Listing model: queries listings
routes/listing.js - Listing routes → Access and validation: applies guards
routes/listing.js - Review routes → Listing model: loads listing
routes/review.js - Review routes → Review model: writes reviews
routes/review.js - Review routes → Access and validation: applies guards
routes/review.js - Account routes → User model: registers users
routes/user.js - Account routes → Access and validation: saves redirect
routes/user.js - Account routes → Passport local auth: authenticates locally
routes/user.js - Access and validation → Joi schemas: validates input
middleware.js - Listing model → Review model: deletes related reviews
models/listing.js - Seed initializer → Sample listings: loads sample data
init/index.js - Seed initializer → Listing model: inserts listings
init/index.js - Listing routes → EJS templates: renders pages
routes/listing.js - Account routes → EJS templates: renders auth pages
routes/user.js - Express application → EJS templates: configures rendering
app.js - Express application → Browser behavior: serves static assets
app.js - Express application → Stylesheet: serves static assets
app.js