ShiftFast Docs

Setup

Go from git clone to a running app, with sign-up and payments working.

Prerequisites

  • Node.js 20+ and pnpm
  • Docker, for local Postgres (or any Postgres connection string)
  • A Clerk account and a Stripe account
  • The Stripe CLI, to receive webhooks locally

Clone & install

git clone https://github.com/shiftfast/template.git
cd template
pnpm install
cp .env.example .env

Start local Postgres

pnpm local:up

The database URLs in .env already point at this container. Using a hosted database instead? Put its connection strings in DATABASE_URL and DIRECT_URL — see Database.

Configure Clerk

In the Clerk Dashboard, create an application, then:

  1. API keys: copy the publishable and secret keys into NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY.
  2. Organizations: enable Organizations, keep Membership required selected, and set the Default membership limit to 1 (the free plan's seats — the app raises it when an organization subscribes).
  3. Paths (Configure → Developers → Paths): set the fallback development host to http://localhost:3000, point <SignIn /> and <SignUp /> at /sign-in and /sign-up on your development host, and set signing out to /sign-in. Otherwise invitation emails link to Clerk's hosted pages instead of your app.

Organizations are off by default on a new Clerk application, and the app won't work without them.

Configure Stripe

In test mode:

  1. Copy your secret key (Developers → API keys) into STRIPE_SECRET_KEY.
  2. Follow Stripe Setup: create the plan prices, turn on plan switching, and start stripe listen in a second terminal. Leave it running — without it, payments never reach the app.

Run migrations and start the app

pnpm db:migrate
pnpm dev

Check that everything works

  1. Open http://localhost:3000 and click Get started to sign up.
  2. Create your organization when Clerk asks. You land on the dashboard, on the free plan.
  3. Open Billing in the sidebar, choose Pro, and pay with the test card 4242 4242 4242 4242 (any future date, any CVC).
  4. Back on the billing page, the badge reads Pro · Active (refresh if the webhook is a second behind).

That one flow exercises Clerk, Stripe, the webhook, and the database. If the badge still says Free, the webhook didn't arrive — see Troubleshooting.

Next: Build Your First Feature.

On this page