How arshh0-0/roamly works
Roamly is a lodging-listing web application. Visitors browse and filter listings; registered users can create, edit, and delete listings, upload images, and add or remove reviews. Express routes dispatch requests to controllers, which use Mongoose models for listings, reviews, and users; listing creation and updates also geocode locations. The README provides only a demo link and account, so capabilities beyond the shown code are not inferred. Relationships are limited to those visible in excerpts or the source index.
Main entry points: app.js Express app · middleware.js Auth and validation · listing.js Listing routes · listings.js Listing controller
Components 18
Web application
- Express app
app.js - Listing routes
routes/listing.js - Review routes
routes/review.js - Account routes
routes/user.js
Listing management
- Listing controller
controllers/listings.js - Listing model
models/listing.js - Listing pages
views/listings - Map client
public/js/map.js
Reviews
- Review controller
controllers/reviews.js - Review model
models/review.js
Accounts and validation
- User controller
controllers/users.js - User model
models/user.js - Auth and validation
middleware.js - Validation schemas
schema.js
Data and media
- Image storage config
cloudConfig.js - MongoDB
- Mapbox geocoding
Other components
- Visitor
Connections 23
- Visitor → Express app: requests
app.js - Express app → Listing routes: mounts
app.js - Express app → Review routes: mounts
app.js - Express app → Account routes: mounts
app.js - Express app → MongoDB: connects
app.js - Listing routes → Listing controller: dispatches
routes/listing.js - Listing routes → Auth and validation: checks
routes/listing.js - Listing routes → Image storage config: configures upload
routes/listing.js - Listing controller → Listing model: queries and saves
controllers/listings.js - Listing controller → Mapbox geocoding: geocodes location
controllers/listings.js - Listing controller → Listing pages: renders
controllers/listings.js - Review routes → Review controller: dispatches
routes/review.js - Review routes → Auth and validation: checks
routes/review.js - Review controller → Listing model: updates listing
controllers/reviews.js - Review controller → Review model: creates and deletes
controllers/reviews.js - Listing model → Review model: deletes associated reviews
models/listing.js - Account routes → User controller: dispatches
routes/user.js - Account routes → Auth and validation: saves redirect
routes/user.js - User controller → User model: uses account model
controllers/users.js - Express app → User model: configures Passport
app.js - Auth and validation → Listing model: checks ownership
middleware.js - Auth and validation → Review model: checks authorship
middleware.js - Auth and validation → Validation schemas: validates input
middleware.js