Skip to content

hojas/nest-react-full-stack

Repository files navigation

nest-react-blog

A simple blog system built with Nest, React and Nx.

Screenshots

Admin

admin

Web

web

Tech Stack

  1. Nx
  2. Nest
  3. Postgresql
  4. Prisma
  5. React
  6. Next
  7. Bootstrap
  8. Ant Design
  9. Tailwind CSS
  10. Vite
  11. Docker

Features

  1. User management
  2. Role management
  3. Topic management
  4. Article management
  5. Comment management

Run with docker-compose

Run nginx-proxy first if you need.

2. Create .env.production file

DATABASE_URL="postgresql://nest_blog:nest_blog@db:5432/nest_blog?schema=public&connect_timeout=300"
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRES=86400s
SHA_SECRET=your_sha_secret_key
API_PORT=8081
VITE_API_BASE_URL=http://localhost:4200/api
WEB_API_BASE_URL=http://localhost:8080/api

3. Run with docker-compose in production mode

Set your Domain in docker-compose.yaml if you need.

$ docker-compose up -d

Development

Install:

$ pnpm install
$ pnpm run prisma:generate
$ pnpm run prisma:migrate

Run server:

$ pnpm nx serve server

Run admin:

$ pnpm nx serve admin

Run web:

$ pnpm nx serve web