{"id":21892031,"url":"https://github.com/capellax02/grocery-store-backend","last_synced_at":"2025-10-13T18:33:50.489Z","repository":{"id":261595344,"uuid":"884751309","full_name":"CAPELLAX02/grocery-store-backend","owner":"CAPELLAX02","description":"Backend project for a grocery store application built with Spring Boot, Spring Data MongoDB, Spring Security, and more. The aim of the project is to provide a backend that can be used by iOS, Android, or frontend developers.","archived":false,"fork":false,"pushed_at":"2025-07-15T12:02:20.000Z","size":669,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-16T02:57:50.545Z","etag":null,"topics":["docker","docker-compose","java-mail-sender","jwt","lombok","refresh-token","spring-boot","spring-data-mongodb","thymeleaf"],"latest_commit_sha":null,"homepage":"","language":"Java","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/CAPELLAX02.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":"2024-11-07T10:22:09.000Z","updated_at":"2025-07-15T12:02:24.000Z","dependencies_parsed_at":"2024-11-07T12:26:15.380Z","dependency_job_id":"c554a5da-4f94-47f5-aa67-9a21611a50f4","html_url":"https://github.com/CAPELLAX02/grocery-store-backend","commit_stats":null,"previous_names":["capellax02/grocery-app-backend","capellax02/grocery-store-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CAPELLAX02/grocery-store-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fgrocery-store-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fgrocery-store-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fgrocery-store-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fgrocery-store-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CAPELLAX02","download_url":"https://codeload.github.com/CAPELLAX02/grocery-store-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CAPELLAX02%2Fgrocery-store-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016594,"owners_count":26085852,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["docker","docker-compose","java-mail-sender","jwt","lombok","refresh-token","spring-boot","spring-data-mongodb","thymeleaf"],"created_at":"2024-11-28T12:48:01.969Z","updated_at":"2025-10-13T18:33:50.474Z","avatar_url":"https://github.com/CAPELLAX02.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grocery Store - Backend Project\n\nThis project is a Spring Boot-based backend template designed for frontend and mobile developers to unleash their creativity on the client-side. It provides essential APIs for user authentication, product management, order processing, and more.\n\n---\n\n## Motivation\n\nThe **Grocery Store - Backend Project** aims to simplify the backend setup for developers working on e-commerce applications. By offering a robust API template, this project allows developers to focus on crafting unique user experiences on the frontend while leveraging pre-built, scalable backend features. Key motivations include:\n\n1. Reducing development overhead for client-side teams.\n2. Demonstrating modern backend design best practices.\n3. Providing a ready-to-use API that integrates essential e-commerce functionality.\n\nWhether you're developing a grocery delivery app or exploring backend concepts, this project provides a reliable starting point.\n\n---\n\n## API Documentation\nFor a detailed API reference, you can check out the [API Documentation](docs/GroceryStore_API_Documentation_v1.0.pdf). The API Documentation also includes the **Postman** collection of the whole backend project.\n\n---\n\n## Table of Contents\n\n- [Features](#features)\n- [Technologies Used](#technologies-used)\n- [Setup Instructions](#setup-instructions)\n- [Sample Data](#sample-data)\n- [Environment Variables](#environment-variables)\n- [Contribution](#contribution)\n\n---\n\n## Features\n\n- **Authentication and Authorization**\n    - JWT-based token authentication.\n    - Token refresh mechanism for seamless user sessions.\n\n- **Product Management**\n    - Endpoints to fetch products, view details, and manage reviews.\n\n- **Cart and Wishlist**\n    - APIs to manage shopping carts and user wishlists.\n\n- **Order Processing**\n    - Create and view order details.\n\n- **Email Notifications**\n    - Integrated email service for account activation and password recovery.\n\n- **Dockerized Deployment**\n    - Ready-to-run setup using Docker Compose.\n\n- **Comprehensive API Documentation**\n    - Detailed documentation to help developers utilize the backend effectively.\n\n---\n\n## Technologies Used\n\n- **Spring Boot** for backend framework.\n- **Spring Security** for a robust security infrastructure.\n- **Spring Data MongoDB** for database interactions.\n- **MongoDB** for database.\n- **JWT** for authentication.\n- **Lombok** for reducing boilerplate code.\n- **Thymeleaf** for server-side rendering.\n- **Java Mail Sender** for email functionality.\n- **Docker** for containerization.\n\n---\n\n## Setup Instructions\n\n### Prerequisites\n\n1. Install **Docker** and **Docker Compose**.\n2. Ensure you have **Java 17** and **Maven** installed if running locally.\n\n### Run with Docker\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/CAPELLAX02/grocery-app-backend.git\n   cd grocery-app-backend\n   ```\n\n2. **Start the application with Docker Compose:**\n   ```bash\n   sudo docker compose up -d\n   ```\n\n3. **Access the application:**\n- Base URL of the API will be live on `http://localhost:8080/api/v1`.\n\n---\n\n## Sample Data\n\n- There is a sample `products.json` file in the `/src/main/resources/static` directory. \n- You can import this json file to your MongoDB database via either MongoDB Atlas or MongoDB Compass.\n- Additionally, you can edit all the product fields in the json file before loading the sample data to the database. For example, for better user experience, you can change the dummy `imageURL` links with actual product image URLs. \n \n---\n\n## Environment Variables\n\nThere is a `yml` file named `example.application.yml` in the `src/main/resources` directory. You should change the name of this file as `application.yml`, and change the following environment variables for your convenience:\n\n#### `spring.data.mongodb.uri`: \n- The MongoDB connection URI.\n- Example: `mongodb+srv://username:password@cluster.mongodb.net/database_name`.\n- To set up MongoDB Atlas, [follow this guide](https://www.mongodb.com/products/platform/atlas-database).\n\n#### `spring.data.mongodb.database`: \n- The name of your MongoDB database.\n\n#### `spring.mail.host`: \n- The SMTP host for sending emails. For example, use `smtp.gmail.com` for Gmail.\n\n#### `spring.mail.port`: \n- The SMTP port. For Gmail's SMTP, this is typically `587`.\n\n#### `spring.mail.username`: \n- Your email address used for sending emails.\n\n#### `spring.mail.password`:  \n- The app-specific password generated by your email provider.\n- For Gmail, you can create this password under your Google Account settings `(Security \u003e App Passwords)`.\n\n#### `security.jwt.access-token.secret`: \n- A secret key for signing JWT tokens. \n- You can generate an appropriate jwt secret using:\n- ```bash\n  openssl rand -base64 129 | tr -d '\\n'\n  ```\n\n#### `security.jwt.access-token.expiration`: \n- Access token expiration time in milliseconds. \n- Example: `86400000` for 24 hours.\n\n#### `security.jwt.refresh-token.expiration`: \n- Refresh token expiration time in milliseconds.\n- Example: `604800000` for 7 days.\n\n### Here’s an example `application.yml` configuration:\n```yaml\nspring:\n  \n  # other configurations...\n  \n  data:\n    mongodb:\n      uri: YOUR_MONGODB_URI_WITH_CREDENTIALS/YOUR_DB_NAME\n      database: YOUR_DB_NAME\n      \n  # other configurations...\n  \n  mail:\n    host: smtp.gmail.com\n    port: 587\n    username: your-email@gmail.com\n    password: your-email-app-password\n    \n  # other configurations...\n  \nsecurity:\n  jwt:\n    access-token:\n      secret: YOUR_GENERATED_SECRET\n      expiration: 86400000\n    refresh-token:\n      expiration: 604800000\n      \n# other configurations...\n```\n\n---\n\n## Contribution\n\nWe welcome contributions to make this project even better. Here's how you can contribute:\n\n1. **Fork the repository:**\n\n- Click the **\"Fork\"** button on the top-right corner of this page.\n- Clone your forked repository:\n\n  ```bash\n  git clone https://github.com/your-username/grocery-app-backend.git\n  cd grocery-app-backend\n  ```\n\n2. **Create a new branch for your changes:**\n-\n  ```bash\n  git checkout -b feature/your-feature-name\n  ```\n\n3. **Make your changes and commit them:**\n-\n  ```bash\n  git add .\n  git commit -m \"Add your message here\"\n  ```\n\n4. **Push your changes to your fork:**\n-\n  ```bash\n  git push origin feature/your-feature-name\n  ```\n\n5. **Submit a Pull Request:**\n\n- Open a pull request from your feature branch to the main repository.\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapellax02%2Fgrocery-store-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapellax02%2Fgrocery-store-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapellax02%2Fgrocery-store-backend/lists"}