Dominion/README.md
2026-08-07 21:19:17 +05:00

47 lines
2.2 KiB
Markdown

# Commercial Banking Balance Sheet & Financial Reporting Portal
A full-stack enterprise web application built for multi-branch balance sheet consolidation, trial balance ledger verification, automated accounting reconciliation, double-entry bookkeeping, and executive financial reporting.
---
## 🚀 Key Features
- **Multi-Branch Operations**: Head Office Admin, Branch Users, Maker-Checker authorization matrix.
- **Server-Side Architecture**: Express backend (`server.ts`) handling state management, calculations, audit logging, and email dispatches.
- **PostgreSQL & Fallback Storage**: Connects to PostgreSQL via `pg` connection pool with automatic fallback to JSON data persistence (`/app/data/portal-data.json`).
- **Containerized Deployment**: Built for Docker, Docker Compose, and **Coolify** self-hosting.
---
## 📁 Repository Structure & Key Configuration Files
| File | Description |
| :--- | :--- |
| `Dockerfile` & `dockerfile` | Multi-stage production container build (Vite client + Express CJS server, exposing port 3000 with IPv4 health check). |
| `docker-compose.yml` | Full-stack orchestration (App container on port 3000 + PostgreSQL container on port 5432). |
| `.dockerignore` | Context exclusions for slim Docker image builds. |
| `.env.example` | Template environment variables (`DATABASE_URL`, `PORT`, `DATA_PATH`, `SMTP_*`). |
| `COOLIFY.md` | Deployment & "No Available Server" troubleshooting guide for Coolify platform & Traefik proxies. |
| `server.ts` | Express server entry point with PostgreSQL initialization, environment SMTP dispatching, and REST API routes. |
---
## 🛠️ Local Development & Running via Docker
### 1. Run via Docker Compose
```bash
docker-compose up --build -d
```
The application container exposes port `3000` (`http://localhost:3000`), with an automated health check on `/api/health`.
### 2. Run via Docker CLI
```bash
docker build -t balance-sheet-portal .
docker run -p 3000:3000 -v portal_data:/app/data balance-sheet-portal
```
---
## ☁️ Deployment on Coolify
Refer to [`COOLIFY.md`](./COOLIFY.md) for step-by-step instructions on deploying via Docker Compose or Coolify Managed PostgreSQL, and resolving Traefik "No available server" status.