A highly opinionated full-stack starter monorepo.
- Package management: pnpm
- Build system: Turborepo
- CI/CD: GitHub Actions
- Language: Typescript
- Web: Remix
- UI: Mantine (using v7 alpha since the switch to static CSS works better with SSR)
- DB: Supabase
- Hosting: Cloudflare Pages
- Server runtime: Cloudflare Workers
You'll likely want to duplicate this repo, rather than forking it:
# First, create a blank NEW_REPO on GitHub.
# Make a bare clone
git clone --bare https://github.com/plotday/resupaflare.git
cd resupaflare.git
git push --mirror https://github.com/USERNAME/NEW_REPO.git
cd ..
rm -rf resupaflare
# Clone the new repo
git clone https://github.com/USERNAME/NEW_REPO.git
cd NEW_REPO
git remote add resupaflare https://github.com/plotday/resupaflare.git
git grep -l '@resupaflare' | xargs sed -i '' -e 's/@resupaflare/@NEW_SCOPE/g'
git commit -am "Set package scope"
git push origin master
To pull the latest changes from this repo into your new repo:
git pull resupaflare main
git push origin main
- Install pnpm
- Install pgFormatter (on MacOS:
brew install pgformatter
) pnpm install
- Create
.env.development.local
and add the required variables from.env.development
pnpm dlx supabase link --project-ref PROJECT_ID
pnpm dev
After making local changes to the DB, run pnpm gen-types
. This generates
libs/db/src/types.ts
, which should be checked in with the changes.
Migrations are applied by GitHub Actions. Generate a migration using pnpm gen-migration MIGRATION_NAME
and include it with the relevant change.
Remix is patched to fix the sourcemap path escaping for Cloudflare functions.
To update the patch for a new Remix version:
pnpm patch @remix-run/dev@[VERSION]
- Edit
[TMP_PATH]/dist/compiler/server/write.js
(see the previous diff for the change). pnpm patch-commit [TMP_PATH]
- Create a new Pages application with the following settings:
- Build command:
pnpm run build:web
- Build output directory:
/apps/web/public
- Root directory:
/
- Build command:
Create two projects, one for production and the other for staging.