{"id":27796499,"url":"https://github.com/hendisantika/customer-sample","last_synced_at":"2025-07-02T01:34:59.342Z","repository":{"id":288682759,"uuid":"968471969","full_name":"hendisantika/customer-sample","owner":"hendisantika","description":"Customer Sample using Spring Boot Tailwind CSS \u0026 Thymeleaf","archived":false,"fork":false,"pushed_at":"2025-06-22T23:15:26.000Z","size":4894,"stargazers_count":1,"open_issues_count":1,"forks_count":20,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-22T23:25:39.725Z","etag":null,"topics":["h2","h2-database","jib","jib-maven-plugin","k8s","k8s-cluster","k8s-deployment","kubernetes","kubernetes-cluster","mysql","spring-boot"],"latest_commit_sha":null,"homepage":"https://cloudraya.jvm.my.id/","language":"HTML","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/hendisantika.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":"2025-04-18T06:24:06.000Z","updated_at":"2025-05-25T07:17:51.000Z","dependencies_parsed_at":"2025-04-19T09:56:11.952Z","dependency_job_id":"b994aea9-72ab-4cf3-94cd-3d9723cdbaa7","html_url":"https://github.com/hendisantika/customer-sample","commit_stats":null,"previous_names":["hendisantika/customer-sample"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hendisantika/customer-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendisantika%2Fcustomer-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendisantika%2Fcustomer-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendisantika%2Fcustomer-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendisantika%2Fcustomer-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hendisantika","download_url":"https://codeload.github.com/hendisantika/customer-sample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendisantika%2Fcustomer-sample/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263060935,"owners_count":23407596,"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":["h2","h2-database","jib","jib-maven-plugin","k8s","k8s-cluster","k8s-deployment","kubernetes","kubernetes-cluster","mysql","spring-boot"],"created_at":"2025-04-30T20:59:02.668Z","updated_at":"2025-07-02T01:34:59.317Z","avatar_url":"https://github.com/hendisantika.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot Thymeleaf Sample\n\nThis is a sample project demonstrating the use of **Spring Boot** with **Thymeleaf** for building a simple web\napplication. The application manages a list of customers, allowing users to perform CRUD (Create, Read, Update, Delete)\noperations.\n\n## Features\n\n- **Spring Boot** for backend development.\n- **Thymeleaf** for server-side rendering of HTML templates.\n- **Tailwind CSS** for responsive and modern UI design.\n- **H2** in-memory database for storing customer data.\n- **Docker Compose** for containerized application setup.\n- **Kubernetes** and **Skaffold** for cloud-native deployment.\n\n## Prerequisites\n\n- Java 17 or higher\n- Maven 3.8+\n- Docker (optional, for containerized deployment)\n- Kubernetes cluster (optional, for Kubernetes deployment)\n- Skaffold (optional, for Kubernetes development workflow)\n\n## Getting Started\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/hendisantika/spring-boot-thymeleaf-sample2.git\ncd spring-boot-thymeleaf-sample2\n```\n\n2. Database Setup\n   The application uses H2 in-memory database by default, so no additional setup is required.\n   The database configuration can be found in `src/main/resources/application.yml`.\n\n3. Build and Run the Application\n\n   **Option 1: Run with Maven**\n    ```shell\n    mvn clean install\n    mvn clean spring-boot:run\n    ```\n\n   **Option 2: Run with Docker**\n    ```shell\n    mvn clean package\n    docker-compose up -d\n    ```\n\n   When running with Docker, the `customer-photos` directory is mounted as a volume to persist photos outside the\n   container. This ensures that uploaded customer photos are accessible from the web application.\n\n   **Option 3: Run with Kubernetes and Skaffold**\n    ```shell\n    mvn clean package\n    skaffold run\n    ```\n\n   For development with hot-reload:\n    ```shell\n    skaffold dev\n    ```\n\n   When running with Kubernetes, the application will be deployed to your Kubernetes cluster according to the manifests\n   in the `k8s` directory.\n\n   The application will be available at http://localhost:8081 (or through your Kubernetes cluster's ingress if\n   configured).\n\n   For detailed instructions on deploying to a Kubernetes cluster in a VPS environment,\n   see [KUBERNETES_DEPLOYMENT.md](KUBERNETES_DEPLOYMENT.md).\n\n   **Option 4: Continuous Deployment with GitHub Actions**\n\n   This project includes a GitHub Actions workflow that automatically builds, pushes, and deploys the application to a\n   Kubernetes cluster when changes are pushed to the main branch.\n\n   For detailed instructions on setting up continuous deployment to Kubernetes with GitHub Actions,\n   see [GITHUB_ACTIONS_K8S_DEPLOYMENT.md](GITHUB_ACTIONS_K8S_DEPLOYMENT.md).\n\n### Application Endpoints\n\n1. Home Page: `/` - Displays the list of customers.\n2. Add Customer: `/create` - Form to add a new customer.\n3. View Customer: `/customer/{id}` - View details of a specific customer.\n4. Edit Customer: `/customer/{id}/edit` - Edit details of a specific customer.\n5. Delete Customer: `/customer/{id}/delete` - Delete a specific customer.\n\n### Technologies Used\n\n1. Java 17\n2. Spring Boot 3.x\n3. Thymeleaf\n4. Tailwind CSS\n5. H2 Database\n6. Docker Compose\n7. Kubernetes\n8. Skaffold\n\n### Project Structure\n\n`src/main/java` - Contains the Java source code.\n`src/main/resources/templates` - Thymeleaf templates for the UI.\n`src/main/resources/application.yml` - Configuration file for the application.\n`Dockerfile` - Docker configuration for building the application image.\n`docker-compose.yml` - Docker Compose configuration for running the application with volume mounts.\n`k8s/deployment.yaml` - Kubernetes Deployment manifest.\n`k8s/service.yaml` - Kubernetes Service manifest.\n`skaffold.yaml` - Skaffold configuration for Kubernetes development workflow.\n\n### Screenshots\n\n#### Home Page\nDisplays the list of customers with options to view, edit, or delete.\n\n![Home Page](img/list.png \"list page\")\n\n#### Add Customer\nForm to add a new customer.\n\n![Add Customer](img/home.png \"Add Customer\")\n\n![Add Customer](img/add.png \"Add Customer\")\n\n#### View Customer\nDisplays detailed information about a specific customer.\n\n![View Customer](img/edit.png \"View Customer\")\n\n### License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n### Author\nDeveloped by Hendi Santika.\nhttps://s.id/hendisantika\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhendisantika%2Fcustomer-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhendisantika%2Fcustomer-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhendisantika%2Fcustomer-sample/lists"}