{"id":22979439,"url":"https://github.com/hakimamarullah/tasks-management-samir","last_synced_at":"2026-04-11T14:02:54.208Z","repository":{"id":242063787,"uuid":"808439417","full_name":"hakimamarullah/tasks-management-samir","owner":"hakimamarullah","description":"Task Management API","archived":false,"fork":false,"pushed_at":"2024-06-15T09:56:32.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T09:15:41.194Z","etag":null,"topics":["docker","docker-compose","mysql","springboot","springboot3"],"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/hakimamarullah.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-05-31T04:35:02.000Z","updated_at":"2024-06-15T09:56:35.000Z","dependencies_parsed_at":"2024-05-31T13:01:58.799Z","dependency_job_id":"80ecdd6d-16a5-4e4a-9b7f-09c8fb768e32","html_url":"https://github.com/hakimamarullah/tasks-management-samir","commit_stats":null,"previous_names":["hakimamarullah/tasks-management-samir"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hakimamarullah/tasks-management-samir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakimamarullah%2Ftasks-management-samir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakimamarullah%2Ftasks-management-samir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakimamarullah%2Ftasks-management-samir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakimamarullah%2Ftasks-management-samir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hakimamarullah","download_url":"https://codeload.github.com/hakimamarullah/tasks-management-samir/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakimamarullah%2Ftasks-management-samir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274536172,"owners_count":25303780,"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-09-10T02:00:12.551Z","response_time":83,"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","mysql","springboot","springboot3"],"created_at":"2024-12-15T01:31:10.776Z","updated_at":"2025-12-30T21:25:50.014Z","avatar_url":"https://github.com/hakimamarullah.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot Application with MySQL using Docker Compose\n\nThis project demonstrates how to run a Spring Boot application with MySQL using Docker Compose.\n\n## Prerequisites\n\n- Docker\n- Docker Compose\n\n## Getting Started\n\n1. Clone the repository:\n\n   ```sh\n   git clone https://github.com/hakimamarullah/tasks-management-samir\n   ```\n\n2. Navigate to the project directory:\n\n   ```sh\n   cd tasks-management-samir\n   ```\n\n3. Start MySQL container:\n\n   ```sh\n   docker-compose up --build -d\n   ```\n\n4. Run application (**skip this step if the springboot container is already running from previous step**):\n\n   ```sh\n   ./mvnw spring-boot:run\n   ```\n5. Access the Spring Boot application at [http://localhost:8080](http://localhost:8080).\n\n## Testing the Application\n\n1. Open your web browser and navigate to [http://localhost:8080/swagger-ui/index.html](http://localhost:8080/swagger-ui.html) to access the Swagger UI.\n\n2. Use the Swagger UI to test the various endpoints exposed by the Spring Boot application.\n\n## Stopping the Application\n\n1. [non-detached] To stop the application and remove the containers, press `Ctrl + C` in the terminal where `docker-compose` is running.\n2. If you use `-d` option then simple run this command to stop all containers `docker-compose down`\n\n\n## Authentication\nI implement a robust JWT-based authentication mechanism in my Spring Boot application. This setup allows users to log in and receive a JWT token, which they must include in the Authorization header of their subsequent requests. The JWT token is validated on each request to ensure that only authenticated users can access protected resources. This approach ensures stateless, scalable, and secure authentication for my API.\n\nHere's how I implemented it in the SecurityConfig class:\n\nSecurityConfig\nIn the SecurityConfig class, I configure Spring Security to manage the authentication and authorization aspects of the application. The configuration disables CSRF protection for simplicity, sets the session management to stateless (since JWT is stateless), and defines the endpoints that require authentication.\n\n## Database Design\n![database_schema.png](images%2Fdatabase_schema.png)\n\nUser 1 ---\u003e 0..* Task (User has many task)\n\n## Database DDL Script\n```sql\nCREATE TABLE `users` (\n  `id` bigint NOT NULL AUTO_INCREMENT,\n  `email` varchar(255) NOT NULL,\n  `enabled` bit(1) DEFAULT NULL,\n  `password` varchar(255) DEFAULT NULL,\n  `role` enum('ADMIN','USER') DEFAULT NULL,\n  `username` varchar(50) NOT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY (`email`),\n  UNIQUE KEY (`username`)\n) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n```\n```sql\nCREATE TABLE `tasks` (\n  `id` bigint NOT NULL AUTO_INCREMENT,\n  `completed` tinyint(1) NOT NULL DEFAULT '0',\n  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n  `description` varchar(255) DEFAULT NULL,\n  `title` varchar(255) NOT NULL,\n  `updated_at` timestamp NULL DEFAULT NULL,\n  `user_id` bigint DEFAULT NULL,\n  `deadline` datetime(6) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)\n) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakimamarullah%2Ftasks-management-samir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhakimamarullah%2Ftasks-management-samir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakimamarullah%2Ftasks-management-samir/lists"}