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 .envStart local Postgres
pnpm local:upThe 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:
- API keys: copy the publishable and secret keys into
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYandCLERK_SECRET_KEY. - 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). - Paths (Configure → Developers → Paths): set the fallback development
host to
http://localhost:3000, point<SignIn />and<SignUp />at/sign-inand/sign-upon 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:
- Copy your secret key (Developers → API keys) into
STRIPE_SECRET_KEY. - Follow Stripe Setup: create the plan prices, turn on
plan switching, and start
stripe listenin a second terminal. Leave it running — without it, payments never reach the app.
Run migrations and start the app
pnpm db:migrate
pnpm devCheck that everything works
- Open
http://localhost:3000and click Get started to sign up. - Create your organization when Clerk asks. You land on the dashboard, on the free plan.
- Open Billing in the sidebar, choose Pro, and pay with the test
card
4242 4242 4242 4242(any future date, any CVC). - 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.