{"id":26929388,"url":"https://github.com/piotrpdev/distributed-systems-ca1","last_synced_at":"2025-09-07T05:34:06.679Z","repository":{"id":284822331,"uuid":"953561935","full_name":"piotrpdev/distributed-systems-ca1","owner":"piotrpdev","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-23T23:20:59.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T21:35:02.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"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/piotrpdev.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":"2025-03-23T16:45:02.000Z","updated_at":"2025-03-24T00:05:32.000Z","dependencies_parsed_at":"2025-03-27T21:35:10.832Z","dependency_job_id":"308b6cde-afab-429d-9f82-b29f9403efab","html_url":"https://github.com/piotrpdev/distributed-systems-ca1","commit_stats":null,"previous_names":["piotrpdev/distributed-systems-ca1"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrpdev%2Fdistributed-systems-ca1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrpdev%2Fdistributed-systems-ca1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrpdev%2Fdistributed-systems-ca1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotrpdev%2Fdistributed-systems-ca1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piotrpdev","download_url":"https://codeload.github.com/piotrpdev/distributed-systems-ca1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246761603,"owners_count":20829494,"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":[],"created_at":"2025-04-02T05:27:00.657Z","updated_at":"2025-04-02T05:27:01.389Z","avatar_url":"https://github.com/piotrpdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless REST Assignment - Distributed Systems\n\n__Name:__ Piotr Placzek (20097618)\n\n__Demo:__ \u003chttps://youtu.be/blACcH1mZqQ\u003e\n\n## Details\n\n### Context\n\n- Pokémon Pokédex Data (trimmed to first 20 Pokémon).\n- Taken from: \u003chttps://github.com/Purukitto/pokemon-data.json/blob/master/pokedex.json\u003e\n- Copyrighted by the Pokémon Company and its affiliates.\n- Data collected from [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Main_Page) and [pokemondb.net](https://pokemondb.net/)\n\nTable item attributes:\n\n```ts\nid: number // (Partition key)\nexists: boolean\nname: {\n  english: string\n  japanese: string\n  chinese: string\n  french: string\n}\ntype: Array\u003cstring\u003e\nbase: {\n  HP: number\n  Attack: number\n  Defense: number\n  \"Sp. Attack\": number\n  \"Sp. Defense\": number\n  Speed: number\n}\nspecies: string\ndescription: string\nevolution: {\n  next?: Array\u003cArray\u003cstring\u003e\u003e\n  prev?: Array\u003cstring\u003e\n}\nprofile: {\n  height: string\n  weight: string\n  egg: Array\u003cstring\u003e\n  ability: Array\u003cArray\u003cstring\u003e\u003e\n  gender: string\n}\nimage: {\n  sprite: string\n  thumbnail: string\n  hires: string\n}\n```\n\n### App API endpoints\n\n- GET `/pokemon` - Get all Pokémon.\n- POST `/pokemon` - Add a new Pokémon.\n- PUT `/pokemon` - Update a Pokémon (using the pokemonId in the body).\n- GET `/pokemon?descriptionContains={string}` - Get all Pokémon with a description that contains the passed string.\n- GET `/pokemon/{id}` - Get a Pokémon by ID.\n- GET `/pokemon/{id}/translation?language={string}` - Get a Pokémon with their description translated to the passed language string.\n\n### Features\n\n#### API Keys\n\nModify code like this:\n\n```ts\n// Specify API key source for the API Gateway\nconst api = new apig.RestApi(this, \"PokedexRestAPI\", {\n  defaultCorsPreflightOptions: {\n    allowHeaders: [..., \"X-API-Key\"],\n    allowCredentials: true,\n    ...\n  },\n  apiKeySourceType: apig.ApiKeySourceType.HEADER,\n});\n\n// Create API key and usage plan (needed for API key to work)\nconst apiKey = new apig.ApiKey(this, \"PokedexApiKey\");\nconst usagePlan = new apig.UsagePlan(this, \"PokedexUsagePlan\", {\n  name: \"Pokedex Usage Plan\",\n  apiStages: [\n    {\n      api,\n      stage: api.deploymentStage, // Default stage e.g. dev/prod\n    },\n  ],\n});\n// Add the API key to the usage plan\nusagePlan.addApiKey(apiKey);\n\n// Specify API key is required for the endpoint(s)\npokemonEndpoint.addMethod(\n  \"POST\",\n  new apig.LambdaIntegration(addPokemonFn, { proxy: true }),\n  { apiKeyRequired: true }\n);\n```\n\nNavigate to `Pokedex CDK Stack -\u003e API Gateway -\u003e API keys -\u003e (API key) -\u003e Show API Key`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotrpdev%2Fdistributed-systems-ca1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiotrpdev%2Fdistributed-systems-ca1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotrpdev%2Fdistributed-systems-ca1/lists"}