Skip to main content

Installation

Two commands. That’s the entire installation. Let’s get you set up.

Set up your repository

You received a Refract repository URL with your purchase. The recommended setup keeps Refract as an upstream remote so you can pull future updates without clobbering your own work. 1. Clone Refract and move into the project:
git clone <refract-repo-url> my-project
cd my-project
2. Rename the default remote and add your own origin:
git remote rename origin upstream
git remote add origin <your-repo-url>
git push -u origin main
You now have two remotes: origin (your project) and upstream (Refract). When new versions of Refract ship, you pull them from upstream — see Updating Refract for the full workflow including conflict resolution.
You should see: a workspace with apps/backend, apps/frontend, compose.yml, and Makefile at the repo root. If you see these, you’re in the right place.
No npm install, no pnpm install, no dependency dance on the host. Run this once after cloning to populate your local node_modules (used by your IDE’s TypeScript language server for type resolution):
make pnpm-install
Docker handles everything — no Node.js or pnpm required on your machine.

Create your local environment file

Refract uses a .env.development file at the repo root to configure the local stack. Copy the example file to get started:
cp .env.example .env.development
This gives you a pre-filled template with sensible defaults. You’ll fill in the real values — Stripe keys, database credentials, etc. — in the next step.
Never commit .env.development. It’s already in .gitignore but worth saying explicitly — this file contains real credentials and should never leave your machine.
If .env.example is missing from your checkout for any reason, create .env.development manually using the variable list in Configuration and README.md.
That’s it — you’re cloned and ready to configure. The heavy lifting starts in Step 3. Next: Step 3 — Configuration