{"id":20806072,"url":"https://github.com/olasunkanmi-se/restaurant","last_synced_at":"2025-04-04T14:04:18.438Z","repository":{"id":61157922,"uuid":"545567029","full_name":"olasunkanmi-SE/restaurant","owner":"olasunkanmi-SE","description":"Restaurant Management System is a user-friendly web application that revolutionizes the dining experience by allowing customers to conveniently customize and place their orders directly from their smartphones. Built with NestJs  and React","archived":false,"fork":false,"pushed_at":"2025-01-29T13:03:42.000Z","size":3426,"stargazers_count":169,"open_issues_count":3,"forks_count":35,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-28T13:06:50.749Z","etag":null,"topics":["authorization","ecommerce-application","food-ordering-application","jwt-authentication","mongodb","mongodb-database","nestjs","nestjs-mongoose","order-management-system","postgresql","react","react-typescript","restaurant-app","restaurant-management","state-management","tanstack-react-query","usequery"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olasunkanmi-SE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-10-04T15:43:18.000Z","updated_at":"2025-03-26T01:04:59.000Z","dependencies_parsed_at":"2024-01-19T14:44:17.130Z","dependency_job_id":"8fb32192-d927-4244-b001-f7e326db9a25","html_url":"https://github.com/olasunkanmi-SE/restaurant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olasunkanmi-SE%2Frestaurant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olasunkanmi-SE%2Frestaurant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olasunkanmi-SE%2Frestaurant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olasunkanmi-SE%2Frestaurant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olasunkanmi-SE","download_url":"https://codeload.github.com/olasunkanmi-SE/restaurant/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190226,"owners_count":20898699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authorization","ecommerce-application","food-ordering-application","jwt-authentication","mongodb","mongodb-database","nestjs","nestjs-mongoose","order-management-system","postgresql","react","react-typescript","restaurant-app","restaurant-management","state-management","tanstack-react-query","usequery"],"created_at":"2024-11-17T19:18:03.310Z","updated_at":"2025-04-04T14:04:18.420Z","avatar_url":"https://github.com/olasunkanmi-SE.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Restaurant Management System\n\nThis project is a comprehensive restaurant management system with a NestJS backend and React frontend, designed to streamline restaurant operations and enhance customer experience.\n\nThe system provides functionality for managing menus, orders, restaurants, and customers. It includes features such as user authentication, role-based access control, and real-time order processing.\n\n## Postman Collection\nhttps://documenter.getpostman.com/view/6737031/2sAYQiC8QX#640e3128-ede1-4647-b61e-f059300e7917\n\n## Repository Structure\n\n```\n.\n├── backend/\n│   ├── src/\n│   │   ├── addon/\n│   │   ├── application/\n│   │   ├── audit/\n│   │   ├── cart/\n│   │   ├── category/\n│   │   ├── domain/\n│   │   ├── infrastructure/\n│   │   ├── item/\n│   │   ├── location/\n│   │   ├── menu/\n│   │   ├── order/\n│   │   ├── order_manager/\n│   │   ├── order_notes/\n│   │   ├── order_processing_queue/\n│   │   ├── order_statuses/\n│   │   ├── restaurant/\n│   │   ├── shared/\n│   │   ├── singleclient/\n│   │   └── utils/\n│   ├── test/\n│   ├── nest-cli.json\n│   ├── ormconfig.ts\n│   ├── package.json\n│   └── tsconfig.json\n└── frontend/\n    ├── src/\n    │   ├── apis/\n    │   ├── application/\n    │   ├── components/\n    │   ├── contexts/\n    │   ├── data/\n    │   ├── hooks/\n    │   ├── interfaces/\n    │   ├── models/\n    │   ├── pages/\n    │   ├── reducers/\n    │   └── utility/\n    ├── package.json\n    └── tsconfig.json\n```\n\n## Usage Instructions\n\n### Installation\n\n1. Clone the repository\n2. Install dependencies:\n   ```\n   cd backend \u0026\u0026 npm install\n   cd ../frontend \u0026\u0026 npm install\n   ```\n\n### Running the Application\n\n1. Start the backend server:\n   ```\n   cd backend \u0026\u0026 npm run start:dev\n   ```\n2. Start the frontend development server:\n   ```\n   cd frontend \u0026\u0026 npm run start:dev\n   ```\n\n### API Endpoints\n\n- `/api/restaurants`: CRUD operations for restaurants\n- `/api/menus`: CRUD operations for menus\n- `/api/items`: CRUD operations for menu items\n- `/api/orders`: CRUD operations for orders\n- `/api/singleclients`: User management and authentication\n\n### Authentication\n\nThe system uses JWT for authentication. To access protected routes, include the JWT token in the Authorization header of your requests:\n\n```\nAuthorization: Bearer \u003cyour_jwt_token\u003e\n```\n\n### Testing\n\nRun backend tests:\n\n```\ncd backend \u0026\u0026 npm run test\n```\n\nRun frontend tests:\n\n```\ncd frontend \u0026\u0026 npm run test\n```\n\n## Data Flow\n\n1. User authentication: Users sign in through the frontend, which sends a request to the backend's authentication service.\n2. Restaurant owners create a new restaurant\n4. Menu management: Restaurant owners can create and update menus.\n5. Order processing: Customers place orders through the frontend, which sends the order details to the backend's order service.\n6. Order status updates: The backend processes orders and updates their status, which is then reflected in the frontend in real-time.\n\n```\n[Frontend] \u003c--\u003e [API Gateway] \u003c--\u003e [Backend Services (Auth, Menu, Order, etc.)] \u003c--\u003e [Database]\n```\n\n## Infrastructure\n\nThe backend application uses NestJS and is structured with the following key components:\n\n- AuthModule: Handles user authentication and authorization\n- DocumentDatabaseModule: Configures the MongoDB connection\n- Various repository interfaces and implementations for data access\n\nKey resources:\n\n- MongoDB database (configured in DocumentDatabaseModule)\n- JWT for authentication (configured in AuthModule)\n\n## Troubleshooting\n\n- If you encounter CORS issues, ensure that the backend's CORS settings match your frontend's domain.\n- For database connection issues, verify that the `DATABASE_URL` environment variable is correctly set.\n- If authentication fails, check that the JWT secret keys are properly configured in both the backend and frontend.\n\n##\n\u003cimg width=\"363\" alt=\"Screenshot 2023-06-22 at 10 32 04 AM\" src=\"https://github.com/olasunkanmi-SE/restaurant/assets/60177090/e5602acd-788b-4274-88bf-1b60755da07d\"\u003e\n\n\u003cimg width=\"360\" alt=\"Screenshot 2023-06-22 at 10 49 25 AM\" src=\"https://github.com/olasunkanmi-SE/restaurant/assets/60177090/55685caf-f6a4-4150-a92e-96506b21aca4\"\u003e\n\n\u003cimg width=\"360\" alt=\"Screenshot 2023-06-22 at 10 51 45 AM\" src=\"https://github.com/olasunkanmi-SE/restaurant/assets/60177090/5660845f-81c3-4f5b-b943-113877b592f8\"\u003e\n\n\u003cimg width=\"364\" alt=\"Screenshot 2023-06-22 at 10 53 26 AM\" src=\"https://github.com/olasunkanmi-SE/restaurant/assets/60177090/6ac5c682-d398-4c6a-9f60-6d9979a16c98\"\u003e\n\n\u003cimg width=\"363\" alt=\"Screenshot 2023-06-22 at 10 53 53 AM\" src=\"https://github.com/olasunkanmi-SE/restaurant/assets/60177090/882d5f21-3af2-4b5b-9953-8ccbfa16b2a1\"\u003e\n\n\u003cimg width=\"361\" alt=\"Screenshot 2023-06-22 at 10 54 29 AM\" src=\"https://github.com/olasunkanmi-SE/restaurant/assets/60177090/4dde348e-5a33-49f3-a2ea-4d166394aba1\"\u003e\n\n\u003cimg width=\"359\" alt=\"Screenshot 2023-06-22 at 10 55 07 AM\" src=\"https://github.com/olasunkanmi-SE/restaurant/assets/60177090/f8a4c014-3cec-4c77-9f73-e878b532b6e0\"\u003e\n\n\u003cimg width=\"362\" alt=\"Screenshot 2023-07-25 at 9 21 50 PM\" src=\"https://github.com/olasunkanmi-SE/restaurant/assets/60177090/2905a9c3-9a85-4156-851e-d7df753d3c3b\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folasunkanmi-se%2Frestaurant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folasunkanmi-se%2Frestaurant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folasunkanmi-se%2Frestaurant/lists"}