startup-template Tailwind Templates

Startup Template

Boilerplate using Postgres + TS + Prisma + Next + tRPC + Tailwind + shad-cn + BetterAuth + Stripe

StartupTemplate

Company codebase boilerplate using:

  • NX for monorepo management
  • TS for most things
  • ESLint / Prettier for linting
  • Jest for testing TS
  • NextJS for apps
  • Tailwind for styling
  • shad-cn for the design system, lucide for icons
  • tRPC for the API
  • Postgres for the DB
  • Redis for the in-memory DB
  • Prisma for schema management and DB client
  • BetterAuth for authentication with individual accounts and organizations
  • Postmark for sending emails
  • TODO CI

Repo setup

Dev setup

  • Create .env at the root and change the values to your own, including changing the db name
  • npm install
  • Download docker (docker desktop for mac)
  • Install recommended VSCode extensions
  • Start the DB and run the migrations: nx run db:migrate
  • Run nx dev client-app to start the dev server

Deployment

  • Create a Vercel account
  • Create a database (neon...) in the right region, and save the DATABASE_URL somewhere
  • Check out .env and make sure you have all the values needed for a production deployment
  • Change the regions in vercel.json to your own, and push
  • Create a project, directory is packages/client-app, setup the env variables, including DATABASE_URL
  • Setup the projet's domain on Vercel, this requires adding a CNAME record on your domain provider
  • Activate Speed Insights on Vercel, the setup is already done in the codebase (Note that it's blocked by adblockers, so to test it make sure you turn the adblockers off)
  • Go to the website, cross your fingers, and the app should be running smoothly in production!

Top categories

Loading Svelte Themes