{"id":16623286,"url":"https://github.com/codetheorem/adbrewtask","last_synced_at":"2025-07-08T17:35:39.148Z","repository":{"id":114840899,"uuid":"544427879","full_name":"codetheorem/adbrewtask","owner":"codetheorem","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-02T17:13:59.000Z","size":2186,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T09:54:52.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/codetheorem.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":"2022-10-02T13:02:41.000Z","updated_at":"2023-03-04T10:41:24.000Z","dependencies_parsed_at":"2023-04-13T14:48:24.454Z","dependency_job_id":null,"html_url":"https://github.com/codetheorem/adbrewtask","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codetheorem/adbrewtask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codetheorem%2Fadbrewtask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codetheorem%2Fadbrewtask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codetheorem%2Fadbrewtask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codetheorem%2Fadbrewtask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codetheorem","download_url":"https://codeload.github.com/codetheorem/adbrewtask/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codetheorem%2Fadbrewtask/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262240315,"owners_count":23280493,"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":"2024-10-12T03:23:04.615Z","updated_at":"2025-06-27T10:35:52.328Z","avatar_url":"https://github.com/codetheorem.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AdBrew Test!\n\nHello! This test is designed to specifically test your Python, React and web development skills. The task is unconventional and has a slightly contrived setup on purpose and requires you to learn basic concepts of Docker on the fly. \n\n\n# Structure\n\nThis repository includes code for a Docker setup with 3 containers:\n* App: This is the React dev server and runs on http://localhost:3000. The code for this resides in src/app directory.\n* API: This is the backend container that run a Django instance on http://localhost:8000. \n* Mongo: This is a DB instance running on port 27017. Django views already have code written to connect to this instance of Mongo.\n\nWe highly recommend you go through the setup in `Dockerfile` and `docker-compose.yml`. If you are able to understand and explain the setup, that will be a huge differentiator.\n\n# Setup\n1. Clone this repository\n```\ngit clone https://github.com/adbrew/test.git\n```\n2. Change into the cloned directory and set the environment variable for the code path. Replace `path_to_repository` appropriately.\n```\nexport ADBREW_CODEBASE_PATH=\"{path_to_repository}/test/src\"\n```\n3. Build container (you only need to build containers for the first time or if you change image definition, i.e., `Dockerfile`). This step will take a good amount of time.\n```\ndocker-compose build\n```\n4. Once the build is completed, start the containers:\n```\ndocker-compose up -d\n```\n5. Once complete, `docker ps` should output something like this:\n```\nCONTAINER ID   IMAGE               COMMAND                  CREATED         STATUS         PORTS                      NAMES\ne445be7efa61   adbrew_test_api     \"bash -c 'cd /src/re…\"   3 minutes ago   Up 2 seconds   0.0.0.0:8000-\u003e8000/tcp     api\n0fd203f12d8a   adbrew_test_app     \"bash -c 'cd /src/ap…\"   4 minutes ago   Up 3 minutes   0.0.0.0:3000-\u003e3000/tcp     app\n884cb9296791   adbrew_test_mongo   \"/usr/bin/mongod --b…\"   4 minutes ago   Up 3 minutes   0.0.0.0:27017-\u003e27017/tcp   mongo\n```\n6. Check that you are able to access http://localhost:3000 and http://localhost:8000/todos\n7. If the containers in #5 or #6 are not up, we would like you to use your debugging skills to figure out the issue. Only reach out to us if you've exhausted all possible options. The `app` container may take a good amount of time to start since it will download all package dependencies.\n\n# Tips\n1. Once containers are up and running, you can view container logs by executing `docker logs -f --tail=100 {container_name}` Replace `container_name` with `app` or `api`(output of `docker ps`)\n2. You can enter the container and inspect it by executing `docker exec -it {container_name} bash` Replace `{container_name}` with `app` or `api` (output of `docker ps`)\n3. Shut all containers using `docker-compose down`\n4. Restart a container using `docker restart {container_name}`\n\n\n# Task\n\nWhen you run `localhost:3000`, you would see 2 things:\n1. A form with a TODO description textbox and a submit button. On this form submission, the app should interact with the Django backend (`POST http://localhost:8000/todos`) and create a TODO in MongoDB.\n2. A list with hardcoded TODOs. This should be changed to reflect TODOs in the backend (`GET http://localhost:8000/todos`). \n3. When the form is submitted, the TODO list should refresh again and fetch latest list of TODOs from MongoDB.\n\n# Instructions\n1. All React code should be implemented using [React hooks](https://reactjs.org/docs/hooks-intro.html) and should not use traditional stateful React components and component lifecycle method.\n2. Do not use Django's model or SQLite DB. Persist and retrieve all data from the mongo instance. A `db` instance is already present in `views.py`. \n3. We are looking for developers who have strong fundamentals and can ramp up fast. We expect you to learn and grasp basic React Hooks/Mongo/Docker concepts on the fly.\n4. Do not submit your solution as a PR since this is a public repo and there are other candidates taking the same test. Send us a link to your repo privately.\n5. If you are able to complete the test, we will have a live walkthrough of your code and ask questions to check your understanding.\n6. The code for the actual solution is pretty easy. The code quality in your solution should be production-ready - error handling, abstractions, well-maintainable and modular code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodetheorem%2Fadbrewtask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodetheorem%2Fadbrewtask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodetheorem%2Fadbrewtask/lists"}