Installation
Account setup
Fork and clone the repository
git@github.com:<OWNER>/floe.git
cd floe
Install dependencies
pnpm i
Register a GitHub app
- Follow the Registering a GitHub App docs (opens in a new tab)
- Enable the following settings:
- Set the callback URL to
http://localhost:3001/api/installation-callback
- Check ON
Request user authorization (OAuth) during installation
andEnable Device Flow
- Enable the following permissions:
- Contents: Read-only
- Issues: Read & write
- Metadata: Read-only
- Pull requests: Read & write
- Members: Read-only
- Set the callback URL to
- Keep this page open. You will need to get your
App ID
,Client ID
,Client secret
, andPrivate key
handy for later
Create your database
- Setup a MySQL database. You can do this locally or through a cloud provider. Floe uses PlanetScale.
Setup Vercel
- In Vercel, create a Project. You can create it from the GitHub repository you just forked.
- Setup a Redis KV store. You can do this through the Vercel dashboard on the
Storage
page. - Keep your environment variables handy for later.
Setup environment variables
Next, we need to setup our environment variables.
Copy .env.example files
Create a .env
by copying the .env.example
file in the following directories:
- .env.example
- .env.example
- .env.example
- .env.example
DATABASE_URL
- Set the
DATABASE_URL
to your MySQL database. If you are using PlanetScale, you can get this by runningpscale connect <DATABASE_NAME> --port 3309
and copying theDATABASE_URL
from the output. - Set the
DATABASE_URL
tomysql://root@127.0.0.1:3309/<DATABASE_NAME>?connection_limit=100
NEXTAUTH_SECRET
- Generate a cryptographically secure string and set it as the
NEXTAUTH_SECRET
. The easiest way to do this is to runopenssl rand -base64 32
in your terminal.
FLOE_SECRET_IV
and FLOE_SECRET_KEY
- Generate a 16 and 32 character cryptographically string and set them as the
FLOE_SECRET_IV
andFLOE_SECRET_KEY
respectively. The easiest way to do this is to runopenssl rand -base64 16
andopenssl rand -base64 32
in your terminal.
Remaining variables
- You should be able to fill most other variables if you followed the Prerequisites and Installation steps.
- You will not yet have created keys for
FLOE_API_WORKSPACE
orFLOE_API_SECRET
yet.
Running the app
Sync your database
Run this from the packages/db
directory.
npx prisma db push
Seed your database
Run this from the packages/db
directory.
npx prisma db seed
Copy the output at the end. This will be needed to login.
Start the app
Let's start the app (finally 🎉)!
pnpm dev
This should have started 3 dev servers:
- Website: http://localhost:3000 (opens in a new tab)
- Dashboard: http://localhost:3001 (opens in a new tab)
- API: http://localhost:4000 (opens in a new tab)
Login
Go to http://localhost:3001 (opens in a new tab) and enter the auth cookie you copied earlier into
your console. Or, if you entered a SENDGRID_API
key you can enter an email to
signup manually. You should receive an email with a link to verify your account.
That's it!