{"id":21945768,"url":"https://github.com/howtocodewell/code-quiz","last_synced_at":"2025-04-22T21:25:30.060Z","repository":{"id":59339919,"uuid":"533756433","full_name":"howToCodeWell/code-quiz","owner":"howToCodeWell","description":"Code Quiz MonoRepo (API, API Client, App)","archived":false,"fork":false,"pushed_at":"2022-11-20T20:09:03.000Z","size":535,"stargazers_count":4,"open_issues_count":34,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T19:01:15.398Z","etag":null,"topics":["api","api-client","api-server","codechallenge","hacktoberfest","javascript","javascript-api","php-api","php8","typescript"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/howToCodeWell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2022-09-07T12:29:50.000Z","updated_at":"2024-05-03T09:58:05.000Z","dependencies_parsed_at":"2023-01-23T16:01:29.732Z","dependency_job_id":null,"html_url":"https://github.com/howToCodeWell/code-quiz","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howToCodeWell%2Fcode-quiz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howToCodeWell%2Fcode-quiz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howToCodeWell%2Fcode-quiz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howToCodeWell%2Fcode-quiz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/howToCodeWell","download_url":"https://codeload.github.com/howToCodeWell/code-quiz/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250326523,"owners_count":21412266,"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":["api","api-client","api-server","codechallenge","hacktoberfest","javascript","javascript-api","php-api","php8","typescript"],"created_at":"2024-11-29T04:19:22.848Z","updated_at":"2025-04-22T21:25:30.028Z","avatar_url":"https://github.com/howToCodeWell.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code Quiz\nWelcome to the Code Quiz Open Source project from [How To Code Well](https://howtocodewell.net). \n\nThis is an Open Source project that includes an API and an App for the daily code quizzes.\n\nThe daily code quizzes are published to [Instagram](https://instagram.com/howtocodewell) and [Twitter](https://twitter.com/howtocodewell). This GitHub project is under development and will eventually allow access to the quizzes via a JSON API, Mobile app and website. \n\nThis Monorepo contains the following three projects.\n\n1. **API** - A Symfony 6, PHP 8  and Maria DB backend.\n2. **API-Client** - A NPM package for mock testing the API. \n3. **App** - A Mobile application that displays code quizzes.\n4. **Website** - A Website that displays code quizzes.\n\n## Project development\nThis project is being developed live on [YouTube](https://youtube.com/howtocodewell) most Tuesdays at 6pm BST and most Sundays on [Twitch](https://twitch.tv/howtocodewell).\n\n\n## Help needed!\nIf you would like to help build the project then please pick a ticket from the issues. If you are new to Open Source then pick an issue labeled `good first issue`. \n\nPull requests may be  reviewed live on Twitch/YouTube.\n\n# Contributing to this project\n\nSee the [CONTRIBUTING](CONTRIBUTING.md) guide on how to contribute to the project.\n\n---\n\n## System Requirements\n\n- Docker\n- Docker Compose\n- Node\n- NPM\n- Yarn\n\n---\n\n## Local Install\n\n1. Clone the repository\n```bash\ngit clone git@github.com:howToCodeWell/code-quiz.git\n```\n\n2. Spin up the containers\n\n```bash\ndocker-compose up -d\n```\n\n3. Install database migrations\n```bash\ndocker-compose exec api bin/console doctrine:migration:migrate\n```\n\n4. Load data fixtures\n```bash\ndocker-compose exec api bin/console doctrine:fixtures:load\n```\n\n5. Add the following entry to the `/etc/hosts`\n\n```bash\n127.0.0.1 codequiz.local\n127.0.0.1 api.codequiz.local\n```\n\n## Generating the OpenAPI specification\nFrom the `api` folder run the following to create `openapi.yaml` in the `./docs/generated` folder.  This is ignored from the code base\n```bash\ndocker-compose exec api bash -c \"bin/console api:openapi:export --yaml\" \u003e ./docs/generated/openapi.yaml\n```\n\n## Install database and data\n1. Run the migrations\n```bash\ndocker-compose exec api bash -c 'bin/console doctrine:migrations:migrate'\n```\n\n2. Run the data fixtures\n```bash\ndocker-compose exec api bash -c 'bin/console doctrine:fixtures:load' \n```\n---\n\n## Accessing the projects\n\n- The API can be reached at [http://api.codequiz.local/v1](http://api.codequiz.local/v1)\n- The website can be reached at [http://codequiz.local/](http://codequiz.local/)\n\n---\n\n## API request examples\n\n**Get a list of quizzes**\n```bash\ncurl -X 'GET' \\\n  'http://api.codequiz.local/v1/quizzes' \\\n  -H 'accept: application/ld+json'\n```\n**Get the first quiz**\n```bash\ncurl -X 'GET' \\\n  'http://api.codequiz.local/v1/quiz/1' \\\n  -H 'accept: application/ld+json'\n```\n**Get the first question**\n```bash\ncurl -X 'GET' \\\n  'http://api.codequiz.local/v1/question/1' \\\n  -H 'accept: application/ld+json' \n```\n\n---\n\n\n# Running the API Client locally\n\n## Install\n\n1. Install the packages\n```\nyarn install\n```\n\n2. Run the mock server\n```\nyarn start\n```\n\n3. Generate the OpenAPI TypeScript module\n   Make sure you have already generated the openapi spec file.\n\n[See this guide for details](https://github.com/howToCodeWell/code-quiz/wiki/API#generating-the-openapi-specification)\n```\nyarn run generate-api \n```\n\n## Testing\n\n```\nyarn run lint\n```\n\n```\nyarn run test\n```\n\n--- \n# Mobile App\n\nYet to be built\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowtocodewell%2Fcode-quiz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhowtocodewell%2Fcode-quiz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowtocodewell%2Fcode-quiz/lists"}