{"id":24308837,"url":"https://github.com/hamidfarmani/springboot-modular-template","last_synced_at":"2026-05-18T05:41:13.066Z","repository":{"id":271440168,"uuid":"913463808","full_name":"hamidfarmani/springboot-modular-template","owner":"hamidfarmani","description":"A cookiecutter template for bootstrapping modular spring boot projects.","archived":false,"fork":false,"pushed_at":"2025-01-07T18:32:53.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-08T13:44:19.080Z","etag":null,"topics":["apigateway","authservice","configserver","discovery-service","java","springboot","template"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hamidfarmani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-01-07T18:25:33.000Z","updated_at":"2025-01-07T18:35:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"06eeece0-2078-48c0-a87a-b64cae87f2d0","html_url":"https://github.com/hamidfarmani/springboot-modular-template","commit_stats":null,"previous_names":["hamidfarmani/springboot-modular-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hamidfarmani/springboot-modular-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidfarmani%2Fspringboot-modular-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidfarmani%2Fspringboot-modular-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidfarmani%2Fspringboot-modular-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidfarmani%2Fspringboot-modular-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamidfarmani","download_url":"https://codeload.github.com/hamidfarmani/springboot-modular-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidfarmani%2Fspringboot-modular-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33166614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"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":["apigateway","authservice","configserver","discovery-service","java","springboot","template"],"created_at":"2025-01-17T05:11:43.406Z","updated_at":"2026-05-18T05:41:13.027Z","avatar_url":"https://github.com/hamidfarmani.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cookiecutter Template for Modular Spring Boot Projects\n\nThis repository contains a Cookiecutter template for bootstrapping modular Spring Boot projects. It simplifies the process of setting up a project with features like Eureka Discovery, API Gateway, Config Server, Auth service with JWT and more. The template is customizable and designed to save time when creating new projects.\n\n---\n\n## What is Cookiecutter?\n\n[Cookiecutter](https://cookiecutter.readthedocs.io/) is a command-line tool that creates projects from templates. It allows you to define variables and logic in your template, making it easy to generate tailored project structures.\n\n---\n\n## Features\n\n- Modular project setup with:\n    - **Config Service**: Centralized configuration using Spring Config.\n    - **Discovery Service**: Service discovery using Eureka.\n    - **API Gateway**: A gateway for routing requests.\n    - **Auth Service**: A microservice that does registration and login based on JWT and Spring Security.\n- Automated Git initialization.\n\n---\n\n## Prerequisites\n\n1. **Install Cookiecutter**: You can follow the instructions [here](https://cookiecutter.readthedocs.io/en/stable/installation.html) to install Cookiecutter. For example, using pip:\n   ```bash\n   pip install cookiecutter\n   ```\n\n   Make sure Python is installed on your system before running the command.\n\n2. **Java Development Kit (JDK)**: Ensure JDK is installed. Recommended version: `21`.\n3. **Maven**: Install Apache Maven for managing dependencies and builds.\n\n---\n\n## How to Use the Template\n\n### Step 1: Generate a New Project\n\nRun the following command to generate a project:\n\n```bash\ncookiecutter https://github.com/hamidfarmani/springboot-modular-template\n```\n\nYou will be prompted to provide details like:\n- Project name\n- Package name\n- Java version\n- Modules to include (e.g., Config Server, API Gateway, Discovery Service)\n\n### Step 2: Navigate to the Project Directory\n\n```bash\ncd \u003cyour_project_name\u003e\n```\n\n### Step 3: Build the Project\n\nUse Maven to build the project:\n\n```bash\nmvn clean install\n```\n\n### Step 4: Run the Services\n\nYou can run each module individually. For example:\n\n```bash\ncd config-service\nmvn spring-boot:run\n```\n\nRepeat for other modules like `discovery-service` or your sample microservice.\n\n---\n\n## Repository Structure\n\n```plaintext\n├── {{cookiecutter.project_name}}/\n│   ├── config-service/          # Config Server module\n│   ├── discovery-service/       # Eureka Discovery module\n│   ├── api-gateway/             # API Gateway module\n│   ├── pom.xml                  # Parent POM for the modular project\n│   └── README.md                # Documentation for the generated project\n├── cookiecutter.json            # Variables for the template\n└── hooks/                       # Pre- and post-generation scripts\n    ├── pre_gen_project.py       # Pre-generation checks and validations\n    └── post_gen_project.py      # Post-generation tasks (e.g., Git setup)\n```\n\n---\n\n## Customization\n\n### Modify Template Variables\n\nTo adjust the template, edit the `cookiecutter.json` file. For example:\n\n```json\n{\n  \"project_name\": \"my-new-project\",\n  \"package_name\": \"com.example.project\",\n  \"java_version\": \"21\",\n  \"spring_boot_version\": \"3.4.1\",\n  \"include_discovery_service\": \"y\",\n  \"include_api_gateway\": \"n\"\n}\n```\n\n### Add New Modules\n\nTo add new modules, create a new folder in the template and define its structure. Update the `cookiecutter.json` file and parent `pom.xml` to include the new module.\n\n---\n\n## Contributing\n\nContributions are welcome! If you have ideas to improve the template, feel free to open an issue or submit a pull request.\n\n---\n\n## License\n\nThis repository is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamidfarmani%2Fspringboot-modular-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamidfarmani%2Fspringboot-modular-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamidfarmani%2Fspringboot-modular-template/lists"}