{"id":20925215,"url":"https://github.com/antonharbers/odin-waldo-api","last_synced_at":"2026-04-09T18:45:39.921Z","repository":{"id":221702499,"uuid":"748069555","full_name":"AntonHarbers/odin-waldo-api","owner":"AntonHarbers","description":"Waldo API - The Odin Project: https://www.theodinproject.com/lessons/nodejs-where-s-waldo-a-photo-tagging-app","archived":false,"fork":false,"pushed_at":"2024-02-12T15:41:30.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T01:16:04.875Z","etag":null,"topics":["api","backend","express","javascript","mongodb","mongoose","node","rest-api","restful-api","routes","theodinproject"],"latest_commit_sha":null,"homepage":"https://lowly-famous-silica.glitch.me/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AntonHarbers.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}},"created_at":"2024-01-25T07:57:17.000Z","updated_at":"2024-02-25T22:33:21.000Z","dependencies_parsed_at":"2024-11-19T06:01:32.683Z","dependency_job_id":null,"html_url":"https://github.com/AntonHarbers/odin-waldo-api","commit_stats":null,"previous_names":["antonharbers/odin-waldo-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AntonHarbers/odin-waldo-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonHarbers%2Fodin-waldo-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonHarbers%2Fodin-waldo-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonHarbers%2Fodin-waldo-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonHarbers%2Fodin-waldo-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntonHarbers","download_url":"https://codeload.github.com/AntonHarbers/odin-waldo-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonHarbers%2Fodin-waldo-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28005995,"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-12-24T02:00:07.193Z","response_time":83,"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","backend","express","javascript","mongodb","mongoose","node","rest-api","restful-api","routes","theodinproject"],"created_at":"2024-11-18T20:29:50.569Z","updated_at":"2025-12-24T18:10:30.207Z","avatar_url":"https://github.com/AntonHarbers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Waldo Api - The Odin Project\n\nThe Waldo API, part of The Odin Project, is a backend service designed to support a \"Where's Waldo?\" game clone. This API handles game logic, including managing game sessions, character data, and verifying user guesses. It serves as a robust backend built with Node.js and Express, showcasing RESTful API design principles.\n\n[API Endpoint](https://lowly-famous-silica.glitch.me/)\n\n[App Repo](https://github.com/AntonHarbers/Waldo-Clone-Frontend)\n\n[App Live Link](https://main--odinwaldoclone.netlify.app/)\n\n## Getting Started\n\nTo clone and set up the Waldo API for development:\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/AntonHarbers/odin-waldo-api.git\n```\n\n2. Navigate to the project directory:\n\n```bash\ncd odin-waldo-api\n```\n\n3. Install dependencies:\n\n```bash\nnpm install\n```\n\n4. Start the development server:\n\n```bash\nnpm run dev\n```\n\n5. For production, use:\n\n```bash\nnpm start\n```\n\n## Key Concepts\n\n### Express Middleware\n\nThe API leverages Express middleware for enhanced security and performance, including rate limiting, CORS, helmet, and compression.\n\n**Example from `app.js`:**\n\n```javascript\nconst limiter = RateLimit({\n  windowsMs: 1 * 60 * 60 * 1000, // 1 hour\n  max: 300,\n});\napp.use(limiter);\napp.use(\n  helmet.contentSecurityPolicy({\n    directives: {\n      'script-src': [\"'self'\"],\n    },\n  })\n);\napp.use(compression());\n```\n\n### Mongoose Models\n\nUtilizes Mongoose for MongoDB object modeling, defining schemas for game and character data.\n\n**Character Model Example (`models/character_model.js`):**\n\n```javascript\nconst CharacterSchema = new Schema({\n  level: { type: Number, required: true },\n  name: { type: String, required: true },\n  imgUrl: { type: String, required: true },\n  x: { type: Number, required: true },\n  y: { type: Number, required: true },\n});\n```\n\n### RESTful Routes\n\nDefines RESTful routes for managing games and characters, including middleware for admin authentication.\n\n**Games Router Example (`routes/games_router.js`):**\n\n```javascript\nrouter.get('/', games_controller.get_games);\nrouter.post('/', games_controller.post_game);\nrouter.patch('/:id/time', games_controller.patch_game_time);\n```\n\n## API Endpoints Overview\n\n- **GET `/games`**: Retrieve all games.\n- **POST `/games`**: Start a new game.\n- **PATCH `/games/:id/time`**: Update the finish time of a game.\n- **GET `/characters`**: List all characters.\n- **POST `/characters/:id`**: Verify character coordinates.\n\n(Additional details about required data and headers for each endpoint can be found within the route and controller files.)\n\n## Final Notes\n\nThroughout the development of the Waldo API, I've gained invaluable insights into the workings of Express.js, MongoDB, and RESTful design principles. This project not only solidified my understanding of backend development but also demonstrated the real-world applications of these technologies in creating interactive web applications. The process has been both challenging and rewarding, offering hands-on experience with authentication, database schema design, and API rate limiting, among other aspects.\n\n## Contribution Note\n\nWhile I'm pleased to share this project as part of my portfolio, please note that contributions are not currently being accepted. You're welcome to clone and explore the repository for educational purposes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonharbers%2Fodin-waldo-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonharbers%2Fodin-waldo-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonharbers%2Fodin-waldo-api/lists"}