{"id":13411616,"url":"https://github.com/exercism/website","last_synced_at":"2025-05-15T09:03:51.219Z","repository":{"id":37430960,"uuid":"261034356","full_name":"exercism/website","owner":"exercism","description":"The codebase for Exercism's website. ","archived":false,"fork":false,"pushed_at":"2025-05-06T09:12:05.000Z","size":52541,"stargazers_count":474,"open_issues_count":3682,"forks_count":140,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-05-06T09:39:28.442Z","etag":null,"topics":["community-contributions-paused"],"latest_commit_sha":null,"homepage":"https://exercism.org","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/exercism.png","metadata":{"funding":{"github":["exercism"],"custom":["https://exercism.org/donate"]},"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-03T22:40:17.000Z","updated_at":"2025-05-05T09:09:22.000Z","dependencies_parsed_at":"2025-04-29T08:41:42.431Z","dependency_job_id":null,"html_url":"https://github.com/exercism/website","commit_stats":{"total_commits":3628,"total_committers":63,"mean_commits":57.58730158730159,"dds":0.4666482910694597,"last_synced_commit":"0ed76bda5449a9a1b0de95e6cc2ca85745efdd85"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fwebsite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fwebsite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fwebsite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fwebsite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exercism","download_url":"https://codeload.github.com/exercism/website/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253618624,"owners_count":21937018,"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":["community-contributions-paused"],"created_at":"2024-07-30T20:01:15.038Z","updated_at":"2025-05-15T09:03:51.174Z","avatar_url":"https://github.com/exercism.png","language":"Ruby","funding_links":["https://github.com/sponsors/exercism","https://exercism.org/donate"],"categories":["Ruby"],"sub_categories":[],"readme":"**Please note: This repo is an internal repo. That means the source code is public, but we do not accept Pull Requests, we do not support the app being run locally, and we do not encourage people to fork or reuse this repository.**\n\n---\n\n# Exercism\n\n![Tests](https://github.com/exercism/website/workflows/Tests/badge.svg)\n[![Maintainability](https://api.codeclimate.com/v1/badges/b47ec4d5081d8abb59fa/maintainability)](https://codeclimate.com/github/exercism/website/maintainability)\n[![View performance data on Skylight](https://badges.skylight.io/typical/VNpB7GqXZDpQ.svg)](https://oss.skylight.io/app/applications/VNpB7GqXZDpQ)\n\nThis is the website component of Exercism.\nIt is Ruby on Rails app, backed by various other services.\n\n## Setup\n\nThese are instructions to get things working locally.\nWhile you are welcome to try and follow these instructions and set up this repo on your local machine, we provide no guarantee of things working on your specific local setup.\n\n### Prerequistes\n\nYou need the following installed:\n\n- Ruby 3.3.0 (For other Ruby versions, change the version in the `Gemfile` and the `.ruby-version` files)\n- MySQL\n- MongoDB\n- Redis\n- [AnyCable-Go](https://github.com/anycable/anycable-go#installation)\n- [Docker](https://www.docker.com/)\n\n#### Mac-specific\n\nThe main dependencies can be installed via homebrew\n\n- `brew install libgit2 cmake pkg-config anycable-go hivemind node yarn`\n\n#### Unix-specific\n\nWhat dependencies you need to install depends on your Unix distribution.\n\nFor example, for Ubuntu you'll need to install:\n\n`sudo apt-get install software-properties-common libmariadb-dev cmake ruby-dev ruby-bundler ruby-railties`\n\nYou'll also need to install [nodejs](https://nodejs.org/en/download/) and [yarn](https://yarnpkg.com/getting-started/install).\n\n#### Windows-specific\n\nAs we recommend using WSL, see the Unix-specific instructions listed above.\n\nFor information on setting up WSL, check [the installation instructions](https://docs.microsoft.com/en-us/windows/wsl/install).\n\n### Configure the database\n\nRunning these commands inside a mysql console will get a working database setup:\n\n```bash\nCREATE USER 'exercism'@'localhost' IDENTIFIED BY 'exercism';\nCREATE DATABASE exercism_development;\nALTER DATABASE exercism_development CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\nGRANT ALL PRIVILEGES ON exercism_development.* TO 'exercism'@'localhost';\n\nCREATE DATABASE `exercism_test`;\nALTER DATABASE `exercism_test` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\nGRANT ALL PRIVILEGES ON `exercism_test`.* TO 'exercism'@'localhost';\n```\n\n### Running local AWS\n\nTo run the app you must have a local version of AWS running.\nWe use localstack and opensearch, and run them via Docker.\nDouble check versions in `.dockerimages.json`.\n\n```bash\ndocker run -dp 3042:8080 -p 3040:4566 -p 3041:4566 localstack/localstack:2.3.2\ndocker run -dp 9200:9200 -e \"discovery.type=single-node\" opensearchproject/opensearch:2.11.0\n```\n\n### Run the setup script\n\nThe following scripts configure exercism to work with your setup.\n\n```\nbundle install\nEXERCISM_ENV=development bundle exec setup_exercism_config\nEXERCISM_ENV=development bundle exec setup_exercism_local_aws\n```\n\n**Note: you will need to do this every time you reset dynamodb, which happens when Docker is restarted.**\n\n### Running the local servers\n\nWe have a Procfile which executes the various commands need to run Exercism locally.\n\n#### Mac-specific\n\nOn MacOSX we recommend using `hivemind` to manage this, which can be installed via `brew install hivemind`.\n\nTo get everything started you can then run:\n\n```bash\nhivemind -p 3020 Procfile.dev\n```\n\n#### Unix-specific\n\nOn Unix systems we recommend using `overmind` to manage this, which can be installed using [these instructions](https://github.com/DarthSim/overmind#installation).\n\nTo get everything started you can then run:\n\n```bash\novermind start --port 3020 --procfile Procfile.dev\n```\n\n#### Windows-specific\n\nAs we recommend using WSL, see the Unix-specific instructions listed above.\n\nFor information on setting up WSL, check [the installation instructions](https://docs.microsoft.com/en-us/windows/wsl/install).\n\n## Rails Console\n\nThe Rails 7 console has autocomplete that can be very frustrating.\nTo disable it, do the following:\n\n```\necho 'IRB.conf[:USE_AUTOCOMPLETE] = false' \u003e\u003e ~/.irbrc\n```\n\n## Code Standards\n\nRubocop is enforced on Pull Requests. To run it locally:\n\n```\nbundle exec rubocop --except Metrics\n```\n\nTo autoupdate based on it's suggestions, add the `-a` flag:\n\n```\nbundle exec rubocop --except Metrics -a\n```\n\nTo check the complexity of your code and ensure you're not\nadding things that are more complex to the codebase, run without the `--except` flag:\n\n```\nbundle exec rubocop -a\n```\n\n## Testing\n\nThe tests can be run using:\n\n```\nbundle exec rails test\n```\n\n### Running Jest tests\n\n##### Run tests:\n\n```\nyarn test [path/to/file]\n```\n\n\u003e Omit path to run all tests\n\n##### Update snapshots:\n\n```\nyarn test [path/to/file] -- -u\n```\n\n\u003e Omit path to update all snapshots\n\n### Git Repos\n\nIf you need to create a new Git repo for use in the tests, use the following:\n\n```\nmkdir /Users/iHiD/Code/exercism/website/test/repos/new-repo\ncd /Users/iHiD/Code/exercism/website/test/repos/new-repo\ngit init --bare\n\ncd ~\ngit clone file:///Users/iHiD/Code/exercism/website/test/repos/new-repo exercism-new-git-repo\ncd exercism-new-git-repo\necho \"{}\" \u003e config.json\ngit add config.json\ngit commit -m \"First commit\"\ngit push origin head\n```\n\n## Solargraph\n\nSolargraph allows for code suggestions to appear in your editor.\n\nIf you'd like to use solargraph, the gem is in the file.\nYou need to run and set `solargraph.useBundler` to `true` in your config. I have this working well with coc-solargraph. [This article](http://blog.jamesnewton.com/setting-up-coc-nvim-for-ruby-development) was helpful for setting it up.\n\n- `bundle exec yard gems`\n- `solargraph bundle`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexercism%2Fwebsite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexercism%2Fwebsite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexercism%2Fwebsite/lists"}