{"id":20783549,"url":"https://github.com/aburaihan32/shopgrid-server-side","last_synced_at":"2026-04-10T01:55:36.617Z","repository":{"id":253425610,"uuid":"843460318","full_name":"AbuRaihan32/ShopGrid-server-side","owner":"AbuRaihan32","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-17T14:09:22.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T09:30:18.807Z","etag":null,"topics":["cors","doten","expressjs","mongodb","node"],"latest_commit_sha":null,"homepage":"https://shop-grid-server-side.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/AbuRaihan32.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-08-16T15:05:01.000Z","updated_at":"2024-08-18T09:32:14.000Z","dependencies_parsed_at":"2024-08-16T17:01:22.700Z","dependency_job_id":"c1f20635-bc9a-4ee4-ad31-b7b53035921f","html_url":"https://github.com/AbuRaihan32/ShopGrid-server-side","commit_stats":null,"previous_names":["aburaihan32/shopgrid-server-side"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbuRaihan32%2FShopGrid-server-side","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbuRaihan32%2FShopGrid-server-side/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbuRaihan32%2FShopGrid-server-side/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbuRaihan32%2FShopGrid-server-side/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbuRaihan32","download_url":"https://codeload.github.com/AbuRaihan32/ShopGrid-server-side/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243125564,"owners_count":20240276,"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":["cors","doten","expressjs","mongodb","node"],"created_at":"2024-11-17T14:20:27.867Z","updated_at":"2025-12-26T02:09:03.098Z","avatar_url":"https://github.com/AbuRaihan32.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shopGrid - Server Side\n\n## Project Overview\nThis is the server-side repository for the **shopGrid** web application. The backend is developed using **Node.js**, **Express.js**, and **MongoDB**. It manages product data with features like filtering, pagination, and product counting. The server communicates with a frontend hosted on Firebase.\n\n## Features\n- **Product Filtering**: Fetch products based on search text, brand, category, and price range.\n- **Pagination**: Efficient loading of products with page navigation.\n- **Product Count**: API endpoint to get the total number of products in the database.\n\n## Installation Instructions\n\n1. **Clone the Repository**:\n    ```bash\n    git clone https://github.com/AbuRaihan32/ShopGrid-server-side.git\n    cd \u003crepository-folder\u003e\n    ```\n\n2. **Install Dependencies**:\n    ```bash\n    npm install\n    ```\n\n3. **Set Up Environment Variables**:\n    Create a `.env` file in the root of your project with the following variables:\n    ```env\n    PORT=5000\n    USER_DB=ShopGrid\n    PASS_DB=fIocDX2z2Wi2O1Qc\n    ```\n\n## Running the Server\n\n1. **Start the Development Server**:\n    ```bash\n    npm start\n    ```\n   The server will run on `http://localhost:5000` by default.\n\n2. **Access API Endpoints**:\n   - **Get Products**: `GET /products`\n     - Query Parameters:\n       - `page`: Page number for pagination (default: 0).\n       - `size`: Number of products per page (default: 10).\n       - `searchText`: Search term to filter products by name.\n       - `brand`: Filter by brand name.\n       - `category`: Filter by category.\n       - `min`: Minimum price for filtering.\n       - `max`: Maximum price for filtering.\n     - Example: `GET /products?page=1\u0026size=10\u0026searchText=laptop\u0026brand=Apple\u0026category=Electronics\u0026min=500\u0026max=1500`\n   - **Get Product Count**: `GET /productCount`\n     - Returns the total number of products in the database.\n\n## Database Setup\n\n- **Database Connection**:\n  The server connects to a MongoDB database using the connection string provided in the `.env` file. Ensure that your MongoDB credentials are correct and that the database `ShopGridDB` is available.\n\n- **Dummy Data**:\n  Insert at least 40 products manually into the MongoDB collection `products` or create an API to insert the data.\n\n## Deployment\n\n- **Deploying to a Cloud Platform**:\n  - Ensure the environment variables are set up in the cloud platform's environment settings.\n  - Deploy the code to the platform (e.g., Heroku, Vercel) and start the server.\n\n## Contributing\n\nContributions are welcome! Please follow these guidelines:\n- Write clear, concise commit messages.\n- Adhere to coding standards and best practices.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Contact Information\n\nFor any questions or feedback, feel free to reach out:\n\n- **Name**: Abu Raihan Mahfuz\n- **Email**: abumahfuz3211@gmail.com\n- **GitHub**: [AbuRaihan32](https://github.com/AbuRaihan32)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faburaihan32%2Fshopgrid-server-side","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faburaihan32%2Fshopgrid-server-side","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faburaihan32%2Fshopgrid-server-side/lists"}