How aaryan-sd/turfbuddy works
Project type and purpose
• From the file tree and minimal README, this is the backend API for “turfbuddy,” a turf-booking application.
• It uses Node.js with Express, Mongoose (MongoDB), and integrates with Razorpay for payments.
File structure
• Top level
• server.js: entry point that loads Express, routes, DB config, and starts the HTTP server
• config/db.js: MongoDB connection setup
• .env: environment variables (port, DB URI, Razorpay keys, etc.)
• MVC pattern by domain
• routes/: HTTP endpoints organized by resource (auth, user, admin, booking, payment, turfOwner)
• controllers/: business-logic handlers for each route
• models/: Mongoose schemas for User, Admin, Turf, TurfOwner, Booking, Payment
• Integration
• routes/razorpay.js: endpoint for creating/validating payments via Razorpay SDK
Key insights from README
• While the README is almost empty, the file names and folder layout reveal a classic RESTful, layered architecture.
• The core domains are authentication, user management, turf management, bookings, payments, and admin functions.