{"id":30672938,"url":"https://github.com/hmaach/lets-play","last_synced_at":"2026-05-09T03:36:18.894Z","repository":{"id":310234984,"uuid":"1039040013","full_name":"hmaach/lets-play","owner":"hmaach","description":"Let's Play is a basic CRUD API using Spring Boot with MongoDB to manage users and products","archived":false,"fork":false,"pushed_at":"2026-01-16T16:09:07.000Z","size":108,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-17T05:12:58.444Z","etag":null,"topics":["api","java","mongodb","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmaach.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":"docs/roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-16T10:54:52.000Z","updated_at":"2026-01-16T16:09:33.000Z","dependencies_parsed_at":"2025-09-01T05:44:01.521Z","dependency_job_id":"0fc15fed-a805-4bcc-9053-2243b7708d21","html_url":"https://github.com/hmaach/lets-play","commit_stats":null,"previous_names":["hmaach/lets-play"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hmaach/lets-play","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmaach%2Flets-play","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmaach%2Flets-play/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmaach%2Flets-play/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmaach%2Flets-play/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmaach","download_url":"https://codeload.github.com/hmaach/lets-play/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmaach%2Flets-play/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32806230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["api","java","mongodb","spring-boot"],"created_at":"2025-09-01T05:39:59.239Z","updated_at":"2026-05-09T03:36:18.889Z","avatar_url":"https://github.com/hmaach.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LET'S PLAY\n\nA Java backend project using **Hexagonal Architecture**, integrated with **MongoDB**, and containerized using **Docker**. Follows clean architecture principles with clear separation of concerns between domain logic, application logic, and infrastructure.\n\n---\n\n## Project Structure\n\n```text\nsrc/main/java/com/letsplay/\n├── LetsPlayApplication.java\n├── domain/            # Core business logic\n│   ├── model/\n│   ├── port/\n│   │   ├── in/       # Input ports (use cases)\n│   │   └── out/      # Output ports (interfaces)\n│   └── service/      # Domain services\n├── infrastructure/   # External concerns\n│   ├── config/\n│   ├── persistence/  # Database adapters\n│   └── security/\n└── application/      # Application layer\n    ├── controller/   # REST controllers\n    ├── dto/          # Request \u0026 Response DTOs\n    └── exception/    # Global exception handling\n\nOther files:\n├── .env-example      # Example environment variables\n├── compose.yaml      # Docker Compose config\n├── pom.xml           # Maven config\n└── setup.sh          # Setup environment script\n```\n\n---\n\n## Endpoints\n\n| Method | Endpoint         | Auth | Roles      | Description              |\n| ------ | ---------------- | ---- | ---------- | ------------------------ |\n| POST   | `/auth/register` | ❌    | -          | Register a new user      |\n| POST   | `/auth/login`    | ❌    | -          | User login               |\n| GET    | `/users`         | ✅    | Admin      | List all users           |\n| GET    | `/users/{id}`    | ✅    | Admin/User | Get user by ID           |\n| GET    | `/users/me`      | ✅    | Any        | Get current user profile |\n| POST   | `/users`         | ✅    | Admin      | Create user              |\n| PATCH  | `/users/{id}`    | ✅    | Admin/User | Update user details      |\n| DELETE | `/users/{id}`    | ✅    | Admin/User | Delete user              |\n| GET    | `/products`      | ❌    | -          | List all products        |\n| GET    | `/products/{id}` | ❌    | -          | Get product by ID        |\n| POST   | `/products`      | ✅    | Admin      | Create a product         |\n| PATCH  | `/products/{id}` | ✅    | Admin      | Update product           |\n| DELETE | `/products/{id}` | ✅    | Admin      | Delete product           |\n\n---\n\n## Database Design\n\n```mermaid\nclassDiagram\nUser \"1\" -- \"n\" Product : Owns\nUser : +String id\nUser : +String name\nUser : +String email\nUser : +String password\nUser : +String role\nProduct : +String id\nProduct : +String name\nProduct : +String description\nProduct : +Double price\nProduct : +String userId\n```\n\n---\n\n## Getting Started\n\n### 1. Clone the Repo\n\n```bash\ngit clone https://github.com/hmaach/lets-play.git\ncd lets-play\n```\n\n### 2. Set Up Environment\n\n```bash\ncp .env-example .env\n```\n\nUpdate `.env` with your MongoDB credentials:\n\n```env\n# Database config\nMONGO_INITDB_ROOT_USERNAME=username\nMONGO_INITDB_ROOT_PASSWORD=password\nMONGO_INITDB_DATABASE=lets-play-db\n\n# JWT config\nJWT_SECRET=secret-key\n\n# SSL config\nCERT_PASSWORD=password\nCERT_ALIAS=letsplay\nCERT_DNAME=CN=localhost,OU=Dev,O=LetsPlay,L=Oujda,ST=Oriental,C=MA\n\n```\n\n### 3. Setup Environment\n\n```bash\nsource ./setup.sh\n```\n\nThis will:\n\n* Install Docker rootless if missing\n* Create Docker volume for persistent data\n\n### 4. Connect to MongoDB\n\n```bash\nmongosh \"mongodb://@username:password@localhost:27017/letsplay?authSource=admin\"\n```\n\n### 5. Stop MongoDB\n\n```bash\ndocker compose down\n```\n\n---\n\n## Requirements\n\n* Java 17+\n* Maven\n* MongoDB (Dockerized)\n* Docker (Rootless compatible)\n* Docker Compose v2\n* `mongosh` (optional, for testing)\n* Angular (for frontend integration)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmaach%2Flets-play","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmaach%2Flets-play","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmaach%2Flets-play/lists"}