diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..4b9e2081 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,73 @@ +# Dependencies +node_modules +*/node_modules +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Environment files +.env +.env.local +.env.development.local +.env.test.local +.env.production.local +*/.env* + +# IDE files +.vscode +.idea +*.swp +*.swo +*~ + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Git +.git +.gitignore +README.md + +# Testing +coverage +.nyc_output +*/coverage +*/test +*/tests + +# Logs +logs +*.log +*/logs +*/*.log + +# Docker files +Dockerfile +.dockerignore +docker-compose.yml +docker-compose.*.yml + +# Documentation +*.md +docs/ + +# Cache directories +.cache +.parcel-cache +*/.cache + +# Build artifacts +dist/ +build/ +*/dist +*/build + +# Temporary folders +tmp/ +temp/ \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..67ccbbb1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,48 @@ +--- +name: "π Bug Report" +about: "Report a bug to help improve the project" +title: "π : " +labels: "" +assignees: "" + +--- + +### π Have You Searched Existing Issues? + +- [ ] I have searched the existing issues to avoid duplicates + +--- + +### π Describe the Bug +What is happening and what should happen instead? + +--- + +### βΆοΈ Steps to Reproduce +1. Go to '...' +2. Click on '...' +3. Scroll to '...' +4. See error + +--- + +### β Expected Behavior +What should have happened? + +--- + +### πΌοΈ Screenshots (If applicable) +Add screenshots to help explain the issue. + +--- + +### π Additional Context +Any other details that might help. + +--- + +### π Contributor Checklist + +- [ ] I agree to follow this project's Code of Conduct +- [ ] I am a GSSOC'25 contributor +- [ ] I want to work on this issue \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/custom_issue.md b/.github/ISSUE_TEMPLATE/custom_issue.md new file mode 100644 index 00000000..928eae02 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/custom_issue.md @@ -0,0 +1,59 @@ +--- +name: "βοΈ Custom Issue" +about: "Submit a custom issue or suggestion" +title: 'βοΈ :' +labels: '' +assignees: '' + +--- + +Thank you for submitting a custom issue for **Foodie**! +This template is intended for any requests or suggestions that don't fit into the bug report, feature request, or documentation categories. + +--- + +### π Have You Searched Existing Issues? + +- [ ] I have searched the existing issues to avoid duplicates + +--- + +### π Issue Summary +Provide a short summary of the custom issue. +_Example: Enhancement suggestion for the search functionality._ + +--- + +### π Issue Description +Describe the issue or suggestion in detail. +Include any relevant context, use case, or scenario where this issue occurs or is important. + +--- + +### π‘ Proposed Solution (Optional) +If you have any ideas or suggestions for solving this issue, describe them here. + +--- + +### π Category +_Select the category that best describes the issue:_ + +- [ ] Enhancement +- [ ] Refactor +- [ ] Security +- [ ] Design +- [ ] Other + +--- + +### π Additional Context (Optional) +Add any other context, links, screenshots, or information that might be relevant. + +--- + +### π Contributor Checklist (Optional) + +- [ ] I have searched existing issues to avoid duplicates +- [ ] I agree to follow this project's Code of Conduct +- [ ] I am a GSSOC'25 contributor +- [ ] I want to work on this issue \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/documentation_update.md b/.github/ISSUE_TEMPLATE/documentation_update.md new file mode 100644 index 00000000..d9ea02a2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation_update.md @@ -0,0 +1,31 @@ +--- +name: "π Documentation Update" +about: "Suggest updates or improvements to documentation" +title: "π : " +labels: "" +assignees: "" + +--- + +### π Have You Searched Existing Issues? + +- [ ] I have searched the existing issues to avoid duplicates + +--- + +### π What's wrong with the existing documentation? +Describe what needs to be fixed, added, or removed. + +--- + +### π Supporting Material +Attach screenshots, videos, or links that help explain your documentation update. + +--- + +### π Contributor Checklist + +- [ ] I have reviewed the existing documentation +- [ ] I agree to follow this project's Code of Conduct +- [ ] I am a GSSOC'25 contributor +- [ ] I want to work on this issue \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..bd40367c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,46 @@ +--- +name: "β¨ Feature Request" +about: "Suggest a new feature or enhancement" +title: "β¨ : " +labels: "" +assignees: "" + +--- + +### π Have You Searched Existing Issues? + +- [ ] I have searched the existing issues to avoid duplicates + +--- + +### π‘ Problem Description +What problem are you facing that this feature would solve? + +--- + +### β Proposed Solution +Describe the feature you'd like to see added. + +--- + +### π Alternatives Considered +Are there other ways you thought about solving this? + +--- + +### πΌοΈ Screenshots or Diagrams (Optional) +Attach visuals or examples to support your idea. + +--- + +### π Additional Context +Include any additional information, links, or references. + +--- + +### π Contributor Checklist + +- [ ] I have checked for similar feature requests +- [ ] I agree to follow this project's Code of Conduct +- [ ] I am a GSSOC'25 contributor +- [ ] I want to work on this issue \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/performance_issue.md b/.github/ISSUE_TEMPLATE/performance_issue.md new file mode 100644 index 00000000..66c2619b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/performance_issue.md @@ -0,0 +1,40 @@ +--- +name: "β‘ Performance Issue" +about: "Report a performance slowdown or bottleneck" +title: "β‘: " +labels: "" +assignees: "" + +--- + +### π Have You Searched Existing Issues? + +- [ ] I have searched the existing issues to avoid duplicates + +--- + +### π Describe the Performance Issue +What is slow or lagging? When does it happen? + +--- + +### π§ͺ Environment Details +OS, browser, device, version, etc. + +--- + +### π Steps to Reproduce +Explain how someone else can experience this issue. + +--- + +### π Logs / Screenshots (Optional) +Paste logs or upload visuals that show the issue. + +--- + +### π Contributor Checklist + +- [ ] I agree to follow this project's Code of Conduct +- [ ] I want to work on this issue +- [ ] I am a GSSOC'25 contributor \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 00000000..0aa8415c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,29 @@ +--- +name: "β Question / Help" +about: "Ask a question or request support" +title: "β: " +labels: "" +assignees: "" + +--- + +### π Have You Searched Existing Issues for the same Question? + +- [ ] I have searched the existing issues to avoid duplicates + +--- + +### π§ What's Your Question? +Be specific so others can help you quickly. + +--- + +### π Context +Include screenshots, links, or any other relevant info. + +--- + +### π Contributor Checklist + +- [ ] I have searched existing issues +- [ ] I agree to follow this project's Code of Conduct \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/ui_ux_suggestion.md b/.github/ISSUE_TEMPLATE/ui_ux_suggestion.md new file mode 100644 index 00000000..c84a734d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ui_ux_suggestion.md @@ -0,0 +1,32 @@ +--- +name: "π¨ UI/UX Suggestion" +about: "Propose improvements to UI or user experience" +title: "π¨ : " +labels: "" +assignees: "" +--- + +Suggest improvements for the user interface or experience. + +--- + +### πΌοΈ Current UI/UX Behavior +Describe how the interface currently behaves or looks. + +--- + +### β¨ Suggested Improvement +What would you like to change or add? + +--- + +### π Screenshots / Visual Aids +Mockups or screenshots help others understand your suggestion. + +--- + +### π Contributor Checklist + +- [ ] I agree to follow this project's Code of Conduct +- [ ] I am a GSSOC'25 contributor +- [ ] I want to work on this issue diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..475e8672 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,55 @@ +## π Pull Request Summary + +`A short description of the changes you're making. +Example: +Fixed a bug where the food items can be deleted.` + + +## π οΈ Type of Change + +Please select options that are relevant to your pull request + +- [ ] π Bug fix +- [ ] β¨ New feature +- [ ] π§Ή Code refactor +- [ ] π§ͺ Tests added/updated +- [ ] π Documentation update +- [ ] π Performance improvement +- [ ] π§ Other (please describe): + +## π Related Issue + +Closes #[issue-number] + + + + +## β Checklist + +Please confirm the following before submitting: + +- [ ] I have **tested** my changes locally +- [ ] I have run `npm run dev` or similar to check code style +- [ ] I have updated documentation (if necessary) +- [ ] My code follows the projectβs coding conventions +- [ ] I have merged the latest `main` or `dev` branch +- [ ] I have performed a **self-review** of my own code. +- [ ] My changes **generate** no new warnings or errors. +- [ ] I have **commented** my code, especially in hard-to-understand areas +- [ ] I have **linked the related issue** + + + +## πΈ Screenshots (if applicable) + + +* Add before/after screenshots or UI changes. + + + +--- +## π§ Additional Notes + +- Anything else you want the reviewer to know. + + diff --git a/.gitignore b/.gitignore index da619ebd..0fe9db90 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ node_modules/ dist dist-ssr *.local +package-lock.json # Editor directories and files .vscode/* @@ -27,3 +28,6 @@ dist-ssr .env */ENV .env.* +# Ignore uploaded files from multer +/backend/uploads + diff --git a/.vite/deps/_metadata.json b/.vite/deps/_metadata.json new file mode 100644 index 00000000..9f54dc44 --- /dev/null +++ b/.vite/deps/_metadata.json @@ -0,0 +1,8 @@ +{ + "hash": "8c22f5da", + "configHash": "f7f324f3", + "lockfileHash": "e3b0c442", + "browserHash": "2d425869", + "optimized": {}, + "chunks": {} +} \ No newline at end of file diff --git a/.vite/deps/package.json b/.vite/deps/package.json new file mode 100644 index 00000000..3dbc1ca5 --- /dev/null +++ b/.vite/deps/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/.vite/deps/vercel.json b/.vite/deps/vercel.json new file mode 100644 index 00000000..6a926487 --- /dev/null +++ b/.vite/deps/vercel.json @@ -0,0 +1,5 @@ +{ + "rewrites": [ + { "source": "/(.*)", "destination": "/" } + ] +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..effb56f1 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,129 @@ +# π€ Contributor Covenant Code of Conduct + +## β¨ Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. ππ¬ + +## β Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## π‘οΈ Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## π Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## π© Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +π§ email. + +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## π Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1οΈβ£ Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2οΈβ£ Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3οΈβ£ Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4οΈβ£ Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## π Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..acfc9d52 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,70 @@ +## π§βπ» Contributing + +Welcome! π +We're excited you're here and interested in contributing to **Foodie**, a simple and helpful MERN Project. + +This project is in its early stage β so **youβre welcome to help build it from the ground up!** + +> **First time here?** +> π Start with [LEARN.md](./LEARN.md) β your fast track to understanding Foodieβs structure and contributions! +--- + +### π Getting Started + +1. **Fork the repo** +2. **Clone your fork** + + ```bash + git clone https://github.com/YOUR-USERNAME/Foodie.git + cd Foodie + ``` +3. **Create a new branch** + + ```bash + git checkout -b my-feature + ``` +4. **Start coding!** Edit files, add features, fix bugs. +5. **Commit and push** + + ```bash + git commit -m "Add: my feature" + git push origin my-feature + ``` +6. **Open a Pull Request** on the main repository + +--- + +### π What Can You Work On? + +Since the project is new, feel free to contribute: + +* π§± UI improvements (card design, filters, responsiveness) +* ποΈ JSON-based data structure improvements +* π Search and tag filters +* π Theme switcher +* π₯ Upload form (simulated) +* π Bug fixes +* π Documentation and tutorials + +Weβll also add `good first issue` and `help wanted` labels as the project evolves. + +--- + +### π Guidelines + +* Keep code clean and readable +* Use meaningful commit messages +* Comment your code when needed +* Respect the [Code of Conduct](CODE_OF_CONDUCT.md) + +--- + +### π Need Help? + +If you're stuck or unsure, feel free to open an issue or ask in a discussion. We're here to help! + +--- + +Letβs build something useful and open together. π‘ +Happy coding! + diff --git a/LEARN.md b/LEARN.md new file mode 100644 index 00000000..a7ac78ae --- /dev/null +++ b/LEARN.md @@ -0,0 +1,448 @@ +# β¨ππ LEARN.md β The Ultimate Guide to the Foodie Codebase ππβ¨ + +## Table of Contents ππΊοΈπ + +1. [Project Overview](#1-project-overview-) +2. [High-Level Architecture](#2-high-level-architecture-) +3. [Tech Stack Breakdown](#3-tech-stack-breakdown-) +4. [Folder-by-Folder Deep Dive](#4-folder-by-folder-deep-dive-) +5. [Contributor Pathways](#5-contributor-pathways-) +6. [Getting Started (Setup & Dev)](#6-getting-started-setup--dev-) +7. [Feature How-Tos (Front, Back, Admin, Chatbot)](#7-feature-how-tos-front-back-admin-chatbot-) +8. [API Documentation](#8-api-documentation-) +9. [Debugging, Testing, and Best Practices](#9-debugging-testing-and-best-practices-) +10. [Advanced Learning Resources](#10-advanced-learning-resources-) +11. [FAQ](#11-faq-) + +--- + +## 1. Project Overview π§βπ³π¦π‘ + +**Foodie** is a modern, open-source, full-stack food ordering application with a focus on scalability, modularity, and real-world learning. π½οΈππ οΈ It provides: + +* A rich user-facing web app (frontend) +* A robust backend API (Node.js/Express) +* A dedicated admin panel +* Containerized, OSS-friendly workflows + +Foodie aims to bridge the gap between beginner contributions and real-world production code, making it a playground for developers who want to upskill and ship. πβ‘π― + +**Live Demo:** [Coming Soon] | **Staging:** [Coming Soon] + +--- + +## 2. High-Level Architecture ποΈπ₯οΈπ§ + +```mermaid +graph TD; + A[Frontend User] -->|REST/API| C[Backend API] + B[Admin Panel] -->|REST/API| C + C -->|DB Connection| D[(Database)] + C -->|File Storage| E[Uploads/Images] + C -->|Integration| F[Chatbot Module] + C -->|Authentication| G[JWT/Auth] + C -->|Email Service| H[Email Notifications] +``` + +**Key Flows:** πββοΈππ + +* **Frontend & Admin** communicate with backend via REST APIs +* **Backend** handles business logic, database operations, file uploads, and chatbot integration +* **Docker Compose** manages orchestration for local development and deployment +* **Authentication** flows through JWT tokens for secure access + +--- + +## 3. Tech Stack Breakdown π₯οΈπ οΈπ + +| Layer | Tech | +| ------------ | --------------------------------------------------------------- | +| Frontend | Vite + React 18+ | +| Backend | Node.js 18+, Express.js 4+ | +| Admin | Vite + React 18+ | +| Database | MongoDB with Mongoose ODM | +| Authentication| JWT, bcrypt | +| File Storage | Multer (local), Cloudinary (production) | +| Container | Docker, Docker Compose | +| Linting | ESLint, Prettier | +| Testing | Jest, React Testing Library | +| Others | Chatbot integration, Nodemailer, Socket.io | + +*Want to confirm versions? Check `package.json` files in each folder!* π€πποΈ + +--- + +## 4. Folder-by-Folder Deep Dive πππ + +### `/frontend` π¦πποΈ + +* **Purpose:** User-facing web application +* **Key Files:** + * `src/components/`: Reusable React components + * `src/pages/`: Main application pages + * `src/hooks/`: Custom React hooks + * `src/utils/`: Helper functions and utilities + * `src/api/`: API service functions + * `src/context/`: React Context providers + * `public/`: Static assets + * `index.html`: SPA entry point + * `package.json`: Dependencies & scripts + * `CHATBOT_FEATURE.md`: Guide to the built-in chatbot + +* **Pro Tips:** + * Use Vite for fast dev server and builds + * Follow component composition patterns + * Implement proper error boundaries + * Use environment variables for API endpoints + +### `/backend` π οΈπ§ π‘ + +* **Purpose:** API server, business logic, database operations +* **Key Files:** + * `server.js`: Application entry point + * `routes/`: API endpoint definitions + * `controllers/`: Business logic handlers + * `models/`: Database schemas (Mongoose) + * `middlewares/`: Authentication, validation, error handling + * `utils/`: Helper functions + * `config/`: Database and environment configuration + * `uploads/`: Local file storage + * `tests/`: API tests + +* **Pro Tips:** + * Follow MVC architecture pattern + * Use async/await consistently + * Implement proper error handling + * Add comprehensive API documentation + +### `/admin` π©βπΌπποΈ + +* **Purpose:** Administrative dashboard for restaurant management +* **Key Files:** + * Similar structure to frontend + * `src/components/admin/`: Admin-specific components + * `src/pages/dashboard/`: Dashboard views + * `src/services/`: Admin API services + +* **Pro Tips:** + * Implement role-based access control + * Create intuitive data visualization + * Test all CRUD operations thoroughly + +### `/images`, `/uploads` πΌοΈππΈ + +* Store static images, menu pictures, and user uploads +* Configured in `.gitignore` to exclude from version control +* Use cloud storage (Cloudinary) for production + +### `.github/` πβοΈπ + +* GitHub Actions workflows for CI/CD +* Issue and PR templates +* Contributing guidelines + +--- + +## 5. Contributor Pathways ππ£π± + +### How to pick your journey: + +| Contributor Type | Start Here | Skills Needed | +| -------------------- | --------------------------------------------- | -------------------- | +| Frontend Developer | `/frontend`, UI/UX issues | React, CSS, API integration | +| Backend Developer | `/backend`, API endpoints, database | Node.js, Express, MongoDB | +| Admin Dashboard Dev | `/admin`, management features | React, data visualization | +| Chatbot/AI Dev | `CHATBOT_FEATURE.md`, integration | API integration, NLP | +| DevOps/Docker | Docker configs, deployment | Docker, CI/CD | +| QA/Testing | Test coverage, bug fixes | Jest, testing frameworks | +| Documentation | README updates, API docs | Technical writing | +| Full Stack | Cross-component features | Multiple technologies | + +### Finding issues: π·οΈπβ¨ + +* Look for labels: `good first issue`, `help wanted`, `documentation`, `bug` +* Check the project board for prioritized tasks +* Ask maintainers for guidance in discussions +* Review closed PRs for contribution examples + +--- + +## 6. Getting Started (Setup & Dev) πββοΈπ»β© + +### Prerequisites +* Node.js 18+ and npm/yarn +* Docker and Docker Compose (recommended) +* Git +* MongoDB (if running locally) + +### Quick Start + +1. **Clone the repository** + ```bash + git clone https://github.com/yourusername/Foodie.git + cd Foodie + ``` + +2. **Docker Setup (Recommended)** + ```bash + # Copy environment files + cp .env.example .env + cp frontend/.env.example frontend/.env + cp backend/.env.example backend/.env + + # Start all services + docker-compose up --build + ``` + + **Access Points:** + - Frontend: http://localhost:3000 + - Backend API: http://localhost:5000 + - Admin Panel: http://localhost:3001 + - Database: localhost:27017 + +3. **Manual Setup (Development)** + + **Backend:** + ```bash + cd backend + npm install + npm run dev # Uses nodemon for auto-reload + ``` + + **Frontend:** + ```bash + cd frontend + npm install + npm run dev # Vite dev server + ``` + + **Admin:** + ```bash + cd admin + npm install + npm run dev + ``` + +4. **Environment Configuration** + ```bash + # Backend .env + NODE_ENV=development + PORT=5000 + MONGODB_URI=mongodb://localhost:27017/foodie + JWT_SECRET=your_jwt_secret_here + + # Frontend .env + VITE_API_URL=http://localhost:5000/api + VITE_SOCKET_URL=http://localhost:5000 + ``` + +--- + +## 7. Feature How-Tos (Front, Back, Admin, Chatbot) π§©π¨π + +### πΉ **Frontend Development** + +**Adding a new component:** +```javascript +// src/components/NewComponent.jsx +import React from 'react'; +import './NewComponent.css'; + +const NewComponent = ({ prop1, prop2 }) => { + return ( +
Add Items
+List Items
+Orders
+