fixed readme upstream

This commit is contained in:
liquidrinu 2025-05-21 02:14:45 +02:00
parent 23acf3dafa
commit c93505d7f0

@ -10,10 +10,26 @@ A full-stack application boilerplate with a React frontend and Node.js backend
- [📚 Table of Contents](#-table-of-contents)
- [📁 Project Structure](#-project-structure)
- [⚙️ Prerequisites](#-prerequisites)
- [Development Setup](#development-setup)
- [Important Note: Database Must Run in Docker](#important-note-database-must-run-in-docker)
- [Running Services Separately (Recommended for Development)](#running-services-separately-recommended-for-development)
- [Terminal 1: Backend Service](#terminal-1-backend-service)
- [💻 Development Setup](#-development-setup)
- [Alternate: Running Services in Separate Terminals](#alternate-running-services-in-separate-terminals)
- [🛠️ Environment Setup](#-environment-setup)
- [For Kubernetes, these are set in chart/values.yaml:](#for-kubernetes-these-are-set-in-chartvaluesyaml)
- [POSTGRES\_NAME=fusero-boilerplate-db](#postgres_namefusero-boilerplate-db)
- [POSTGRES\_HOSTNAME=postgres-service](#postgres_hostnamepostgres-service)
- [POSTGRES\_PORT=19095](#postgres_port19095)
- [POSTGRES\_USER=root](#postgres_userroot)
- [POSTGRES\_PASSWORD=root123](#postgres_passwordroot123)
- [🚀 Production Deployment](#-production-deployment)
- [🌐 Frontend Routing in Production](#-frontend-routing-in-production)
- [🔐 HTTPS with Self-Signed Certificates](#-https-with-self-signed-certificates)
- [🧠 Development Best Practices](#-development-best-practices)
- [📘 API Documentation](#-api-documentation)
- [🧩 ChatGPT-Powered Endpoint Creation](#-chatgpt-powered-endpoint-creation)
- [🧪 Troubleshooting](#-troubleshooting)
- [🤝 Contributing](#-contributing)
- [📄 License](#-license)
- [Kubernetes Troubleshooting \& Redeployment Commands](#kubernetes-troubleshooting--redeployment-commands)
- [1. Rebuild the backend Docker image (after code/config changes)](#1-rebuild-the-backend-docker-image-after-codeconfig-changes)
- [2. (If using a remote registry) Push the image](#2-if-using-a-remote-registry-push-the-image)
- [3. Upgrade the Helm release with the latest values](#3-upgrade-the-helm-release-with-the-latest-values)
- [4. Restart the backend deployment to pick up new images and env vars](#4-restart-the-backend-deployment-to-pick-up-new-images-and-env-vars)
@ -55,32 +71,44 @@ fusero-app-boilerplate/
- Node.js (v20 or higher)
- npm (v9 or higher)
- Docker and Docker Compose
- Docker & Docker Compose
- Git
## Development Setup
---
### Important Note: Database Must Run in Docker
The PostgreSQL database must always run in Docker, regardless of your development setup choice. This ensures consistent database behavior across all environments.
## 💻 Development Setup
To start the database:
```bash
docker-compose up db
```
🗃️ PostgreSQL must run in Docker for consistent behavior.
### Running Services Separately (Recommended for Development)
Create volume and start the database:
docker volume create fusero-db-data
docker-compose up -d db
For better debugging experience, run the frontend and backend in separate terminal windows, while keeping the database in Docker:
Backend setup:
cd backend
cp .env.example .env
npm install
npm run migrate
npm run seed
npm run dev &
cd ..
1. **First, ensure the database is running in Docker**
```bash
docker-compose up db
```
Frontend setup:
cd frontend
cp .env.example .env
npm install
npm run dev &
cd ..
2. **Then, in separate terminal windows:**
App is running:
Frontend → http://localhost:3000
Backend → http://localhost:14000
#### Terminal 1: Backend Service
```bash
---
### Alternate: Running Services in Separate Terminals
Terminal 1 (backend):
cd backend
npm install
npm run dev