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) - [📚 Table of Contents](#-table-of-contents)
- [📁 Project Structure](#-project-structure) - [📁 Project Structure](#-project-structure)
- [⚙️ Prerequisites](#-prerequisites) - [⚙️ Prerequisites](#-prerequisites)
- [Development Setup](#development-setup) - [💻 Development Setup](#-development-setup)
- [Important Note: Database Must Run in Docker](#important-note-database-must-run-in-docker) - [Alternate: Running Services in Separate Terminals](#alternate-running-services-in-separate-terminals)
- [Running Services Separately (Recommended for Development)](#running-services-separately-recommended-for-development) - [🛠️ Environment Setup](#-environment-setup)
- [Terminal 1: Backend Service](#terminal-1-backend-service) - [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) - [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) - [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) - [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)
@ -53,36 +69,48 @@ fusero-app-boilerplate/
## ⚙️ Prerequisites ## ⚙️ Prerequisites
- Node.js (v20 or higher) - Node.js (v20 or higher)
- npm (v9 or higher) - npm (v9 or higher)
- Docker and Docker Compose - Docker & Docker Compose
- Git - Git
## Development Setup ---
### Important Note: Database Must Run in Docker ## 💻 Development Setup
The PostgreSQL database must always run in Docker, regardless of your development setup choice. This ensures consistent database behavior across all environments.
To start the database: 🗃️ PostgreSQL must run in Docker for consistent behavior.
```bash
docker-compose up db
```
### 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** Frontend setup:
```bash cd frontend
docker-compose up db 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
cd backend ### Alternate: Running Services in Separate Terminals
npm install
Terminal 1 (backend):
cd backend
npm install
npm run dev npm run dev
Terminal 2 (frontend): Terminal 2 (frontend):