shivamupadhyay1022/TutorsForum-server — reverse-engineered prompt
Reverse engineered prompt
Build me the server side for a simple tutor booking app. I want two kinds of users, students and tutors, and both should be able to sign up and log in securely. Tutors should be able to create their profile and add the class slots they have available. Students should be able to browse tutors, see open time slots, and book a class.
Please make it a clean API with proper routes, models, controllers, database connection, and basic middleware for things like auth, errors, and request validation. Use a MongoDB database and keep the code organized so it is easy to plug into a React frontend later. I also want booking logic that prevents double booking and only lets students reserve slots that are still open.
Include sensible fields for users, tutor info, slots, and bookings. Add protected endpoints where needed, and make sure role based access is handled properly. If anything is unclear, use the project description as the source of truth and look up current docs online if you need to.
Want more depth? Deep Reverse