{"id":21565259,"url":"https://github.com/sandeepkv93/user-management-springboot","last_synced_at":"2025-07-30T09:03:00.078Z","repository":{"id":262365391,"uuid":"887014250","full_name":"sandeepkv93/user-management-springboot","owner":"sandeepkv93","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-02T05:12:23.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-18T19:22:30.996Z","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/sandeepkv93.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-11-12T02:39:28.000Z","updated_at":"2025-01-02T05:12:27.000Z","dependencies_parsed_at":"2024-11-12T03:29:33.377Z","dependency_job_id":"c3700c9f-0fcd-47b0-98d3-0c0e552f3ca7","html_url":"https://github.com/sandeepkv93/user-management-springboot","commit_stats":null,"previous_names":["sandeepkv93/user-management-springboot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sandeepkv93/user-management-springboot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeepkv93%2Fuser-management-springboot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeepkv93%2Fuser-management-springboot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeepkv93%2Fuser-management-springboot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeepkv93%2Fuser-management-springboot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandeepkv93","download_url":"https://codeload.github.com/sandeepkv93/user-management-springboot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandeepkv93%2Fuser-management-springboot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267842925,"owners_count":24153131,"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-30T02:00:09.044Z","response_time":70,"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":"2024-11-24T10:19:01.358Z","updated_at":"2025-07-30T09:02:59.968Z","avatar_url":"https://github.com/sandeepkv93.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/sandeepkv93/user-management-springboot/actions/workflows/ci.yml/badge.svg)](https://github.com/sandeepkv93/user-management-springboot/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/sandeepkv93/user-management-springboot/branch/main/graph/badge.svg?token=CODECOV_TOKEN_HERE)](https://codecov.io/gh/sandeepkv93/user-management-springboot)\n\n# 🔐 User Management Service\n\nA powerful Spring Boot application for managing users with OAuth2 social login and AWS S3 integration! 🚀\n\n## ✨ Features\n\n### 🎯 Core Features\n- 🔑 JWT Authentication \u0026 Authorization\n- 🌍 OAuth2 Social Login (Google \u0026 GitHub)\n- 👤 User Profile Management\n- 🖼️ Profile Picture Storage (AWS S3)\n- 📊 Role-Based Access Control\n- 🔄 Token Refresh Mechanism\n\n### 🛠️ Technical Stack\n- ☕ Java 21\n- 🍃 Spring Boot 3.2\n- 🐘 PostgreSQL 16\n- 🐳 Docker \u0026 Docker Compose\n- 📦 LocalStack (S3 Emulation)\n- ✈️ Flyway Migrations\n\n## 🏗️ Architecture\n\n```mermaid\nflowchart TB\n    Client[Client Applications]\n    Auth[Authentication Service]\n    User[User Service]\n    S3[S3 Service]\n    DB[(PostgreSQL)]\n    S3Store[(S3 Storage)]\n\n    Client --\u003e|Authentication Requests| Auth\n    Client --\u003e|User Management| User\n    Auth --\u003e|User Data| DB\n    User --\u003e|Profile Data| DB\n    User --\u003e|Profile Pictures| S3\n    S3 --\u003e|Store/Retrieve| S3Store\n\n    style Client fill:#f9f,stroke:#333,stroke-width:4px\n    style Auth fill:#bbf,stroke:#333,stroke-width:2px\n    style User fill:#bbf,stroke:#333,stroke-width:2px\n    style S3 fill:#bbf,stroke:#333,stroke-width:2px\n    style DB fill:#bfb,stroke:#333,stroke-width:2px\n    style S3Store fill:#bfb,stroke:#333,stroke-width:2px\n```\n\n### 🔄 Authentication Flow\n\n```mermaid\nsequenceDiagram\n    actor User\n    participant Client\n    participant Auth\n    participant DB\n    \n    User-\u003e\u003eClient: Login Request\n    Client-\u003e\u003eAuth: Authenticate\n    Auth-\u003e\u003eDB: Validate Credentials\n    DB--\u003e\u003eAuth: User Data\n    Auth--\u003e\u003eClient: JWT + Refresh Token\n    Client--\u003e\u003eUser: Login Success\n    \n    Note over User,DB: Token Refresh Flow\n    Client-\u003e\u003eAuth: Refresh Token\n    Auth-\u003e\u003eDB: Validate Refresh Token\n    DB--\u003e\u003eAuth: Token Valid\n    Auth--\u003e\u003eClient: New JWT\n```\n\n## 🚀 Getting Started\n\n### 📋 Prerequisites\n- ☕ Java 21\n- 📦 Maven\n- 🐳 Docker \u0026 Docker Compose\n- 🐘 PostgreSQL 16\n- 💻 Your favorite IDE!\n\n### 🔧 Setup\n\n1. **📥 Clone the Repository**\n```bash\ngit clone \u003crepository-url\u003e\ncd user-management\n```\n\n2. **🐳 Start Infrastructure**\n```bash\ndocker-compose up -d\n```\n\n3. **🎯 Initialize S3**\n```bash\nchmod +x scripts/init-localstack.sh\n./scripts/init-localstack.sh\n```\n\n4. **⚙️ Configure Application**\n\nCreate `application.yml` with your settings:\n```yaml\nspring:\n  datasource:\n    url: jdbc:postgresql://localhost:5432/user_management\n    username: user\n    password: password\n\napp:\n  jwt:\n    secret: ${JWT_SECRET:your-secret-key}\n  aws:\n    s3:\n      bucket-name: user-profiles\n```\n\n5. **🚀 Build \u0026 Run**\n```bash\nmvn clean install\nmvn spring-boot:run\n```\n\n## 🔌 API Reference\n\n### 🔐 Authentication\n\n#### 📝 Register\n```http\nPOST /api/auth/signup\n{\n  \"username\": \"cooluser123\",\n  \"email\": \"cool@example.com\",\n  \"password\": \"secure123!\"\n}\n```\n\n#### 🔑 Login\n```http\nPOST /api/auth/login\n{\n  \"email\": \"cool@example.com\",\n  \"password\": \"secure123!\"\n}\n```\n\n### 👤 User Management\n\n#### 📱 Get Profile\n```http\nGET /api/users/me\nAuthorization: Bearer \u003cyour-jwt-token\u003e\n```\n\n#### 🖼️ Update Profile Picture\n```http\nPOST /api/users/me/profile-picture\nAuthorization: Bearer \u003cyour-jwt-token\u003e\nContent-Type: multipart/form-data\n```\n\n### 🌐 OAuth2 Login\n\n#### 🔷 Google\n```http\nGET /oauth2/authorization/google\n```\n\n#### 🐱 GitHub\n```http\nGET /oauth2/authorization/github\n```\n\n## 🔒 Security Features\n\n### 🔐 Authentication\n- 🎟️ JWT Tokens (1 hour validity)\n- 🔄 Refresh Tokens (30 days validity)\n- 🔒 BCrypt Password Encryption\n\n### 👮 Authorization\n- 👥 Role-Based Access Control\n- 🛡️ Method-Level Security\n- 🚫 CORS Protection\n\n## 🧪 Testing\n\n```bash\n# 🧪 Run all tests\nmvn test\n\n# 📊 Generate coverage report\nmvn verify\n```\n\n## 🔧 Development\n\n### 📝 Code Style\n```bash\n# 🎨 Format code\nmvn com.spotify.fmt:fmt-maven-plugin:format\n```\n\n### 📚 Database Migrations\n```bash\n# 🔄 Run migrations manually\nmvn flyway:migrate\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandeepkv93%2Fuser-management-springboot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandeepkv93%2Fuser-management-springboot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandeepkv93%2Fuser-management-springboot/lists"}