{"id":25328406,"url":"https://github.com/samueladeogundev/oosd-rest-api","last_synced_at":"2025-04-08T03:26:37.975Z","repository":{"id":265394912,"uuid":"895808346","full_name":"SamuelAdeogunDev/OOSD-REST-API","owner":"SamuelAdeogunDev","description":"Object Oriented Software Development Certificate Project: Java REST API for Travel Rewards Management using Jakarta EE (JAX-RS) and JPA. Features complete CRUD operations, MariaDB persistence, and CORS support for cross-origin access. Built with Gson for JSON handling.","archived":false,"fork":false,"pushed_at":"2024-11-30T19:30:09.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T05:14:16.274Z","etag":null,"topics":["jakarta-ee","restful-api"],"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/SamuelAdeogunDev.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-29T00:27:29.000Z","updated_at":"2024-11-30T19:30:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"edd474cc-3803-4eeb-9b1a-dbdbc58cf32f","html_url":"https://github.com/SamuelAdeogunDev/OOSD-REST-API","commit_stats":null,"previous_names":["esotericrazz/oosd-rest-api","samueladeogundev/oosd-rest-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelAdeogunDev%2FOOSD-REST-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelAdeogunDev%2FOOSD-REST-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelAdeogunDev%2FOOSD-REST-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelAdeogunDev%2FOOSD-REST-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamuelAdeogunDev","download_url":"https://codeload.github.com/SamuelAdeogunDev/OOSD-REST-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247769290,"owners_count":20992958,"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","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":["jakarta-ee","restful-api"],"created_at":"2025-02-14T02:29:55.219Z","updated_at":"2025-04-08T03:26:37.952Z","avatar_url":"https://github.com/SamuelAdeogunDev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Travel Rewards REST API\n\nA Java-based REST API for managing travel rewards, built with Jakarta EE (JAX-RS) and JPA. This API provides complete CRUD operations for managing travel reward programs.\n\n## Technologies Used\n- Jakarta EE (JAX-RS) for REST endpoints\n- JPA (Java Persistence API) for database persistence\n- MariaDB as the database\n- Gson for JSON serialization/deserialization\n- CORS enabled for cross-origin requests\n\n### Option 1: Using XAMPP (Recommended for Local Development)\n1. Install XAMPP if not already installed\n2. Start Apache and MySQL services in XAMPP Control Panel\n3. Access phpMyAdmin at http://localhost/phpmyadmin\n4. Create a new database named `travelexperts`\n5. Import the SQL file from `src/main/resources/database/travelexperts.sql`\n\n### Option 2: Using Standalone MariaDB\n1. Install MariaDB Server from the official website\n2. Create a new database named `travelexperts`\n3. Import using command line:\n   ```bash\n   mysql -u root -p travelexperts \u003c src/main/resources/database/travelexperts.sql\n      ```\n\nNote: This project uses default local development credentials. In a production environment, credentials would be properly secured using environment variables or secure configuration management.\n\n## API Endpoints\n\n### Get All Rewards\n- **GET** `/api/rewards`\n- Returns a list of all rewards in JSON format\n\n### Get Specific Reward\n- **GET** `/api/rewards/get/{rewardId}`\n- Returns a single reward by ID\n\n### Create New Reward\n- **POST** `/api/rewards/post`\n- Creates a new reward\n- Requires JSON body with reward details\n\n### Update Reward\n- **PUT** `/api/rewards/put`\n- Updates an existing reward\n- Requires JSON body with updated reward details\n\n### Delete Reward\n- **DELETE** `/api/rewards/delete/{rewardId}`\n- Deletes a reward by ID\n\n## Sample JSON Format\n```json\n{\n  \"rwdName\": \"Gold Member\",\n  \"rwdDesc\": \"Special rewards for gold members\"\n}\n```\n\n## Development Setup\n1. Clone the repository\n2. Set up the database using one of the options above\n3. Configure database connection in `persistence.xml` if needed\n    - Default configuration uses local development settings\n    - For production, credentials should be externalized\n4. Build and run the project using your preferred IDE\n\n## Security Note\nThis project demonstrates API development in a local environment. In a production setting:\n- Database credentials would be managed through environment variables\n- CORS settings would be more restrictive\n- Additional security measures like authentication would be implemented\n\n## Cross-Origin Resource Sharing\nThis API includes CORS configuration to allow cross-origin requests, making it suitable for use with separate frontend applications (Web and Android clients).\n\n## Related Projects\n- [Web Client Repository] - Web frontend application\n- [Android Client Repository] - Mobile client application\n\n[Web Client Repository]: https://github.com/EsotericRazz/OOSD-JSP-Webpage\n[Android Client Repository]: https://github.com/EsotericRazz/OOSD-Android-Client\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamueladeogundev%2Foosd-rest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamueladeogundev%2Foosd-rest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamueladeogundev%2Foosd-rest-api/lists"}