{"id":29795413,"url":"https://github.com/dammak/keycloak-user-service","last_synced_at":"2025-07-28T04:07:04.482Z","repository":{"id":301494649,"uuid":"1008868150","full_name":"DAMMAK/keycloak-user-service","owner":"DAMMAK","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-27T05:58:20.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-27T06:33:54.974Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/DAMMAK.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-06-26T08:06:19.000Z","updated_at":"2025-06-27T05:58:23.000Z","dependencies_parsed_at":"2025-06-27T06:33:58.904Z","dependency_job_id":"65c741e8-b1f3-497e-b33b-6176ef24ec06","html_url":"https://github.com/DAMMAK/keycloak-user-service","commit_stats":null,"previous_names":["dammak/keycloak-user-service"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DAMMAK/keycloak-user-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2Fkeycloak-user-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2Fkeycloak-user-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2Fkeycloak-user-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2Fkeycloak-user-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DAMMAK","download_url":"https://codeload.github.com/DAMMAK/keycloak-user-service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAMMAK%2Fkeycloak-user-service/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267459586,"owners_count":24090703,"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-07-28T02:00:09.689Z","response_time":68,"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":[],"created_at":"2025-07-28T04:07:03.997Z","updated_at":"2025-07-28T04:07:04.467Z","avatar_url":"https://github.com/DAMMAK.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Keycloak User Service\n\nA Spring Boot microservice for user management with Keycloak integration, providing secure authentication and user operations.\n\n## Overview\n\nThis service provides a RESTful API for user management operations integrated with Keycloak as an identity and access management solution. It handles user registration, authentication, profile management, and administrative functions.\n\n## Features\n\n- User registration and authentication\n- Token-based authentication with JWT\n- User profile management\n- Role-based access control\n- Admin user management capabilities\n- Integration with Keycloak for identity management\n- Swagger API documentation\n\n## Tech Stack\n\n- Java 17\n- Spring Boot 3.5.3\n- Spring Security with OAuth2 Resource Server\n- Spring Data JPA\n- PostgreSQL\n- Keycloak 23.0.1\n- Flyway for database migrations\n- MapStruct for object mapping\n- Lombok for reducing boilerplate code\n- Springdoc OpenAPI for API documentation\n- Docker for containerization\n\n## Prerequisites\n\n- Java 17 or higher\n- Maven 3.6+\n- Docker and Docker Compose\n- PostgreSQL (can be run via Docker)\n- Keycloak (can be run via Docker)\n\n## Getting Started\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/yourusername/keycloak-user-service.git\ncd keycloak-user-service\n```\n\n### Running with Docker Compose\n\nThe easiest way to run the application is using Docker Compose:\n\n```bash\ndocker-compose up -d\n```\n\nThis will start:\n- PostgreSQL database\n- Keycloak server\n- User Service application\n\n### Running Locally\n\n1. Start PostgreSQL and Keycloak using Docker Compose:\n\n```bash\ndocker-compose up -d postgres keycloak\n```\n\n2. Build the application:\n\n```bash\nmvn clean package -DskipTests\n```\n\n3. Run the application:\n\n```bash\njava -jar target/keyclock-user-0.0.1-SNAPSHOT.jar\n```\n\nOr using Maven:\n\n```bash\nmvn spring-boot:run\n```\n\n## Configuration\n\nThe application can be configured through the following properties files:\n- `application.yml` - Main configuration\n- `application-dev.yml` - Development environment configuration\n- `application-prod.yml` - Production environment configuration\n\nKey configuration properties:\n\n```yaml\nspring:\n  datasource:\n    url: jdbc:postgresql://localhost:5432/user_db\n    username: postgres\n    password: admin_password_123\n\nkeycloak:\n  auth-server-url: http://localhost:8081\n  realm: user-service\n  client-id: user-service-rest-api\n  client-secret: your-client-secret\n```\n\n## API Endpoints\n\nThe service exposes the following main endpoints:\n\n### Authentication\n\n- `POST /user-service/api/v1/auth/register` - Register a new user\n- `POST /user-service/api/v1/auth/login` - Login user\n- `POST /user-service/api/v1/auth/refresh` - Refresh access token\n- `POST /user-service/api/v1/auth/logout` - Logout user\n\n### User Management\n\n- `GET /user-service/api/v1/users` - Get all users (Admin only)\n- `GET /user-service/api/v1/users/{userId}` - Get user by ID\n- `PUT /user-service/api/v1/users/{userId}` - Update user\n- `DELETE /user-service/api/v1/users/{userId}` - Delete user (Admin only)\n\n## API Documentation\n\nSwagger UI is available at:\n```\nhttp://localhost:8080/user-service/swagger-ui.html\n```\n\nAPI documentation is available at:\n```\nhttp://localhost:8080/user-service/api-docs\n```\n\n## Database Migrations\n\nThe application uses Flyway to manage database migrations. Migration scripts are located in:\n```\nsrc/main/resources/db/migration\n```\n\n## Monitoring\n\nThe application exposes the following actuator endpoints:\n```\nhttp://localhost:8080/user-service/actuator/health\nhttp://localhost:8080/user-service/actuator/info\nhttp://localhost:8080/user-service/actuator/metrics\nhttp://localhost:8080/user-service/actuator/prometheus\n```\n\n## Development\n\n### Building the Project\n\n```bash\nmvn clean install\n```\n\n### Running Tests\n\n```bash\nmvn test\n```\n\n### Code Structure\n\n- `controller` - REST API controllers\n- `service` - Business logic implementation\n- `repository` - Data access layer\n- `entity` - JPA entities\n- `dto` - Data transfer objects\n- `config` - Application configuration\n- `exception` - Exception handling\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdammak%2Fkeycloak-user-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdammak%2Fkeycloak-user-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdammak%2Fkeycloak-user-service/lists"}