Skip to content

Latest commit

 

History

History
72 lines (63 loc) · 3.65 KB

File metadata and controls

72 lines (63 loc) · 3.65 KB

Getting Started, A Developer's Guide

Tech Stack - Prerequisites - Development Server - Code Contributions - Next Steps

Philosophy

OpenSplit was created to provide a cross-platform speedrun split timer with a high degree of visual customization via CSS skins.

Tech Stack

Opensplit uses Wails which provides a native application that uses Go and React with Typescript. To effectively contribute you'll need some familiarity with both Go and React.

If something in this guide is inaccurate, out of date, or doesn't work you are highly encouraged to raise an issue or submit a correction

Prerequisites

Follow the installation steps at each link

  • Go >= 1.20
    • Ensure that the bin folder modules are installed to is on your system path, you'll need the Wails CLI to be findable by your system
    • Windows after using installer: setx PATH "$($env:PATH);$env:USERPROFILE\go\bin"
    • Linux: echo 'export PATH="$PATH:$HOME/go/bin"' >> ~/.bashrc && source ~/.bashrc
    • macOS (zsh): echo 'export PATH="$PATH:$HOME/go/bin"' >> ~/.zshrc && source ~/.zshrc
  • Node >= 22.19
    • NVM or NVM for Windows is highly recommended
    • After NVM install:
      • Windows:
        nvm install lts
        nvm use lts
        
      • Linux/macOS:
        nvm install --lts
        nvm use --lts 
        
  • Wails CLI
    • install with: go install github.com/wailsapp/wails/v2/cmd/wails@latest
    • Verify installed and Go PATH bin is correctly on path: wails version
  • Task
    • install with go install github.com/go-task/task/v3/cmd/task@latest
    • Makefile alternative that runs tasks to make your life a bit easier than shell commands via Taskfile.yml
    • Verify: task --version
  • Git
  • Golang-CI
    • Install with GitBash if you're on Windows
    • Technically optional, but CI runs this and will block PRs until it passes
    • Verify: golangci-lint --version

Development Server

  • From the checkout root run: task clean. Should only have to run this once.
  • From the checkout root run: task dev
    • Compiles Go backend, generates frontend bindings, and installs all frontend dependencies
    • This can take some time the first time you run it
    • Hot-Reload
      • Changes to frontend (React) are hot-reloaded and instantly viewable in the application
      • Changes to backend (Go) will cause a recompilation and reload of the application
    • If you get en error related to native rollup optional dependencies, make sure you ran task clean first. You only have to do that once.

Code Contribution

  • Use relevant prefixes in your branch naming
    • New features or enhancements: feat/feature-description
    • Bugs or other problems: fix/problem-to-fix
    • Non-bug project upkeep: chore/what-needs-doing
    • Documentation updates: docs/new-docs-page
  • Add unit test coverage against mock interface implementations for new Go features, no coverage needed for Wails internals or concrete implementations (e.g. OS filesystem hooks)
  • Rebase main before creating PRs
  • task fmt and task lint before creating PRs
  • PRs must pass lint and unit tests before merge.
  • All merges to main must be squash commits

Next Steps

Get to know the Architecture of OpenSplit