Preparation
Add to GitHub teams
Create accounts in the staging environment and database
Invite to sprint meetings and Slack channels
Environment setup
Spordle Play uses a devcontainer which runs in VS Code and Docker. This helps keep development environments in sync and avoids clashing with anything else you’re working on.
The devcontainer is configured with docker-compose to automatically sets up an environment with containers for nodejs, Postgres, RabbitMQ, and Minio with the correct versions.
If you have these already installed, the container networking is configured to not conflict with existing ports and VS Code will automatically expose services to the next available port, while the standard ports are used within the devcontainer environment.
Windows
Install WSL2 from the Microsoft Store. Use WSL2 version 0.67.6 or higher (check
wsl --version
)
https://apps.microsoft.com/store/detail/ubuntu-on-windows/9NBLGGH4MSV6Setup docker in WSL. Docker Desktop is not necessary if using above.
Enable systemd by updating
/etc/wsl.conf
to add:[boot] systemd=true
Install docker
sudo apt update sudo apt install docker.io -y sudo usermod -aG docker $USER
Restart WSL (via cmd)
wsl --shutdown
Clone repository
cd ~ git clone git@github.com:Spordle/Play.git play
Open in VS Code
code ~/play
Relaunch in devcontainer.
You’ll see a notification in the bottom-right corner suggesting this.
You can also relaunch via the Ctrl-P menu by searching for ‘dev containers’
This might take some time as it’s pulling and building a few docker images for the first time
Check
README.md
for further instructions on how to install and build Spordle PlayCreate a branch and open your first pull request! 🎉
macOS
TODO
Likely similar instructions above, but with Docker Desktop.
Development guidelines
Branching is kept simple; there is no
develop
branch or any release branches. The golden rule is thatmaster
must always be in a production-ready state.Why? A code repository is meant for code, and continuous integration tools are meant for release management. While you can get creative with branching, mixing responsibilities creates a lot of unnecessary overhead and provides a false sense of security for developers to merge incomplete work.
Play is a full-stack team working in a monorepo with JIRA stories designed to be completed within a single branch for all components (API, apps, etc).
The goal is to be able to review a single pull request and be able to checkout and test that branch and be fully confident that the branch is ready to be merged and the story is able to be considered done and can be shipped.
Depending on the nature of the work, we may decide to gate functionality behind flags. This allows us to finely manage releases in the deployment process.
Some work inevitably needs to be done in stages, as we need to break up epics into more manageable stories. If it doesn’t make sense to expose a feature to users early on, or we only want to expose it in staging initially, flags are a useful tool to manage this.
When working on a story/branch, open a draft pull request early on! Once you’ve completed development, you can mark it as ready for review.
This provides opportunities for early and continuous feedback on your work, or to share code you’re working on with others to ask for help and collaborate together.