Skip to content

Nextjs + Drizzle + Postgress + Next Auth + TRPC

Notifications You must be signed in to change notification settings

jgatjens/frontapp

Repository files navigation

Template FrontApp

Features

  • Example login form
  • Login with email (using google personal account)
  • TRPC react server components
  • Example how to handle CRUD (admin users)
Users Admin Login
login users admin

shadcn add components

#example
npx shadcn-ui@latest add button

Docker (db and pgadmin)

# creates docket containers
docker-compose up --build -d

# if you use pgadmin from docker the Host name/Adress would be the postgres container_name:
# example: frontapp_postgres

# add tables to db and generates prisma client
npm run db:push

# Create a dump backup
# -U username
# -d database
# -h hostname
# --data-only only data
pg_dump -h {POSTGRES_HOST} -U {POSTGRES_USER} -d {POSTGRES_DB} --data-only > ./db/dev_backup.dump

# clear database data
docker exec -i frontapp_postgres psql -U postgres -d frontapp < ./db/dev_clear_data.sql

# restore database on local docker
docker exec -i frontapp_postgres psql -U postgres -d frontapp < ./db/dev_backup.dump

React Template

Frontapp Email Repo

email