{"id":19648275,"url":"https://github.com/wilsonkinyua/bot-battlr","last_synced_at":"2025-02-27T00:37:08.000Z","repository":{"id":211248031,"uuid":"511662231","full_name":"WilsonKinyua/bot-battlr","owner":"WilsonKinyua","description":"Welcome to Bot Battlr, the one and only spot in the known universe where you can custom build your own Bot Army!","archived":false,"fork":false,"pushed_at":"2022-07-07T20:15:41.000Z","size":2976,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-09T22:52:03.683Z","etag":null,"topics":["code-challenge","flatiron-school","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/WilsonKinyua.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}},"created_at":"2022-07-07T20:14:50.000Z","updated_at":"2023-12-07T09:12:35.000Z","dependencies_parsed_at":"2023-12-07T11:26:26.895Z","dependency_job_id":"78765182-0cec-4c35-b0eb-2640e8dc2b90","html_url":"https://github.com/WilsonKinyua/bot-battlr","commit_stats":null,"previous_names":["wilsonkinyua/bot-battlr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilsonKinyua%2Fbot-battlr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilsonKinyua%2Fbot-battlr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilsonKinyua%2Fbot-battlr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilsonKinyua%2Fbot-battlr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WilsonKinyua","download_url":"https://codeload.github.com/WilsonKinyua/bot-battlr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240957895,"owners_count":19884826,"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":["code-challenge","flatiron-school","react"],"created_at":"2024-11-11T14:47:38.172Z","updated_at":"2025-02-27T00:37:07.976Z","avatar_url":"https://github.com/WilsonKinyua.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Immersive Code Challenge: Bot Battlr\n\nWelcome to **Bot Battlr**, the one and only spot in the known universe where you\ncan custom build your own Bot Army! This is our app:\n\n![checkpoint demo](https://curriculum-content.s3.amazonaws.com/phase-2/phase-2-hooks-code-challenge-bot-battlr/checkpoint_demo.gif)\n\nHere's the scenario: a galactic overlord has hired you, a galactic web\ndeveloper, to develop a galactic web app that will allow them to browse through\na list of robots, view a robot's details, and, enlist a bot into their army.\n\n## Instructions\n\nFor this project, you’ll be building out a React application that displays a\nlist of available bots, among other features. Try your best to find the right\nplaces to insert code into the established code base.\n\nPart of what this code challenge is testing is your ability to follow given\ninstructions. While you will definitely have a significant amount of freedom in\nhow you implement the features, be sure to carefully read the directions for\nsetting up the application.\n\n## Setup\n\nAfter unbundling the project:\n\n1. Run `npm install` in your terminal.\n2. Run `npm run server`. This will run your backend on port `8002`.\n3. In a new terminal, run `npm start`. This will run your React app on port `8000`.\n\nMake sure to open [http://localhost:8002/bots](http://localhost:8002/bots) in\nthe browser to verify that your backend is working before you proceed!\n\nThe base URL for your backend is: `http://localhost:8002`\n\n## What You Already Have\n\n`BotPage` is the highest component below App, and serves as the main container\nfor all of the pieces of the page.\n\n`BotCollection` and `YourBotArmy` are container components, which are children\nof `BotPage`. `BotCollection` is where all the bots will be displayed, while\n`YourBotArmy` (the green portion on the top of the screen) will only display the\nbots that have been selected by the user.\n\n`BotCard` and `BotSpecs` are presentational components that have been provided\nfor you that will render out information about an individual bot formatted for a\nlist view and for a full view, respectively. They are pre-styled, and it is your\nresponsibility to get the data into them.\n\nAll of the code to style the page has been written for you, meaning that you\nshould be adding to the code rather than editing it; however, if your finished\nproduct has some styling issues, don't worry too much about it.\n\n## Core Deliverables\n\nAs a user, I should be able to:\n\n- See profiles of all bots rendered in `BotCollection`.\n- Add an individual bot to my army by clicking on it. The selected bot should\n  render in the `YourBotArmy` component. The bot can be enlisted only **once**.\n  The bot **does not** disappear from the `BotCollection`.\n- Release a bot from my army by clicking on it. The bot disappears from the\n  `YourBotArmy` component.\n- Discharge a bot from their service forever, by clicking the red button marked\n  \"x\", which would delete the bot both from the backend and from the\n  `YourBotArmy` on the frontend.\n\n### Endpoints for Core Deliverables\n\n#### GET /bots\n\nExample Response:\n\n```json\n[\n  {\n    \"id\": 101,\n    \"name\": \"wHz-93\",\n    \"health\": 94,\n    \"damage\": 20,\n    \"armor\": 63,\n    \"bot_class\": \"Support\",\n    \"catchphrase\": \"1010010101001101100011000111101\",\n    \"avatar_url\": \"https://robohash.org/nostrumrepellendustenetur.png?size=300x300\u0026set=set1\",\n    \"created_at\": \"2018-10-02T19:55:10.800Z\",\n    \"updated_at\": \"2018-10-02T19:55:10.800Z\"\n  },\n  {\n    \"id\": 102,\n    \"name\": \"RyM-66\",\n    \"health\": 86,\n    \"damage\": 36,\n    \"armor\": 77,\n    \"bot_class\": \"Medic\",\n    \"catchphrase\": \"0110011100000100011110100110011000011001\",\n    \"avatar_url\": \"https://robohash.org/quidemconsequaturaut.png?size=300x300\u0026set=set1\",\n    \"created_at\": \"2018-10-02T19:55:10.827Z\",\n    \"updated_at\": \"2018-10-02T19:55:10.827Z\"\n  }\n]\n```\n\n#### DELETE /bots/:id\n\nExample Response:\n\n```json\n{}\n```\n\n## Advanced Deliverables\n\nThese deliverables are not required to pass the code challenge, but if you have\nthe extra time, or even after the code challenge, they are a great way to\nstretch your skills.\n\n\u003e Note: If you are going to attempt these advanced deliverables, please be sure\n\u003e to have a working commit with all the Core Deliverables first!\n\nAs a user, I should be able to:\n\n- Choose if I want to enlist a bot into my army or just see their data. Clicking\n  on the card should instead display a show view (`BotSpecs`) for that bot,\n  which should replace `BotsCollection`. BotSpecs should have two buttons: one\n  to go back to the list view and another to enlist that bot. Your app could\n  look like the following:\n\n![Full demo](https://curriculum-content.s3.amazonaws.com/phase-2/phase-2-hooks-code-challenge-bot-battlr/full_demo.gif)\n\n- Sort bots by their health, damage or armor. For this, create a new component,\n  `SortBar`.\n- When I enlist a bot it will be **removed** from the `BotCollection` and added\n  to `YourBotArmy`.\n- Filter bots by their class. We can select a few filters at the same time.\n- Sort bots by their health, damage or armor. For this, create a new component,\n  `SortBar`.\n- Only enlist **one** bot from each `bot_class`. The classes are\n  `[\"Support\", \"Medic\", \"Assault\", \"Defender\", \"Captain\", \"Witch\"]`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilsonkinyua%2Fbot-battlr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilsonkinyua%2Fbot-battlr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilsonkinyua%2Fbot-battlr/lists"}