chore: initialize repository with deployment baseline
This commit is contained in:
73
SETUP.md
Normal file
73
SETUP.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# Setup Guide
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Node.js 22+
|
||||
- npm 10+
|
||||
- PostgreSQL 15+
|
||||
|
||||
## 1) Install Dependencies
|
||||
|
||||
```bash
|
||||
npm install
|
||||
cd backend && npm install
|
||||
```
|
||||
|
||||
## 2) Configure Backend Environment
|
||||
|
||||
Copy the template and set real secrets:
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
Required values:
|
||||
|
||||
- `DATABASE_URL`
|
||||
- `JWT_SECRET`
|
||||
- `JWT_REFRESH_SECRET`
|
||||
- `CORS_ORIGIN`
|
||||
|
||||
## 3) Prepare Database
|
||||
|
||||
Preferred (versioned migrations):
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
npm run prisma:migrate
|
||||
npm run prisma:generate
|
||||
npm run prisma:seed
|
||||
```
|
||||
|
||||
Alternative (dev only):
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
npm run prisma:push
|
||||
npm run prisma:seed
|
||||
```
|
||||
|
||||
## 4) Run Development Stack
|
||||
|
||||
Backend:
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Frontend (new terminal):
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## 5) Quality Gates
|
||||
|
||||
```bash
|
||||
cd backend && npm run build
|
||||
cd ..
|
||||
npm run lint
|
||||
npm run build
|
||||
```
|
||||
Reference in New Issue
Block a user