Skip to content

nguyenhieptech/postifio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Postifio

image

image

image

image

image

Backend

  • Tech stack: NestJS (Fastify), Prisma ORM

  • Set up

# Open a terminal inside backend folder
cd api

# Install dependencies
pnpm i
  • After that, set up a local Postgresql database. This step varies on different systems. Find online tutorials to set up. Then, create a .env file and change update your database URL.
DATABASE_URL="postgresql://your-user:your-password@localhost:5432/your-db-name?schema=public"
JWT_SECRET="Change to your JWT secret"
  • Let's move on to Prisma
# Generate prisma
npx prisma generate
# or pnpm prisma:generate

# Migrate prisma schema to db
npx prisma migrate dev
# or pnpm prisma:migrate

# Seed database if needed
npx prisma db seed
# or pnpm prisma:seed

# After that, open prisma studio
npx prisma studio
# or pnpm prisma:studio
  • Run project locally
# Start backend web server
pnpm start:dev
  • After seeding database successfully, there are 2 initial users, each user has 7 posts. One can login with these accounts, or create a new one.

Set up Frontend

  • Techstack: React (Vite), ShadcnUI, Tailwind CSS, Redux Toolkit

  • Set up: open a new terminal

# Open a terminal inside frontend folder
cd web

# Install dependencies
pnpm i
  • After that, run project locally
pnpm start:dev

About

Dead simple post management app for interviews

Resources

Stars

Watchers

Forks