{"id":30170003,"url":"https://github.com/jguida941/rest_api_game_demo","last_synced_at":"2026-05-06T17:35:13.116Z","repository":{"id":307906316,"uuid":"1026967750","full_name":"jguida941/REST_API_Game_Demo","owner":"jguida941","description":"A Java REST API built with Dropwizard, featuring secure role-based authentication and Python automation for orchestration.","archived":false,"fork":false,"pushed_at":"2025-08-03T00:10:25.000Z","size":355,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-03T00:12:46.573Z","etag":null,"topics":["api-demo","authentication","dropwizard","fullstack-backend","halo","http-basic-auth","java","maven","multiplayer","python-automation","rest-api","role-based-access-control","shell-scripts","software-engineering-demo"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jguida941.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-07-27T02:50:52.000Z","updated_at":"2025-08-03T00:10:28.000Z","dependencies_parsed_at":"2025-08-03T00:13:04.584Z","dependency_job_id":"8bc917f4-c418-494f-ab2b-08a1b31deec2","html_url":"https://github.com/jguida941/REST_API_Game_Demo","commit_stats":null,"previous_names":["jguida941/rest_api_game_demo"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jguida941/REST_API_Game_Demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jguida941%2FREST_API_Game_Demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jguida941%2FREST_API_Game_Demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jguida941%2FREST_API_Game_Demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jguida941%2FREST_API_Game_Demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jguida941","download_url":"https://codeload.github.com/jguida941/REST_API_Game_Demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jguida941%2FREST_API_Game_Demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269949634,"owners_count":24501999,"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-08-11T02:00:10.019Z","response_time":75,"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-demo","authentication","dropwizard","fullstack-backend","halo","http-basic-auth","java","maven","multiplayer","python-automation","rest-api","role-based-access-control","shell-scripts","software-engineering-demo"],"created_at":"2025-08-11T20:20:13.859Z","updated_at":"2026-05-06T17:35:13.075Z","avatar_url":"https://github.com/jguida941.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  RESTful Multiplayer Game API (Backend)\r\n\r\n![Java](https://img.shields.io/badge/Java-8%2B-%239400D3.svg?style=for-the-badge\u0026logo=java\u0026logoColor=white\u0026v=1)\r\n![Dropwizard](https://img.shields.io/badge/Dropwizard-2.0-%239400D3.svg?style=for-the-badge\u0026logo=apache\u0026logoColor=white\u0026v=1)\r\n[![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC--BY--NC%204.0-%239400D3.svg?style=for-the-badge\u0026logo=creativecommons\u0026logoColor=white\u0026v=1)](https://creativecommons.org/licenses/by-nc/4.0/)\r\n![Status](https://img.shields.io/badge/Build-Passing-%239400D3.svg?style=for-the-badge\u0026logo=checkmarx\u0026logoColor=white\u0026v=1)\r\n\r\n#### A professional demonstration of RESTful API design using Java, Dropwizard, and enterprise-grade architecture patterns. This project showcases backend engineering skills through the development of a fully functional multiplayer game server system with proper role-based access control, session management, and authentication logic. Still plan on adding features \r\n\r\n\u003e **Note:** Frontend not included. This is a backend-only REST API demo implemented in Java (Dropwizard), featuring Python auto-launchers for automated testing, endpoint verification, and orchestration.\r\n## Purpose\r\n\r\nThis repository demonstrates my expertise in building scalable, production-ready REST APIs. While themed around a game platform for engagement, it exemplifies real-world backend development practices including authentication, data modeling, API design, and system architecture that apply to any enterprise application.\r\n\r\n  #### Core Technology\r\n\r\n  - Language: Java 8\r\n  - Framework: Dropwizard 2.0 (enterprise-grade REST framework)\r\n  - Build Tool: Maven\r\n  - API Type: RESTful API with JSON responses\r\n\r\n  #### Java REST API\r\n\r\n  1. Backend is 100% Java - All the source code in java-rest-api/src/main/java/\r\n  2. REST Endpoints - 25+ RESTful endpoints following HTTP standards:\r\n    - GET, POST, PUT, DELETE methods\r\n    - JSON request/response format\r\n    - Proper HTTP status codes\r\n  3. Dropwizard Framework - Production-ready Java framework for building REST APIs\r\n\r\n  #### Python Scripts Launchers\r\n\r\n  - run_halo_server.py and run_server.py are only used to start the Java server\r\n  - They execute: java -jar gameauth-0.0.1-SNAPSHOT.jar server config.yml\r\n  - The actual server and all business logic is Java\r\n\r\n  #### Java Components\r\n\r\n  - Controllers - Handle HTTP requests (HaloGameResource.java, GameUserRESTController.java)\r\n  - Services - Business logic (HaloGameService.java, WeaponDatabase.java)\r\n  - DAOs - Data access (CustomMapDAO.java, HaloStatsDAO.java)\r\n  - Models - Data structures (PlayerStats.java, Weapon.java, MatchResult.java)\r\n  - Auth - Security (GameAuthenticator.java, GameAuthorizer.java)\r\n\r\n\r\n## Quick Start \r\n\r\n```bash\r\n# 1. Clone and setup\r\ngit clone https://github.com/jguida941/REST_API_Game_Demo.git\r\ncd REST_API_Game_Demo\r\n./setup.sh\r\n\r\n# 2. Choose your server:\r\n\r\n# OPTION A: Full Halo Game Server (Recommended)\r\ncd java-rest-api\r\npython3 run_halo_server.py\r\n\r\n# OPTION B: Basic GameAuth Demo\r\ncd java-rest-api  \r\npython3 run_server.py\r\n\r\n# 3. Test it works (new terminal)\r\ncd demos\r\n./quick-demo.sh\r\n```\r\n\r\n## What's Included\r\n\r\n### Option 1: Full Game Server Demo (`run_halo_server.py`)\r\n- **28 Halo Weapons** - Complete weapon database with stats\r\n- **Player Statistics** - K/D ratios, medals, match history\r\n- **Matchmaking System** - Skill-based matching with queues\r\n- **10 Custom Maps** - Including Blood Gulch Redux, Lockout Classic\r\n- **Leaderboards** - Sort by kills, K/D, wins, accuracy\r\n- **Match History** - 6 pre-loaded sample matches\r\n\r\n### Option 2: Authentication Framework Demo (`run_server.py`)\r\n- **Authentication System** - HTTP Basic Auth\r\n- **Role-Based Access** - Admin, Player, User, Guest\r\n- **User Management** - CRUD operations\r\n- **Security Demo** - Shows authentication patterns\r\n\r\n## Login Credentials\r\n\r\n| Role | Username | Password | Access Level |\r\n|------|----------|----------|--------------|\r\n| Admin | admin | password | Full access |\r\n| Player | player | password | Game features |\r\n| User | user | password | Read/Update |\r\n| Guest | guest | password | Read only |\r\n\r\n## API Endpoints\r\n\r\n### Halo Game Endpoints (Full Server Only)\r\n\r\n#### Weapons\r\n```bash\r\nGET http://localhost:8080/halo/weapons              # All 28 weapons\r\nGET http://localhost:8080/halo/weapons/assault_rifle # Specific weapon\r\nGET http://localhost:8080/halo/weapons/type/KINETIC  # By damage type\r\nGET http://localhost:8080/halo/weapons/power         # Power weapons only\r\n```\r\n\r\n#### Player Stats\r\n```bash\r\nGET http://localhost:8080/halo/player/985752863/stats    # Player statistics\r\nGET http://localhost:8080/halo/player/985752863/matches  # Match history\r\nPOST http://localhost:8080/halo/player/stats/update      # Update after match\r\n```\r\n\r\n#### Leaderboards\r\n```bash\r\nGET http://localhost:8080/halo/leaderboard/kills         # Kill leaders\r\nGET http://localhost:8080/halo/leaderboard/kdRatio       # K/D leaders\r\nGET http://localhost:8080/halo/leaderboard/wins          # Win leaders\r\nGET http://localhost:8080/halo/leaderboard/accuracy      # Accuracy leaders\r\n```\r\n\r\n#### Maps/Forge\r\n```bash\r\nGET http://localhost:8080/halo/maps/browse               # All custom maps\r\nGET http://localhost:8080/halo/maps/{id}/download        # Download map\r\nPOST http://localhost:8080/halo/maps/upload              # Upload new map\r\nPOST http://localhost:8080/halo/maps/{id}/rate           # Rate a map\r\n```\r\n\r\n#### Matchmaking\r\n```bash\r\nPOST http://localhost:8080/halo/matchmaking/queue        # Join queue\r\nGET http://localhost:8080/halo/matchmaking/status        # Check status\r\nDELETE http://localhost:8080/halo/matchmaking/queue      # Leave queue\r\nPOST http://localhost:8080/halo/match/complete           # End match\r\n```\r\n\r\n####  GameAuth Endpoints (Both Servers)\r\n\r\n```bash\r\nGET http://localhost:8080/gameusers                      # List users\r\nGET http://localhost:8080/gameusers/{id}                 # Get user\r\nPOST http://localhost:8080/gameusers                     # Create user\r\nPUT http://localhost:8080/gameusers/{id}                 # Update user\r\nDELETE http://localhost:8080/gameusers/{id}              # Delete user\r\nGET http://localhost:8080/status                         # API status\r\n```\r\n\r\n## Demo Scripts\r\n\r\n### Quick Tests\r\n```bash\r\ncd demos\r\n\r\n# Fast API test\r\n./quick-demo.sh\r\n\r\n# Full feature showcase\r\n./showcase.sh\r\n\r\n# Run ALL 29 demos\r\n./run-all-demos.sh\r\n```\r\n\r\n### Feature-Specific Demos\r\n```bash\r\n# Authentication \u0026 permissions\r\n./auth/demo-auth.sh\r\n\r\n# Player statistics\r\n./stats/demo-stats.sh\r\n\r\n# Matchmaking system\r\n./matchmaking/demo-matchmaking.sh\r\n\r\n# Custom maps\r\n./maps/demo-maps.sh\r\n\r\n# Leaderboards\r\n./leaderboard/demo-leaderboard.sh\r\n\r\n# Performance testing\r\n./performance/demo-performance.sh\r\n\r\n# Integration tests\r\n./integration/demo-integration.sh\r\n```\r\n\r\n### Advanced Demos\r\n\r\n```bash\r\ncd demos/advanced\r\n\r\n# AI matchmaking simulation\r\n./demo-ai-matchmaking.sh\r\n\r\n# Weapon meta analysis\r\n./demo-weapon-meta.sh\r\n\r\n# Stress testing - Runs load tests (has minor timing bug but works)\r\n./demo-performance-stress.sh\r\n\r\n# Security testing\r\n./demo-security-auth.sh\r\n\r\n# Full gameplay session\r\n./demo-full-session.sh\r\n\r\n# Forge workshop\r\n./demo-forge-workshop.sh\r\n\r\n# Intelligence engine\r\n./demo-intelligence-engine.sh\r\n```\r\n\r\n## Project Structure\r\n\r\n```\r\nREST_API_Game_Demo/\r\n├── README.md                    # This file\r\n├── LICENSE                      # MIT License\r\n├── setup.sh                     # First-time setup script\r\n├── .gitignore                   # Git ignore rules\r\n│\r\n├── java-rest-api/               # Backend server\r\n│   ├── README.md               # Server-specific readme\r\n│   ├── run_halo_server.py      # Full game server launcher\r\n│   ├── run_server.py           # Basic auth server launcher\r\n│   ├── pom.xml                 # Maven configuration\r\n│   ├── config.yml              # Server configuration\r\n│   ├── target/\r\n│   │   └── gameauth-0.0.1-SNAPSHOT.jar  # Pre-built server JAR\r\n│   └── src/\r\n│       └── main/java/com/gamingroom/gameauth/\r\n│           ├── GameAuthApplication.java    # Main application\r\n│           ├── GameAuthConfiguration.java  # Configuration\r\n│           ├── auth/                       # Authentication system\r\n│           │   ├── GameAuthenticator.java\r\n│           │   ├── GameAuthorizer.java\r\n│           │   └── GameUser.java\r\n│           ├── controller/                 # REST endpoints\r\n│           │   ├── GameUserRESTController.java\r\n│           │   └── RESTClientController.java\r\n│           ├── dao/                        # Data access\r\n│           │   └── GameUserDB.java\r\n│           ├── healthcheck/                # Health monitoring\r\n│           │   ├── AppHealthCheck.java\r\n│           │   └── HealthCheckController.java\r\n│           ├── representations/            # DTOs\r\n│           │   └── GameUserInfo.java\r\n│           └── halo/                       # Game features\r\n│               ├── controller/\r\n│               │   └── HaloGameResource.java\r\n│               ├── dao/\r\n│               │   ├── CustomMapDAO.java\r\n│               │   ├── HaloStatsDAO.java\r\n│               │   └── MatchHistoryDAO.java\r\n│               ├── models/\r\n│               │   ├── BaseMapType.java\r\n│               │   ├── CustomMap.java\r\n│               │   ├── GameMode.java\r\n│               │   ├── MatchResult.java\r\n│               │   ├── MatchmakingTicket.java\r\n│               │   ├── PlayerStats.java\r\n│               │   ├── Weapon.java\r\n│               │   └── WeaponStats.java\r\n│               └── service/\r\n│                   ├── HaloGameService.java\r\n│                   └── WeaponDatabase.java\r\n│\r\n├── demos/                      # Demo scripts\r\n│   ├── quick-demo.sh          # Quick API test\r\n│   ├── showcase.sh            # Full feature tour\r\n│   ├── run-all-demos.sh       # Run everything\r\n│   ├── demo.sh                # One-liner demo\r\n│   ├── auth/                  # Authentication demos\r\n│   │   └── demo-auth.sh\r\n│   ├── stats/                 # Statistics demos\r\n│   │   └── demo-stats.sh\r\n│   ├── matchmaking/           # Matchmaking demos\r\n│   │   └── demo-matchmaking.sh\r\n│   ├── maps/                  # Map/Forge demos\r\n│   │   └── demo-maps.sh\r\n│   ├── leaderboard/           # Leaderboard demos\r\n│   │   └── demo-leaderboard.sh\r\n│   ├── performance/           # Performance demos\r\n│   │   └── demo-performance.sh\r\n│   ├── integration/           # Integration demos\r\n│   │   └── demo-integration.sh\r\n│   └── advanced/              # Advanced demos\r\n│       ├── demo-ai-matchmaking.sh\r\n│       ├── demo-forge-workshop.sh\r\n│       ├── demo-full-session.sh\r\n│       ├── demo-intelligence-engine.sh\r\n│       ├── demo-performance-stress.sh\r\n│       ├── demo-security-auth.sh\r\n│       └── demo-weapon-meta.sh\r\n│\r\n└── demo-showcase/             # Unity integration example\r\n    └── DemoScripts/\r\n        ├── UnityRestClient.cs # Unity C# API client\r\n        └── DemoController.cs  # Demo UI controller\r\n```\r\n\r\n## Building from Source\r\n\r\n```bash\r\ncd java-rest-api\r\nmvn clean package\r\n```\r\n\r\n## Testing Everything\r\n\r\n```bash\r\n# 1. Test setup script\r\n./setup.sh\r\n\r\n# 2. Test Halo server\r\ncd java-rest-api\r\npython3 run_halo_server.py\r\n# Ctrl+C to stop\r\n\r\n# 3. Test GameAuth server  \r\npython3 run_server.py\r\n# Ctrl+C to stop\r\n\r\n# 4. Test quick demo (start server first)\r\ncd ../demos\r\n./quick-demo.sh\r\n\r\n# 5. Test a specific endpoint\r\ncurl -u player:password http://localhost:8080/halo/weapons\r\n```\r\n\r\n## Technical Skills Demonstrated\r\n\r\n### Backend Development\r\n- **Enterprise Architecture** - Clean separation of concerns\r\n- **RESTful API Design** - 25+ well-designed endpoints\r\n- **Authentication \u0026 Security** - Role-based access control\r\n- **Data Modeling** - Complex game data relationships\r\n- **Performance** - Efficient algorithms and caching\r\n- **Testing** - Comprehensive demo suite\r\n\r\n### Implementation Features\r\n- **Weapon System** - 28 balanced weapons\r\n- **Player Progression** - Stats, medals, rankings\r\n- **Matchmaking** - Skill-based matching\r\n- **User Content** - Custom map support\r\n- **Social Features** - Leaderboards and history\r\n\r\n## Deployment\r\n\r\n### Local Development\r\nDefault configuration runs on port 8080. Both servers use the same JAR.\r\n\r\n### Production Deployment\r\n1. Update `config.yml` with production database\r\n2. Set environment variables for ports\r\n3. Enable HTTPS in configuration\r\n4. Use proper secrets management\r\n\r\n## Troubleshooting\r\n\r\n| Problem | Solution |\r\n|---------|----------|\r\n| Port already in use | `lsof -i :8080` then `kill \u003cPID\u003e` |\r\n| Java not found | Install Java 8+ or check JAVA_HOME |\r\n| Permission denied | `chmod +x` on scripts |\r\n| Server won't start | Check `java-rest-api/server.log` |\r\n| Demos fail | Ensure server is running first |\r\n\r\n## Technologies Used\r\n\r\n\r\n- **Java 8** - Core programming language\r\n- **Dropwizard 2.0** - Production-ready REST framework\r\n- **Maven** - Build automation\r\n- **JUnit** - Unit testing framework\r\n- **HTTP Basic Auth** - Security implementation\r\n- **In-Memory Database** - Fast development iteration\r\n\r\n## Author\r\n\r\n**Justin Guida** - Full Stack Developer\r\n\r\nThis project was created to demonstrate enterprise-level backend development skills. While the theme is gaming-related for engagement, the patterns and practices shown here apply directly to real-world applications in finance, healthcare, e-commerce, and other industries.\r\n\r\n## License\r\n\r\nCreative Commons Attribution-NonCommercial 4.0 International\r\n\r\nThis work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. \r\nTo view a copy of this license, visit https://creativecommons.org/licenses/by-nc/4.0/\r\n\r\nYou are free to:\r\n\r\n✔️ Share — copy and redistribute the material in any medium or format  \r\n✔️ Adapt — remix, transform, and build upon the material  \r\n\r\nUnder the following terms:\r\n\r\n Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made.  \r\n NonCommercial — You may not use the material for commercial purposes.  \r\n\r\n---\r\n\r\n**To see it in action:**\r\n```bash\r\ncd java-rest-api \u0026\u0026 python3 run_halo_server.py\r\n```\r\n\r\n\r\nThen visit http://localhost:8080/halo/weapons in your browser.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjguida941%2Frest_api_game_demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjguida941%2Frest_api_game_demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjguida941%2Frest_api_game_demo/lists"}