{"id":26412859,"url":"https://github.com/detivenc/springtemplatedockerized","last_synced_at":"2025-10-24T02:29:45.449Z","repository":{"id":235661368,"uuid":"770615697","full_name":"DeTiveNC/SpringTemplateDockerized","owner":"DeTiveNC","description":"A simple web service template for creating an SpringBoot+PostgreSQL+Docker+JWT app","archived":false,"fork":false,"pushed_at":"2024-12-02T18:56:03.000Z","size":177,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-02T19:45:24.361Z","etag":null,"topics":["docker","java","jpa-hibernate","jwt","kubernetes","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/DeTiveNC.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":"2024-03-11T21:16:35.000Z","updated_at":"2024-12-02T18:56:06.000Z","dependencies_parsed_at":"2024-04-24T06:41:13.210Z","dependency_job_id":"6adb246a-0bd3-49b7-bf3a-28d939c9fe57","html_url":"https://github.com/DeTiveNC/SpringTemplateDockerized","commit_stats":null,"previous_names":["detivenc/springtemplatedockerized"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeTiveNC%2FSpringTemplateDockerized","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeTiveNC%2FSpringTemplateDockerized/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeTiveNC%2FSpringTemplateDockerized/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeTiveNC%2FSpringTemplateDockerized/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeTiveNC","download_url":"https://codeload.github.com/DeTiveNC/SpringTemplateDockerized/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244117670,"owners_count":20400744,"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":["docker","java","jpa-hibernate","jwt","kubernetes","spring-boot"],"created_at":"2025-03-17T22:09:39.834Z","updated_at":"2025-10-24T02:29:45.437Z","avatar_url":"https://github.com/DeTiveNC.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://skillicons.dev\"\u003e\n    \u003cimg src=\"https://skillicons.dev/icons?i=git,githubactions,kubernetes,docker,gradle,postgres,spring,kotlin\u0026perline=8\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eSpring Boot, Docker, and Kubernetes Template\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  A ready-to-use, containerized Spring Boot application template for rapid development and deployment.\n  \u003cbr/\u003e\n  \u003cbr/\u003e\n  \u003ca href=\"https://github.com/DeTiveNC/SpringTemplateDockerized/issues\"\u003eReport Bug\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/DeTiveNC/SpringTemplateDockerized/issues\"\u003eRequest Feature\u003c/a\u003e\n\u003c/p\u003e\n\n\n  ![Contributors](https://img.shields.io/github/contributors/DeTiveNC/SpringTemplateDockerized?color=dark-green)\n  ![Forks](https://img.shields.io/github/forks/DeTiveNC/SpringTemplateDockerized?style=social)\n  ![Stargazers](https://img.shields.io/github/stars/DeTiveNC/SpringTemplateDockerized?style=social)\n  ![Issues](https://img.shields.io/github/issues/DeTiveNC/SpringTemplateDockerized)\n  ![License](https://img.shields.io/github/license/DeTiveNC/SpringTemplateDockerized)\n  [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/DeTiveNC/SpringTemplateDockerized)\n\n## About The Project\n\nThis project provides a solid foundation for building and deploying Spring Boot applications. It comes pre-configured with Docker for containerization, PostgreSQL as the database, and Kubernetes for orchestration. It's designed to help you get your web service up and running quickly, with a focus on modern development practices.\n\n### Features\n\n*   **Spring Boot:** The latest version for building robust Java and Kotlin applications.\n*   **Docker:** Containerize your application for consistent environments and easy scaling.\n*   **PostgreSQL:** A powerful, open-source object-relational database system.\n*   **Kubernetes:** Pre-configured for deploying your application to a K8s cluster.\n*   **JWT Authentication:** Secure your endpoints with JSON Web Tokens.\n*   **Gradle:** A powerful build automation tool.\n\n### Built With\n\n*   [Spring Boot](https://spring.io/projects/spring-boot)\n*   [Kotlin](https://kotlinlang.org/)\n*   [Gradle](https://gradle.org/)\n*   [Docker](https://www.docker.com/)\n*   [PostgreSQL](https://www.postgresql.org/)\n*   [Kubernetes](https://kubernetes.io/)\n\n## Getting Started\n\nFollow these steps to get a local copy of the project up and running.\n\n### Prerequisites\n\n*   Docker\n*   JDK 17 or later\n\n### Installation\n\n1.  **Clone the repo**\n    ```sh\n    git clone https://github.com/DeTiveNC/SpringTemplateDockerized.git\n    ```\n2.  **Build the project**\n    Use the Gradle wrapper to build the project and create the JAR file.\n    ```sh\n    ./gradlew build\n    ```\n3.  **Run with Docker Compose**\n    This will start the application and the PostgreSQL database.\n    ```sh\n    docker-compose up\n    ```\n\n## Usage\n\nThis application provides both a web interface using Vaadin and REST API endpoints for authentication and user management.\n\n### Web Interface (Vaadin)\n\nOnce the application is running, you can access the Vaadin web interface:\n\n1. **Login Page**: Navigate to `http://localhost:8080/login`\n   - Enter your email address and password\n   - Click **\"Login\"** to authenticate with existing credentials\n   - Click **\"Register\"** to create a new user account\n   - Upon successful authentication, a JWT token will be displayed in a notification\n\nThe web interface provides a user-friendly way to:\n- Register new user accounts\n- Login with existing credentials\n- View JWT tokens for API access\n\n### REST API Endpoints\n\nThe application also exposes the following API endpoints for programmatic access:\n\n*   **Register a new user:**\n    `POST /api/auth/register`\n    \u003cbr\u003e\n    Request body:\n    ```json\n    {\n      \"email\": \"user@example.com\",\n      \"password\": \"password\"\n    }\n    ```\n    Response:\n    ```json\n    {\n      \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\"\n    }\n    ```\n\n*   **Login:**\n    `POST /api/auth/login`\n    \u003cbr\u003e\n    Request body:\n    ```json\n    {\n      \"email\": \"user@example.com\",\n      \"password\": \"password\"\n    }\n    ```\n    Response:\n    ```json\n    {\n      \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\"\n    }\n    ```\n\n*   **Health Check:**\n    `GET /health`\n\n### Getting Started with Authentication\n\n1. **Start the application** using Docker Compose:\n   ```sh\n   docker-compose up\n   ```\n\n2. **Access the web interface** at `http://localhost:8080/login`\n\n3. **Register a new user** by entering an email and password, then clicking \"Register\"\n\n4. **Login** with your credentials to receive a JWT token\n\n5. **Use the JWT token** in the `Authorization: Bearer \u003ctoken\u003e` header for protected API endpoints\n\nYou can use the web interface for easy interaction, or use tools like `curl` or Postman to interact directly with the REST API.\n\n## Deployment\n\nTo deploy the application, you can build and push the Docker image to a container registry.\n\n1.  **Build the Docker image**\n    ```sh\n    docker compose build\n    ```\n2.  **Push the Docker image**\n    Make sure to tag the image with your registry's username and a tag.\n    ```sh\n    docker push \u003cyour-username\u003e/java-app:\u003ctag-name\u003e\n    ```\n\n## Kubernetes\n\nThis project includes a `k8s` directory with Kubernetes manifests to deploy the application. You can use a tool like [Minikube](https://minikube.sigs.k8s.io/docs/) to run a local Kubernetes cluster.\n\nThe manifests were generated using [Kompose](https://kompose.io/), which translates Docker Compose files into Kubernetes resources.\n\n## Contributing\n\nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1.  Fork the Project\n2.  Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3.  Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4.  Push to the Branch (`git push origin feature/AmazingFeature`)\n5.  Open a Pull Request\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n## Authors\n\n*   **Nicolas Cao** - *Comp Eng Student* - [Nicolas Cao](https://github.com/detivenc) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdetivenc%2Fspringtemplatedockerized","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdetivenc%2Fspringtemplatedockerized","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdetivenc%2Fspringtemplatedockerized/lists"}