RamakrushnaBiswal / PlayCafe

it a cafe website🚀
https://play-cafe.vercel.app/
MIT License
4 stars 19 forks source link

Restructure Project to Add Backend in Express (MVC Architecture) #35

Open samar12-rad opened 20 hours ago

samar12-rad commented 20 hours ago

Describe the feature

@RamakrushnaBiswal, The current project structure is solely focused on the frontend. To accommodate the development of backend routes as outlined in Issues #33 and #30 , we need to restructure the project to include a backend layer built using Express.js, following a Model-View-Controller (MVC) architecture.

Proposed Changes:

Create a new directory: Create a new directory named backend at the project's root level. Initialize Express.js: Within the backend directory, initialize a new Express.js application using npm init express or a similar command. Implement MVC Structure: Models: Create a models directory within backend to store JavaScript files representing data objects (e.g., User.js, Product.js). These models will interact with the database to retrieve and store data. Controllers: Create a controllers directory within backend to house JavaScript files containing functions that handle incoming requests, process data using models, and render appropriate responses (e.g., UserController.js, ProductController.js). Routes: Define routes in an routes directory within backend to map HTTP methods (GET, POST, PUT, DELETE) to specific controller functions.

Add ScreenShots

image

Record

github-actions[bot] commented 20 hours ago

Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊

You can also check our CONTRIBUTING.md for guidelines on contributing to this project. for more information join our discord https://discord.gg/Jh3bWQ7FRN

RamakrushnaBiswal commented 6 hours ago

@samar12-rad assigned