{"id":50550587,"url":"https://github.com/viniciusferreira7/elifoot","last_synced_at":"2026-06-04T03:00:55.191Z","repository":{"id":349161726,"uuid":"1201277555","full_name":"viniciusferreira7/elifoot","owner":"viniciusferreira7","description":"Elifoot is a Java application built with Spring Boot that simulates the management of soccer clubs, including features such as the registration of stadiums, players, and clubs; authentication and authorization using OAuth2; and permission control via scopes.","archived":false,"fork":false,"pushed_at":"2026-05-30T14:13:26.000Z","size":107,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-30T15:09:33.370Z","etag":null,"topics":["java-17","postgresql","showcase","spring-boot","swagger","validation"],"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/viniciusferreira7.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-04T13:07:07.000Z","updated_at":"2026-05-30T14:13:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"0b0c9e0c-b76d-49cc-96ca-05ce1a2524e2","html_url":"https://github.com/viniciusferreira7/elifoot","commit_stats":null,"previous_names":["viniciusferreira7/elifoot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/viniciusferreira7/elifoot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciusferreira7%2Felifoot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciusferreira7%2Felifoot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciusferreira7%2Felifoot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciusferreira7%2Felifoot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viniciusferreira7","download_url":"https://codeload.github.com/viniciusferreira7/elifoot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viniciusferreira7%2Felifoot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33887124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"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":["java-17","postgresql","showcase","spring-boot","swagger","validation"],"created_at":"2026-06-04T03:00:54.316Z","updated_at":"2026-06-04T03:00:55.161Z","avatar_url":"https://github.com/viniciusferreira7.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elifoot\n\n\u003e **Work In Progress** - This project is currently under active development.\n\nElifoot is a Java application built with Spring Boot that simulates the management of soccer clubs, including features such as the registration of stadiums, players, and clubs; authentication and authorization using OAuth2; and permission control via scopes.\n\n## Tech Stack\n\n| Layer | Technology |\n|---|---|\n| Language | Java 17 |\n| Framework | Spring Boot 4.x |\n| Database | PostgreSQL |\n| Migrations | Flyway |\n| ORM | Spring Data JPA / Hibernate |\n| Mapping | MapStruct |\n| API Docs | springdoc-openapi (Swagger UI) |\n| Build | Maven |\n\n## Requirements\n\n- Java 17+\n- PostgreSQL\n- Maven 3.8+\n\n## Configuration\n\nThe application reads its configuration from environment variables. Create a `.env` file or export the following variables before running:\n\n```bash\nDB_URL=jdbc:postgresql://localhost:5432/elifoot\nDB_USERNAME=your_user\nDB_PASSWORD=your_password\n```\n\nJWT authentication requires RSA key files placed under `src/main/resources/`:\n\n- `authz.pub` — RSA public key\n- `authz.pem` — RSA private key\n\n## Running the application\n\n```bash\nmvn spring-boot:run\n```\n\n## API Documentation\n\nAfter the application is running, the interactive Swagger UI is available at:\n\n```\nhttp://localhost:8080/swagger-ui.html\n```\n\nThe raw OpenAPI 3 spec is available at:\n\n```\nhttp://localhost:8080/v3/api-docs\n```\n\n## Endpoints\n\n### Authentication — `/api/users`\n\n| Method | Path | Description | Auth required |\n|--------|------|-------------|---------------|\n| `POST` | `/api/users` | Register a new user | No |\n| `POST` | `/api/users/login` | Authenticate and receive a JWT | No |\n\n### Stadiums — `/api/stadiums`\n\n| Method | Path | Description | Required scope |\n|--------|------|-------------|----------------|\n| `POST` | `/api/stadiums` | Register a new stadium | `stadium:write` |\n| `GET` | `/api/stadiums` | List all stadiums (paginated) | `stadium:read` |\n\n### Clubs — `/api/clubs`\n\n| Method | Path | Description | Required scope |\n|--------|------|-------------|----------------|\n| `POST` | `/api/clubs` | Register a new club | `club:write` |\n| `GET` | `/api/clubs` | List all clubs (paginated) | `club:read` |\n| `GET` | `/api/clubs/{id}` | Get club details by ID | `club:read` |\n| `GET` | `/api/clubs/{id}/players` | List players of a club (paginated) | `player:read` |\n\n### Players — `/api/players`\n\n| Method | Path | Description | Required scope |\n|--------|------|-------------|----------------|\n| `POST` | `/api/players` | Register a new player | `player:write` |\n| `GET` | `/api/players` | List all players (paginated) | `player:read` |\n| `GET` | `/api/players/{id}` | Get player details by ID | `player:read` |\n\n### Resources — `/api/resources`\n\n| Method | Path | Description | Auth required |\n|--------|------|-------------|---------------|\n| `GET` | `/api/resources/positions` | List all available player positions | No |\n\n## Authorization\n\nEndpoints are protected by JWT bearer tokens. Each token carries one or more scopes that grant access to specific operations.\n\n### Available scopes\n\n| Scope | Description |\n|-------|-------------|\n| `admin:all` | Full access to all resources |\n| `stadium:read` | Read stadiums |\n| `stadium:write` | Create stadiums |\n| `club:read` | Read clubs and their players |\n| `club:write` | Create clubs |\n| `player:read` | Read players |\n| `player:write` | Create players |\n\n### Development seed users\n\nThe database migrations insert two users for local development (password: `123456` for both):\n\n| Email | Scopes |\n|-------|--------|\n| `admin@admin.com` | `admin:all` |\n| `john.doe@example.com` | `stadium:read`, `club:read`, `player:read` |\n\n## Project Structure\n\n```\nsrc/main/java/dev/vinicius/elifoot/\n├── config/\n│   └── security/\n│       ├── annotation/ # Custom meta-annotations for scope enforcement\n│       ├── CorsConfig.java\n│       └── SecurityConfig.java\n├── controller/         # REST controllers and request/response DTOs\n├── entity/             # JPA entities (Club, Stadium, Player, User, Scope)\n├── mapper/             # MapStruct mappers\n├── repository/         # Spring Data JPA repositories\n├── service/            # Business logic services\n└── expection/          # Custom exception classes\n```\n\n## Database Migrations\n\nFlyway migrations are located in `src/main/resources/db/migration/` and run automatically on startup.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniciusferreira7%2Felifoot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviniciusferreira7%2Felifoot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniciusferreira7%2Felifoot/lists"}