Beztack

Getting Started

Setting up your development environment

This guide will help you set up the Beztack project on your local machine.

Prerequisites

Make sure you have installed:

Create a New Project

You can create a new Beztack project using the create-beztack command:

pnpm create beztack

The script will walk you through a few setup steps:

  • Project name: The name for your new project (lowercase with dashes)
  • Project description: A short description of your project
  • Initialize Git repo?: Choose if you want to set up a new Git repository
  • Install dependencies?: Choose if you want to automatically install dependencies using pnpm install

Initial Setup

Once the project is created, navigate to the directory and set up your environment:

1. Set Up Environment Variables

Copy the .env.example file to .env:

cd your-project
cp .env.example .env

2. Configure Required Variables

Open the .env file and set up the following variables:

  • BETTER_AUTH_SECRET: Secret key for Better Auth
  • BETTER_AUTH_URL: Your application's base URL
  • DATABASE_URL: Connection string for your PostgreSQL database

3. Initialize the Database

Run database migrations:

pnpm run migrate

Development

To start the dev server (UI + API):

pnpm run dev

This will start:

Additional Nx Commands

Beztack uses Nx for task execution. You can run individual apps:

Production Build

To build all projects:

pnpm run build

Or build specific projects:

npx nx build ui
npx nx build api