How mohithbanka/online-auction-platform works
Online Auction Platform is a buyer/seller marketplace for creating auctions, browsing listings, bidding, and tracking outcomes. Users enter through the React app, which provides role-gated screens and live-update context; the Express server exposes authentication, auction, bid, cart, notification, and user APIs. A timed server task closes expired auctions, records winners, and emits outcome notifications. The README also describes bid history and checkout-related capabilities. Server implementation evidence is sampled only in part, so links from unsampled API modules to specific models are omitted.
Main entry points: App.jsx React app · server.js Express and sockets · AuthContext.jsx Auth context · SocketContext.jsx Live updates
Components 26
Web application
- React app
client/src/App.jsx - Auth context
client/src/context/AuthContext.jsx - Live updates
client/src/context/SocketContext.jsx - Role guard
client/src/components/RequireAuth.jsx - Featured auctions
client/src/pages/Home.jsx - Auction screens
client/src/pages - Create auction
client/src/pages/CreateAuction.jsx - Bid screen
client/src/pages/BidPage.jsx - Bid tracking
client/src/pages/MyBids.jsx - Cart and checkout
client/src/pages/Cart.jsx - Notifications screen
client/src/pages/Notifications.jsx
API and identity
- Express and sockets
server/server.js - Auth API
server/routes/auth.js - User API
server/routes/users.js - User records
server/models/User.js
Auction lifecycle
- Auction API
server/routes/auctions.js - Bid API
server/routes/bids.js - Auction records
server/models/Auction.js - Bid records
server/models/Bid.js
Buyer services
- Cart API
server/routes/cart.js - Cart records
server/models/Cart.js - Notification API
server/routes/notifications.js - Notification records
server/models/Notification.js - Order records
server/models/Order.js
Other components
- Buyer or seller
- MongoDB
Connections 25
- Buyer or seller → React app: uses
- React app → Auth context: provides auth
- React app → Live updates: provides realtime
- React app → Role guard: guards routes
- React app → Featured auctions: routes to
- React app → Auction screens: routes to
- React app → Create auction: routes to
- React app → Bid screen: routes to
- React app → Bid tracking: routes to
- React app → Cart and checkout: routes to
- React app → Notifications screen: routes to
- Featured auctions → Auction API: fetches listings
- Auth context → Auth API: auth requests
- Auth context → User API: wallet request
- Live updates → Express and sockets: opens socket
- Express and sockets → Auth API: mounts API
- Express and sockets → User API: mounts API
- Express and sockets → Auction API: mounts API
- Express and sockets → Bid API: mounts API
- Express and sockets → Cart API: mounts API
- Express and sockets → Notification API: mounts API
- Express and sockets → Auction records: finds expired
- Express and sockets → Notification records: saves winner notice
- Express and sockets → MongoDB: connects
- Express and sockets → Live updates: emits auction events