{"id":22859521,"url":"https://github.com/saam-rgb/trailed-v2","last_synced_at":"2026-04-09T17:03:25.968Z","repository":{"id":266194066,"uuid":"890138125","full_name":"saam-rgb/Trailed-v2","owner":"saam-rgb","description":"Trailed is a e-commerce application built using the MERN stack (MongoDB, Express.js, React, and Node.js). This project is designed to provide users with a seamless shopping experience while offering admins a secure platform to manage inventory efficiently.","archived":false,"fork":false,"pushed_at":"2025-01-20T16:00:13.000Z","size":55676,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T08:21:20.064Z","etag":null,"topics":["admin-panel","bcrypt","cors","dotenv","ecommerce-website","express-js","firebase-auth","firebase-google-authentication","javascript","jwt-token","mern-ecommerce","mongodb-atlas","mongoose","morgan-middleware","nodejs","react","rest-api","tailwindcss","vite"],"latest_commit_sha":null,"homepage":"https://trailed-v2.vercel.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/saam-rgb.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}},"created_at":"2024-11-18T03:48:01.000Z","updated_at":"2025-01-20T16:00:14.000Z","dependencies_parsed_at":"2025-01-20T17:29:53.294Z","dependency_job_id":null,"html_url":"https://github.com/saam-rgb/Trailed-v2","commit_stats":null,"previous_names":["saam-rgb/trailed-v2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saam-rgb/Trailed-v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saam-rgb%2FTrailed-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saam-rgb%2FTrailed-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saam-rgb%2FTrailed-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saam-rgb%2FTrailed-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saam-rgb","download_url":"https://codeload.github.com/saam-rgb/Trailed-v2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saam-rgb%2FTrailed-v2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265887366,"owners_count":23844389,"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":["admin-panel","bcrypt","cors","dotenv","ecommerce-website","express-js","firebase-auth","firebase-google-authentication","javascript","jwt-token","mern-ecommerce","mongodb-atlas","mongoose","morgan-middleware","nodejs","react","rest-api","tailwindcss","vite"],"created_at":"2024-12-13T09:07:13.100Z","updated_at":"2025-12-30T19:04:21.463Z","avatar_url":"https://github.com/saam-rgb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trailed: MERN Stack Project\n\n## Overview\n\nTrailed is a luggage, backpack and duffle e-commerce application built using the MERN stack (MongoDB, Express.js, React, and Node.js). This project is designed to provide users with a seamless shopping experience while offering admins a secure platform to manage inventory efficiently.\n\n## Features\n\n### User Features\n\n- **Product Browsing**: Explore a wide range of available bags.\n- **Cart Management**: Add or remove items easily from the cart.\n- **Checkout System**: Place orders securely with a cash-on-delivery option.\n- **User Authentication**: Secure login and registration using Firebase.\n- **Google Authentication**: Easy login using Google OAuth via Firebase.\n- **Private Routes**: Restrict access to checkout and order display pages for non-logged-in users.\n\n### Admin Features\n\n- **Admin Dashboard**: Accessible with secure authentication, allowing admins to manage the platform.\n  - **Pages in Dashboard**:\n    1. Home\n    2. Add Bag\n    3. Edit Bag\n    4. Manage Bags/Display Bags\n    5. Admin Login\n- **Product Management**: Upload new products, update existing product details, and delete products.\n- **Inventory Management**: Keep track of stock levels and ensure availability.\n- **Secure Admin Routes**: Admin dashboard access is restricted to users with admin rights.\n\n## Technologies Used\n\n### Frontend\n\n- **React**: For building a dynamic and responsive user interface.\n- **Tailwind CSS**: To style the application with minimal effort.\n- **Redux \u0026 RTK Query Toolkit**: For state management and API calls.\n- **Firebase**: For user authentication and Google OAuth.\n\n### Backend\n\n- **Node.js**: As the runtime environment.\n- **Express.js**: For building the RESTful API.\n- **Nodemon**: For development server auto-restart.\n\n### Database\n\n- **MongoDB**: For storing and managing data.\n\n### Additional Libraries \u0026 Tools\n\n- **JWT (JSON Web Tokens)**: For secure authentication.\n- **Bcrypt**: For encrypting passwords.\n- **Mongoose**: For object data modelling (ODM) with MongoDB.\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/saam-rgb/Trailed-v2.git\n   ```\n\n2. Navigate to the project directory:\n\n   ```bash\n   cd Trailed-v2\n   ```\n\n3. Install dependencies for both client and server:\n\n   ```bash\n   cd client\n   npm install\n\n   cd ../server\n   npm install\n   ```\n\n4. Set up environment variables:\n\n   - Create a `.env` file in the `server` directory and add the following:\n     ```env\n     PORT=5001\n     MONGO_URI=your_mongo_db_connection_string\n     JWT_SECRET=your_jwt_secret\n     ```\n   - Create a `.env.local` file in the `client` directory and add the Firebase details:\n     ```env\n     VITE_FIREBASE_API_KEY=your_firebase_api_key\n     VITE_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain\n     VITE_FIREBASE_PROJECT_ID=your_firebase_project_id\n     VITE_FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket\n     VITE_FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id\n     VITE_FIREBASE_APP_ID=your_firebase_app_id\n     ```\n\n5. Run the application:\n\n   ```bash\n   # Start the backend server\n   cd server\n   npm run dev\n\n   # Start the frontend server\n   cd ../client\n   npm run dev\n   ```\n\n6. Open your browser and navigate to `http://localhost:5173` to access the application.\n\n## Folder Structure\n\n### Frontend\n\n- **src/components**: Reusable React components.\n- **src/pages**: Page-level components.\n- **src/context**: React context for global state management.\n- **src/routers**: App routing configuration.\n- **src/utils**: Utility functions.\n- **assets**: Images of bags.\n- **public**: Static images and assets.\n- **.env.local**: Environment variables for Firebase configuration.\n\n#### Pages:\n\n1. Login\n2. Register\n3. Home/Product\n4. Single Product Page\n5. Orders Display Page\n6. Cart Page\n7. Checkout Page\n\n### Backend\n\n- **bags**: Contains routes, controllers, and models for bag-related operations.\n- **user**: Handles user-related functionalities with routes, controllers, and models.\n- **admin**: Admin-specific routes, controllers, and models.\n- **orders**: Manages order-related functionalities with routes, controllers, and models.\n- **middlewares**: Authentication and error handling.\n- **utils**: Utility functions.\n\n## APIs\n\n### User Routes\n\n- **POST** `/api/users/login`: Authenticate user.\n- **POST** `/api/users/register`: Register a new user.\n- **GET** `/api/products`: Fetch all products.\n- **POST** `/api/orders`: Place an order.\n\n### Admin Routes\n\n- **POST** `/api/admin/login`: Admin authentication and return JWT.\n- **POST** `/api/admin/products`: Add a new product.\n- **PUT** `/api/admin/products/:id`: Update product details.\n- **DELETE** `/api/admin/products/:id`: Delete a product.\n\n## Future Enhancements\n\n- Implement payment gateway for online transactions.\n- Add order tracking functionality.\n- Introduce user reviews and ratings for products.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaam-rgb%2Ftrailed-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaam-rgb%2Ftrailed-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaam-rgb%2Ftrailed-v2/lists"}