{"id":26250571,"url":"https://github.com/zn-rabby/recyclemart-server","last_synced_at":"2026-04-07T21:31:17.838Z","repository":{"id":280071837,"uuid":"940691091","full_name":"zn-rabby/ReCycleMart-Server","owner":"zn-rabby","description":"SecondHand is a web application designed to facilitate the buying and selling of used items. Users can post listings, browse products, and communicate securely with sellers. The platform provides a seamless and secure experience for all users.","archived":false,"fork":false,"pushed_at":"2025-03-13T13:24:18.000Z","size":304,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T14:30:03.309Z","etag":null,"topics":["bycrypt","express","jwt","mondodb","mongoose","node","sslcommerz","typescript"],"latest_commit_sha":null,"homepage":"https://secondhand-client.vercel.app/","language":"TypeScript","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/zn-rabby.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":"2025-02-28T16:11:23.000Z","updated_at":"2025-03-13T13:24:21.000Z","dependencies_parsed_at":"2025-03-13T14:40:20.427Z","dependency_job_id":null,"html_url":"https://github.com/zn-rabby/ReCycleMart-Server","commit_stats":null,"previous_names":["zn-rabby/secondhand-server","zn-rabby/recyclemart-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zn-rabby%2FReCycleMart-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zn-rabby%2FReCycleMart-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zn-rabby%2FReCycleMart-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zn-rabby%2FReCycleMart-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zn-rabby","download_url":"https://codeload.github.com/zn-rabby/ReCycleMart-Server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243437969,"owners_count":20290864,"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":["bycrypt","express","jwt","mondodb","mongoose","node","sslcommerz","typescript"],"created_at":"2025-03-13T16:19:53.488Z","updated_at":"2025-12-28T22:04:45.213Z","avatar_url":"https://github.com/zn-rabby.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ReCycleMart 🛒\n\nSecondHand is a web application designed to facilitate the buying and selling of used items. Users can post listings, browse products, and communicate securely with sellers. The platform provides a seamless and secure experience for all users.\n\n---\n\n## Live Deployment\n\n- **Frontend(Live)**: [https://secondhand-client.vercel.app/](https://secondhand-client.vercel.app/)\n- **Backend**: [https://second-hand-server-puce.vercel.app](https://second-hand-server-puce.vercel.app)\n\n---\n\n## Features\n\n### User Features\n\n- **User Authentication**: Secure login system using email/phone number and password.\n- **User Dashboard**:\n  - Post items for sale with descriptions, images, pricing, and categories.\n  - Manage listings (update, delete).\n  - Track sales and purchases.\n  - Edit personal details.\n  - Save items to a wishlist.\n- **Listings \u0026 Search**:\n  - Search and filter items by category, price, condition, and location.\n  - Mark items as sold after a sale.\n- **Communication \u0026 Transactions (Optional)**:\n  - Messaging system for buyers and sellers.\n  - Order management for tracking purchases and sales.\n\n### Admin Features (Optional)\n\n- **User Management**: Ban/unban users.\n- **Listing Management**: Delete inappropriate listings.\n\n---\n\n## Tech Stack\n\n### Frontend\n\n- **Next.js**: For server-side rendering (SSR) and static site generation (SSG).\n- **TypeScript**: For type safety and better code quality.\n\n### Backend\n\n- **Express.js**: For building the REST API.\n- **MongoDB**: For storing user and product data.\n- **JWT**: For secure authentication.\n- **bcrypt**: For password hashing.\n\n### Deployment\n\n- **Frontend**: Vercel, Netlify.\n- **Backend**: Vercel, Railway.\n\n---\n\n## Installation and Setup\n\n### Prerequisites\n\n- Node.js (v16 or higher)\n- MongoDB Atlas or local MongoDB instance\n- Git\n\n### Steps to Run the Project\n\n1. **Clone the Repository**:\n\n   ```bash\n   git clone https://github.com/zn-rabby/SecondHand-Server.git\n   cd SecondHand-Server\n   ```\n\n2. **Install Dependencies**:\n\n   ```bash\n   npm install\n   ```\n\n3. **Set Up Environment Variables**:\n   Create a `.env` file in the root directory and add the following variables:\n\n   ```env\n   PORT=5000\n   MONGODB_URI=your_mongodb_connection_string\n   JWT_SECRET=your_jwt_secret_key\n   ```\n\n4. **Run the Backend Server**:\n\n   ```bash\n   npm start\n   ```\n\n5. **Frontend Setup**:\n\n   - Clone the frontend repository (if separate).\n   - Install dependencies and start the frontend server.\n\n6. **Access the Application**:\n   - Open your browser and navigate to `http://localhost:3000` for the frontend.\n\n---\n\n## API Endpoints\n\n### Authentication\n\n- `POST /auth/register` – Register a new user.\n- `POST /auth/login` – User login.\n- `POST /auth/logout` – Logout user.\n\n### Listings\n\n- `GET /listings` – Retrieve all available listings.\n- `GET /listings/:id` – Retrieve details of a specific listing.\n- `POST /listings` – Create a new product listing.\n- `PUT /listings/:id` – Update listing details.\n- `DELETE /listings/:id` – Remove a listing.\n\n### User Management\n\n- `GET /users/:id` – Retrieve user details.\n- `PUT /users/:id` – Update user profile.\n- `DELETE /users/:id` – Delete user account.\n\n### Transactions \u0026 Purchases\n\n- `GET /purchases/:userId` – Fetch purchase history.\n- `GET /sales/:userId` – Fetch sales history.\n- `POST /transactions` – Create a new transaction.\n- `PUT /transactions/:id` – Update transaction status.\n\n### Admin (Optional)\n\n- `PUT /users/:id/ban` – Ban/unban a user.\n- `DELETE /listings/:id` – Delete a listing.\n\n### Messages (Optional)\n\n- `POST /messages` – Send a message.\n- `GET /messages/:userId` – Retrieve user messages.\n\n---\n\n## Database Schema\n\n### Users Collection\n\n- `name`: String\n- `email`: String (unique)\n- `phone number`: String\n- `password`: String (hashed)\n- `role`: String (default: \"user\")\n\n### Listings Collection\n\n- `title`: String\n- `description`: String\n- `price`: Number\n- `condition`: String\n- `images`: Array of Strings\n- `userID`: ObjectId (reference to Users Collection)\n- `status`: String (default: \"available\")\n\n### Transactions Collection\n\n- `buyerID`: ObjectId (reference to Users Collection)\n- `sellerID`: ObjectId (reference to Users Collection)\n- `itemID`: ObjectId (reference to Listings Collection)\n- `status`: String (default: \"pending\")\n\n### Messages Collection (Optional)\n\n- `senderID`: ObjectId (reference to Users Collection)\n- `receiverID`: ObjectId (reference to Users Collection)\n- `message`: String\n- `timestamp`: Date\n\n---\n\n## UI/UX Design Considerations\n\n- **Responsive Design**: Mobile-friendly layout.\n- **Modern UI/UX**: Simple navigation, clear CTAs, and intuitive interface.\n- **User-friendly Forms**: Easy-to-use forms for posting listings, searching, and communication.\n\n---\n\n## Additional Features\n\n- **Email Notifications**:\n  - For buyers: When a seller responds to their inquiry.\n  - For sellers: When they receive a new inquiry.\n- **Role-Based Access Control**: Buyers and sellers have equal access; optional admin role for moderation.\n\n---\n\n## Contribution Guidelines\n\n- Fork the repository and create a new branch for your feature/bugfix.\n- Follow the coding standards and best practices.\n- Submit a pull request with a detailed description of your changes.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\n## Contact\n\nFor any queries or feedback, feel free to reach out:\n\n- **Name**: Zulkar Naeem Rabby\n- **Email**: zn.rabby@gmail.com\n- **GitHub**: [zn-rabby](https://github.com/zn-rabby)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzn-rabby%2Frecyclemart-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzn-rabby%2Frecyclemart-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzn-rabby%2Frecyclemart-server/lists"}