How anikverma094-lab/wanderlust-project works
Wanderlust is a travel-blog application: readers browse featured, latest, categorized, and individual posts; signed-in users can create and edit posts, while admins manage posts and users. The backend also supports email/password and Google sign-in, role checks, and Redis-backed post caching. The graph follows documented route wiring and sampled controller/model interactions. Frontend-to-backend request wiring is not shown in the excerpts, so that connection is left unasserted.
Main entry points: App.tsx App routes · app.ts Express app · user.ts User records · auth.ts Auth routes
Components 22
Travel blog frontend
- App routes
frontend/src/App.tsx - Travel discovery
frontend/src/pages/home-page.tsx - Post views
frontend/src/pages/details-page.tsx - Post authoring
frontend/src/components/form-blog.tsx - Admin pages
frontend/src/pages/admin-blogs.tsx - Sign-in pages
frontend/src/pages/signin-page.tsx
Backend API
- Express app
backend/app.ts - Post routes
backend/routes/posts.ts - Auth routes
backend/routes/auth.ts - User routes
backend/routes/user.ts - Backend startup
backend/server.ts
Identity and access
- User administration
backend/controllers/user-controller.ts - Credential sessions
backend/controllers/auth-controller.ts - Token authorization
backend/middlewares/auth-middleware.ts - Google OAuth
backend/config/passport.ts - User records
backend/models/user.ts
Content and caching
- Post operations
backend/controllers/posts-controller.ts - Post records
backend/models/post.ts - Post cache helpers
backend/utils/cache-posts.ts - Redis cache
backend/services/redis.ts - Database connection
backend/config/db.ts
Other components
- Reader or author
Connections 28
- Reader or author → App routes: browses and manages
README.md - App routes → Travel discovery: routes to
frontend/src/App.tsx - App routes → Post views: routes to
frontend/src/App.tsx - App routes → Post authoring: routes to
frontend/src/App.tsx - App routes → Admin pages: routes to
frontend/src/App.tsx - App routes → Sign-in pages: routes to
frontend/src/App.tsx - Express app → Post routes: mounts routes
backend/app.ts - Express app → Auth routes: mounts routes
backend/app.ts - Express app → User routes: mounts routes
backend/app.ts - Express app → Google OAuth: initializes
backend/app.ts - Post routes → Post operations: dispatches to
backend/routes/posts.ts - Post routes → Token authorization: applies
backend/routes/posts.ts - Auth routes → Credential sessions: dispatches to
backend/routes/auth.ts - Auth routes → Token authorization: applies
backend/routes/auth.ts - Auth routes → Google OAuth: authenticates with
backend/routes/auth.ts - User routes → User administration: dispatches to
backend/routes/user.ts - User routes → Token authorization: applies
backend/routes/user.ts - Token authorization → User records: loads user
backend/middlewares/auth-middleware.ts - Credential sessions → User records: reads and updates
backend/controllers/auth-controller.ts - User administration → User records: manages users
backend/controllers/user-controller.ts - Google OAuth → User records: finds or creates
backend/config/passport.ts - Post operations → Post records: reads and writes
backend/controllers/posts-controller.ts - Post operations → User records: updates author posts
backend/controllers/posts-controller.ts - Post operations → Post cache helpers: invalidates and stores
backend/controllers/posts-controller.ts - Post cache helpers → Redis cache: uses client
backend/utils/cache-posts.ts - Backend startup → Express app: starts
backend/server.ts - Backend startup → Database connection: connects database
backend/server.ts - Backend startup → Redis cache: connects cache
backend/server.ts