How sujal-github/routeify works
Project Type and Purpose
• This is a full-stack ride-sharing application (“Routeify”) with:
• A React/Redux frontend (mobile-first, responsive UI)
• A Node.js/Express.js backend (REST APIs + Socket.io for real-time)
• MongoDB for persistence (including geospatial queries)
• An external payment service (Razorpay)
• Purpose: Allow passengers to book rides in real time, drivers to accept/manage rides, and display live location updates.
File Structure
• Top-Level Directories:
• frontend/ – React code, Redux store, TailwindCSS, WebSocket context
• backend/ – Express app, MVC structure (controllers, services, models), Socket.io setup, scheduling utility
• tests/ – end-to-end or unit tests
• Backend Pattern:
• server.js & app.js bootstrap the Express app
• routes/* → controllers/* → services/* → models/* (MVC + service layer)
• middlewares/auth.middleware.js for JWT auth
• socket.js for real-time event handling
• Frontend Pattern:
• src/pages/ – page-level components (captain, user flows)
• src/components/ – presentational & container components
• src/actions + src/reducers + store.js – Redux architecture
• src/context/socketContext – WebSocket provider for real-time updates
• Config & Deployment:
• vite.config.js, tailwind.config.js, postcss.config.js
• package.json scripts for dev/build
Key Insights from README
• Real-time tracking via Socket.io
• MongoDB geospatial indexing for optimized matching
• Razorpay integration for secure payments
• Designed for high concurrency (800+ users)
Detail
• Every layer: client UI → Redux → API layer → service layer → data layer.
• Scheduler as a separate worker node if it runs on its own process.
• Real-time event channel (Socket.io), distinct from REST.