As fast as the wind can take us.
Sailfish is divided into two parts: the API (under Sources
) and the Client (under Client
). Depending on what you want to work on, the steps to compile are listed down below (which both assume you have already cloned the repository).
Make sure you have the latest NodeJS version installed and ready to go. Additionally, create a .env
file at the Client
root and populate it with your PUBLIC_API_URL
value. Then, take the following steps:
- Move into the project directory with
cd Sailfish/Client
- Install all dependencies with
yarn install
- Create a
.env
file at theClient
root and populate it with yourPUBLIC_API_URL
value (http://127.0.0.1:3333
should be fine for development) - Start the dev server with
yarn run dev
The Sailfish API requires Swift 5.8 at a minimum, but please install the latest version for your platform if it's higher than that. Official builds are available on The Swift Project's homepage for Windows, Linux, and macOS. You might also prefer running via docker-compose up
, which should get you a full development environment equivalent to what we run on the production and staging servers.
Additionally, make sure you have the latest PostgreSQL and Redis versions installed. Check out sample.env
to set up your environment variables in your own .env
file. If you want to test out image uploading functionality (we use DigitalOcean Spaces at present), also fill out the DIGITALOCEAN_SPACES_*
variables, although the server should work fine without those (you just won't be able to upload images). Additionally, if you don't need to test email functionality, just supply SENDGRID_API_KEY
with a dummy value.
After all that's done, take the following steps:
- Move into the project directory with
cd Sailfish
- Install dependencies with
swift package resolve
(if you're using the official Swift extension for VSCode, this should happen automatically) - Start the server with
vapor run
If using Docker, follow these instead:
- Move into the project directory with
cd Sailfish
- Run
docker compose up
We will (eventually!) have Contribution guidelines written up! If instead you want to talk about Offprint with a growing community of authors and readers, check out our Discord server!