-
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.
-
User 1
- email: user1@gmail.com
- password: password
-
User 2
- email: user2@gmail.com
- password: password
-
-
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
-
Once again, one can login with these users:
-
User 1:
- email: user1@gmail.com
- password: password
-
User 2:
- email: user2@gmail.com
- password: password
-