Initial commit of Docker project

This commit is contained in:
2026-03-06 11:33:32 -06:00
commit 45d785964d
15 changed files with 1058 additions and 0 deletions

73
README.md Executable file
View File

@@ -0,0 +1,73 @@
# CPAS Violation Tracker
Single-container Dockerized web app for CPAS violation documentation.
Built with React + Vite (frontend), Node.js + Express (backend), SQLite (database).
## The only requirement on your machine: Docker Desktop
Everything else — Node.js, npm, React build — happens inside Docker.
---
## Quickstart (Local)
```bash
# 1. Build the image (installs all deps + compiles React inside Docker)
docker build -t cpas-tracker .
# 2. Run it
docker run -d --name cpas-tracker \
-p 3001:3001 \
-v cpas-data:/data \
cpas-tracker
# 3. Open
# http://localhost:3001
```
## Export for Unraid
```bash
docker save cpas-tracker | gzip > cpas-tracker.tar.gz
```
Then follow README_UNRAID_INSTALL.md.
## Update After Code Changes
```bash
docker build -t cpas-tracker .
docker stop cpas-tracker && docker rm cpas-tracker
docker run -d --name cpas-tracker -p 3001:3001 -v cpas-data:/data cpas-tracker
```
## Project Structure
```
cpas-violation-tracker/
├── Dockerfile # Multi-stage: builds React + runs Express
├── .dockerignore
├── package.json # Backend (Express) deps
├── server.js # API + static file server
├── db/
│ ├── schema.sql # Tables + 90-day score view
│ └── database.js # SQLite connection
└── client/ # React frontend (Vite)
├── package.json
├── vite.config.js
├── index.html
└── src/
├── main.jsx
├── App.jsx
├── data/
│ └── violations.js # All CPAS violation definitions
└── components/
└── ViolationForm.jsx
```
## Phases
- [x] Phase 1 — Container scaffold, SQLite schema, base React form
- [ ] Phase 2 — Employee history, prior violation highlighting
- [ ] Phase 3 — Puppeteer PDF generation
- [ ] Phase 4 — Dashboard, CPAS scores, tier warnings
- [ ] Phase 5 — Recidivist point auto-suggest