Skip to content

Contributing

Contributing to Tinyauth is straightforward. Follow the steps below to set up a development server.

  • Bun
  • Golang v1.24.0 or later
  • Git
  • Docker
  • Make

Start by cloning the repository:

Terminal window
git clone https://github.com/steveiliop56/tinyauth
cd tinyauth

The project uses Git submodules for some dependencies, so you need to initialize them with:

Terminal window
git submodule init
git submodule update

Some of the dependencies must be patched in order to work correctly with the project, you can apply the patches by running:

Terminal window
git apply --directory paerser/ patches/nested_maps.diff

While development occurs within Docker, installing the requirements locally is recommended to avoid import errors. Install the Go dependencies:

Terminal window
go mod tidy

Frontend dependencies can be installed as follows:

Terminal window
cd frontend/
bun install

Configuration requires an environment file. Copy the .env.example file to .env and adjust the environment variables as needed.

The development workflow is designed to run entirely within Docker, ensuring compatibility with Traefik and eliminating the need for local builds. A recommended setup involves pointing a subdomain to the local machine:

*.dev.example.com -> 127.0.0.1
dev.example.com -> 127.0.0.1

Ensure the domains are correctly configured in the development Docker Compose file, then start the development environment:

Terminal window
make dev

In case you need to build the binary locally, you can run:

Terminal window
make binary