Contractor payments as easy as 1-2-3.
You'll need:
- Docker
- Node.js (see
.node-version
) - Ruby
The easiest way to set up the development environment is to use the bin/setup
script, but feel free to run the commands in it yourself:
- Set up Ruby (ideally using
rbenv
/rvm
) and PostgreSQL - Navigate to backend code and install dependencies:
cd backend && bundle i && gem install foreman
- Navigate to frontend app and install dependencies
cd frontend && pnpm i
Finally, set up your environment: cp .env.example .env
. If you're an Antiwork team member, you can use vercel env pull .env
.
You can start the local app using the bin/dev
script - or feel free to run the commands contained in it yourself.
Once the local services are up and running, the application will be available at https://flexile.dev
Check the seeds for default data created during setup.
Issue: When running bin/dev
(after bin/setup
) encountered FATAL: role "username" does not exist
Resolution: Manually create the Postgres user with:
psql postgres -c "CREATE USER username WITH LOGIN CREATEDB SUPERUSER PASSWORD 'password';"
Likely caused by the bin/setup
script failing silently due to lack of Postgres superuser permissions (common with Homebrew installations).
Issue: First attempt to run bin/dev
failed with Redis::CannotConnectError
on port 6389.
Resolution: Re-running bin/dev
resolved it but data wasn't seeded properly, so had to run db:reset
Likely caused by rails attempting to connect before Redis had fully started.
# Run Rails specs
bundle exec rspec # Run all specs
bundle exec rspec spec/system/roles/show_spec.rb:7 # Run a single spec
# Run Playwright end-to-end tests
pnpm playwright test
Stripe
- Create account at stripe.com and complete verification
- Enable Test mode (toggle in top right of dashboard)
- Navigate to Developers → API keys
- Copy Publishable key (
pk_test_...
) and Secret key (sk_test_...
- click "Reveal" first) - Add to
.env
:NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_your_publishable_key_here STRIPE_SECRET_KEY=sk_test_your_secret_key_here
Wise
- Register at sandbox.transferwise.tech and complete email verification
- Click profile/avatar → Settings → copy your Membership number
- Go to Integrations and Tools → API tokens → Create API token
- Set permissions to Full Access, name it (e.g., "Flexile Development"), and copy the token immediately
- Add to
.env
:WISE_PROFILE_ID=your_membership_number_here WISE_API_KEY=your_full_api_token_here
Note: Keep credentials secure and never commit to version control.
Flexile is licensed under the MIT License.