- Angular the frontend framework for building web applications
- Better Auth the authentication framework
- spartan/ui accessible, customizable components for Angular applications
- tRPC end-to-end typesafe APIs
- Prisma database migration and ORM
- NX monorepo tool for managing multiple applications and libraries in a single repository
Install dependencies
pnpm installCopy the .env.dev file and fill in the BETTER_AUTH_SECRET and BETTER_AUTH_URL values.
cp .env.dev .envStart postgres database with docker compose
docker compose up -dRun the prisma migration to create the database and tables:
pnpm prisma migrate devServe the analog app
pnpm startVisit localhost:5173 to see the app running.
Sign up a new user and than you can seed the database with dummy data
pnpm prisma db seedRun the following command to update prisma schema base on the Better Auth configuration:
# generate schema
pnpm dlx auth@latest generate --config apps/api/server/utils/auth.tsRun the following command to create the database and run the migrations:
pnpm prisma migrate devGenerate the Prisma client:
pnpm prisma generateBuild app and run app locally allowing access from localhost
pnpm build
NG_ALLOWED_HOSTS=localhost,127.0.0.1 node dist/apps/app/server/server.mjsTo run the application in Docker, update the .env file to point to the docker container names instead of localhost (database, redis, rustfs, better-auth).
The dockerfiles for the apps require the apps to be built first before starting the container.
pnpm buildStart the containers in detached mode:
docker compose -f compose.prod.yml up -dWhen you rebuild the app use this command to rebuild the docker images:
docker compose -f compose.prod.yml up -d --build