{"id":29013261,"url":"https://github.com/jahidhasansabbir/share-bitez-client","last_synced_at":"2026-04-10T06:35:58.305Z","repository":{"id":301132881,"uuid":"1008182404","full_name":"jahidhasansabbir/share-bitez-client","owner":"jahidhasansabbir","description":"Share Bitez is a full-stack food-sharing app that connects donors and recipients to reduce food waste. Built with React, Node.js, MongoDB \u0026 Firebase Auth. Features include auth, food listings, request system \u0026 secure RESTful API.","archived":false,"fork":false,"pushed_at":"2025-06-25T09:27:55.000Z","size":831,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T10:41:00.392Z","etag":null,"topics":["daisy-ui","express-js","firebase","jwt","mongodb","react","react-router","tailwindcss"],"latest_commit_sha":null,"homepage":"https://share-bitez.web.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jahidhasansabbir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-25T06:46:06.000Z","updated_at":"2025-06-25T09:27:58.000Z","dependencies_parsed_at":"2025-06-25T10:41:13.843Z","dependency_job_id":"a1cfc202-9541-49b3-8ef6-7876c12969e2","html_url":"https://github.com/jahidhasansabbir/share-bitez-client","commit_stats":null,"previous_names":["jahidhasansabbir/share-bitez-client"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jahidhasansabbir/share-bitez-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahidhasansabbir%2Fshare-bitez-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahidhasansabbir%2Fshare-bitez-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahidhasansabbir%2Fshare-bitez-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahidhasansabbir%2Fshare-bitez-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jahidhasansabbir","download_url":"https://codeload.github.com/jahidhasansabbir/share-bitez-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jahidhasansabbir%2Fshare-bitez-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261937078,"owners_count":23232852,"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":["daisy-ui","express-js","firebase","jwt","mongodb","react","react-router","tailwindcss"],"created_at":"2025-06-25T19:10:35.287Z","updated_at":"2025-12-30T20:06:43.945Z","avatar_url":"https://github.com/jahidhasansabbir.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍱 Share Bitez - Food Sharing \u0026 Surplus Reduction Platform\n\n🔗 **Live Site**: [https://share-bitez.web.app/](https://share-bitez.web.app/)\n\n## 📜 Project Purpose\n\n**Share Bitez** is a community-driven food sharing platform built to reduce food waste by connecting donors with surplus food to individuals in need. It allows users to post available food, request it, and manage their shared or requested items. This full-stack project uses **React**, **Firebase**, **Node.js**, **MongoDB**, and implements features like JWT authentication, protected routes, and responsive UI/UX.\n\n---\n## Important Note\n\n\u003e **Issue:** The site **does not work properly in incognito mode** due to JWT authentication token storage limitations in some browsers' private sessions. This is a known JWT-related issue affecting private browsing modes.\n\n\n## 🧩 Features Implemented\n\n### 🔐 Authentication (Firebase):\n- Email/Password login with validation\n- Google login\n- Password rules enforced (uppercase, lowercase, 6+ chars)\n- Logout \u0026 user profile shown in navbar\n- Redirects to login if not authenticated\n- Firebase config secured with `.env`\n\n### 📱 Pages \u0026 Routing:\n- **Home**:\n  - Catchy Banner with Framer Motion animation\n  - **Featured Foods** (top 6 by quantity)\n  - **How it Works** section\n  - **Success Story** section\n- **Available Foods**:\n  - All available food cards\n  - View Details (protected route)\n  - Sorting by Expiry Date\n  - Search by Food Name\n  - 3-column ↔ 2-column toggle layout\n- **Food Details**:\n  - Shows all info\n  - \"Request Food\" modal\n  - Food status changes to `requested` on submission\n- **Add Food** (Private):\n  - Adds new food with form: name, image, quantity, donor info, etc.\n- **Manage My Foods** (Private):\n  - View own added foods in table\n  - Update/Delete buttons\n  - Update opens in a separate route\n- **My Food Requests** (Private):\n  - Shows all foods requested by the logged-in user in table format\n- **Authentication**:\n  - Login/Register forms with validation\n  - Redirect on login/logout\n- **Extras**:\n  - Custom 404 page\n  - Loading screen\n  - Framer Motion animation\n  - SweetAlert for success/error messages\n\n---\n\n## 🧪 Bonus Functionalities\n\n- ✅ TanStack React Query (for fetch + mutation)\n- ✅ Axios Secure Custom Hook (`useAxiosSecure`)\n- ✅ Layout toggle button (3 ↔ 2 columns)\n- ✅ JWT-based API protection\n- ✅ Extra homepage sections\n- ✅ Error page for unknown routes\n- ✅ Responsive on all devices (mobile, tablet, desktop)\n\n---\n\n## 🛠️ Tech Stack\n\n### Frontend\n- React\n- React Router\n- Tailwind CSS\n- Framer Motion\n- Firebase Authentication\n- Axios\n- TanStack React Query\n- SweetAlert2\n\n### Backend\n- Node.js\n- Express.js\n- MongoDB\n- JWT\n- CORS\n- Dotenv\n\n---\n\n## 📦 Dependencies\n\nThis project uses the following core libraries and tools:\n\n| Package                      | Version     | Description                                                                 |\n|-----------------------------|-------------|-----------------------------------------------------------------------------|\n| `@tailwindcss/vite`         | ^4.1.8      | Tailwind CSS integration for Vite projects                                 |\n| `@tanstack/react-query`     | ^5.80.2     | Powerful data fetching \u0026 caching for React apps                            |\n| `axios`                     | ^1.9.0      | Promise-based HTTP client for API requests                                 |\n| `clsx`                      | ^2.1.1      | Utility for constructing conditional `className` strings                    |\n| `daisyui`                   | ^5.0.43     | Tailwind CSS plugin for pre-styled UI components                           |\n| `firebase`                  | ^11.8.1     | Firebase SDK for authentication and other services                         |\n| `motion`                    | ^12.16.0    | Animation library (likely Framer Motion or similar)                        |\n| `react`                     | ^19.1.0     | Core React library for building UIs                                        |\n| `react-dom`                 | ^19.1.0     | React DOM renderer                                                          |\n| `react-router`              | ^7.6.1      | Declarative routing for React apps                                         |\n| `sweetalert2`               | ^11.22.0    | Beautiful, responsive, customizable popup alerts                           |\n| `swiper`                    | ^11.2.8     | Modern touch slider component                                               |\n| `tailwindcss`               | ^4.1.8      | Utility-first CSS framework for styling                                    |\n\n---\n\n---\n\n## 🧰 Installation \u0026 Setup Guide\n\n### 1. Clone the Repository\n\n```bash\ngit https://github.com/jahidhasansabbir/share-bitez-client.git\ncd share-bitez-client\n```\n\n### 2. Install Dependencies\n\nMake sure you have Node.js installed, then run:\n\n```bash\nnpm install\n```\n\n### 3. Create `.env.local` File\n\nAt the root of your project, create a `.env.local` file and add the following Firebase environment variables:\n\n```env\nVITE_apiKey=your_api_key\nVITE_authDomain=your_auth_domain\nVITE_projectId=your_project_id\nVITE_storageBucket=your_storage_bucket\nVITE_messagingSenderId=your_messaging_sender_id\nVITE_appId=your_app_id\n```\n\n\u003e ⚠️ **Important:** Do not commit `.env.local` to version control. Make sure it is listed in your `.gitignore` file.\n\n### 4. Run the Application Locally\n\nStart the development server:\n\n```bash\nnpm run dev\n```\n\nThen open your browser and visit:\n\n[http://localhost:5173](http://localhost:5173)  \n(or the port provided in your terminal)\n\n---\n\n## 🧰 Backend Setup Guide\n\n🔗 **Backend Server:** [share-bitez-server](https://github.com/jahidhasansabbir/share-bitez-server)\n\n### 1. Clone the Repository\n\n```bash\ngit https://github.com/jahidhasansabbir/share-bitez-server.git\ncd share-bitez-server\n```\n\n### 2. Install Dependencies\n\nMake sure you have Node.js installed, then run:\n\n```bash\nnpm install\n```\n\n### 3. Create `.env` File\n\nAt the root of your backend project, create a .env file and add the following:\n\n```env\nURI = your_mongodb_connection_string\nSECRET_KEY = your_secret_key\n```\n\n\u003e ⚠️ **Important:** Never expose real credentials in your code or public repositories. Ensure .env is listed in .gitignore so it is not tracked by Git.\n\n### 4. Start the Server\n\nRun the backend server:\n\n```bash\nnodemon index.js\n```\nYour backend should now be running, typically at:\n\n[http://localhost:4000](http://localhost:4000)\n\u003e **Important:** Make sure nodemon is install globally in your machine.\n\n---\n\n\nThank you for visiting! 🎉\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjahidhasansabbir%2Fshare-bitez-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjahidhasansabbir%2Fshare-bitez-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjahidhasansabbir%2Fshare-bitez-client/lists"}