Skip to content

e-commerce site built with Next.js, TypeScript, React, Shadcn, Prisma, PostgreSQL, Redis, Upstash AI Search, NextAuth, and Docker

Notifications You must be signed in to change notification settings

rasyosef/heirarch-square

Repository files navigation

Heirarch Square

Heirarch Square is an e-commerce site built with Next.js and PostgreSQL

Deployed URL: heirarch-square.vercel.app

homepage

Running Locally

First, create a .env file in the root directory of the project and set the following environment variables.

# a secret for NextAuth, can be generated using https://generate-secret.vercel.app/32

AUTH_SECRET=
AUTH_TRUST_HOST=true
NEXTAUTH_URL=http://localhost:3000

# postgres database connection string

DATABASE_URL=

# vercel blob write token, used when uploading product images
BLOB_READ_WRITE_TOKEN=

Then, run the development server:

pnpm install
pnpm prisma db push
pnpm prisma generate
pnpm dev

Open http://localhost:3000 with your browser to see the result.

Visit http://localhost:3000/seed to seed the database.

Running with Docker

First, create a .env file and set the following environment variables.

# a secret for NextAuth, can be generated using https://generate-secret.vercel.app/32

AUTH_SECRET=
AUTH_TRUST_HOST=true
NEXTAUTH_URL=http://localhost:3000

# postgres database connection string

DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres

# vercel blob write token, used when uploading product images
BLOB_READ_WRITE_TOKEN=

Then, start the docker containers

docker compose up

Open http://localhost:3000 with your browser to see the result.

Visit http://localhost:3000/seed to seed the database.

About

e-commerce site built with Next.js, TypeScript, React, Shadcn, Prisma, PostgreSQL, Redis, Upstash AI Search, NextAuth, and Docker

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages