Setting up a dev environment
To contribute to the scouting app, you will need to set up your machine for development.
We use a Dev Container (a feature of VS Code) to simplify setup. You only need to clone the repo, start VS Code, and launch the Dev Container. All necessary tools (Node.js, pnpm, Java, Firebase, etc.) are pre-installed in the container.
Prerequisites
Section titled “Prerequisites”The following steps are required once to prepare your machine.
1. Install WSL2 (Windows Only)
Section titled “1. Install WSL2 (Windows Only)”Windows Subsystem for Linux (WSL) allows you to run a Linux environment on Windows.
- Open PowerShell or Command Prompt as Administrator and run:
Terminal window wsl --install - Restart your computer when prompted.
- After restarting, a Linux terminal will open. Follow the prompts to set a username and password.
2. Install Docker Desktop
Section titled “2. Install Docker Desktop”- Download and install Docker Desktop for Windows.
- During installation, ensure the WSL 2 based engine is enabled (it usually is by default).
- Once installed, start Docker Desktop and ensure it is running.
3. Install VS Code & Extensions
Section titled “3. Install VS Code & Extensions”- Download and install Visual Studio Code.
- Open VS Code and install the Dev Containers extension (published by Microsoft).
Getting Started
Section titled “Getting Started”Once your machine is prepared, follow these steps to start developing.
1. Get the source code
Section titled “1. Get the source code”Open your WSL terminal (e.g., Ubuntu) and run:
# Install git if not already presentsudo apt update && sudo apt install -y git
# Clone the repositorygit clone https://github.com/2702rebels/scouting-app.gitcd scouting-app
# Open in VS Codecode .2. Launch the Dev Container
Section titled “2. Launch the Dev Container”When VS Code opens, it will detect the Dev Container configuration. Click Reopen in Container in the pop-up notification at the bottom-right.
The first time you do this, it will take a few minutes to build the container image.
3. Install Dependencies & Start
Section titled “3. Install Dependencies & Start”Once the Dev Container is running (indicated by Dev Container: Typescript-Node
in the bottom-left corner of VS Code), open a terminal in VS Code and run:
# Install project dependenciespnpm install
# Start the development serverspnpm devThe application will be available at http://localhost:12702 (or the port
specified in the terminal output).