feat(postgres): infrastructure setup and schema creation (tasks 1-2)

- Install pg (node-postgres) dependency
- Create backend/db.js connection pool module (max 10, auto-reconnect)
- Install Docker and spin up steam-postgres container on port 5433
- Create backend/db-schema.sql with complete Postgres DDL (24 tables)
- Replace findings_json blob with ivanti_findings table (individual rows)
- Merge notes/overrides into findings table columns
- Add proper indexes: state, bu_ownership, severity, composite
- Create backend/setup-postgres.js for idempotent schema initialization
- Add DATABASE_URL to .env and .env.example
- Update migration plan docs with Docker setup commands
- Verify: schema executes cleanly, pool connects, 24 tables created
This commit is contained in:
Jordan Ramos
2026-05-05 15:47:09 -06:00
parent 5cdca09f40
commit 845d843e71
6 changed files with 596 additions and 4 deletions

View File

@@ -2,15 +2,13 @@
"name": "cve-dashboard",
"version": "1.0.0",
"description": "STEAM Security Dashboard — vulnerability management for NTS-AEO",
"author": "Jordan Ramos <jordan.ramos@spectrum.com>",
"license": "UNLICENSED",
"author": "",
"license": "ISC",
"private": true,
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"bcryptjs": "^3.0.3",
"cookie-parser": "^1.4.7",
@@ -19,6 +17,7 @@
"express": "^5.2.1",
"express-rate-limit": "^7.5.0",
"multer": "^2.0.2",
"pg": "^8.20.0",
"sqlite3": "^5.1.7"
},
"devDependencies": {