✅ COMPLETED FEATURES: - Real-time cost monitoring with alerts and metrics - Document analysis caching for similar documents - Microservice architecture for document processing - 15 new API endpoints for Week 8 functionality - 6 new database tables for cost tracking and caching - TypeScript compilation fixes (40+ errors resolved) - Firebase testing environment deployment - Supabase database setup with all required tables 🔧 TECHNICAL IMPROVEMENTS: - Fixed circular dependencies in logger/config - Resolved TypeScript type mismatches - Implemented graceful database connection handling - Added circuit breakers for all external services - Enhanced error handling and logging - Optimized environment variable management 📊 INFRASTRUCTURE: - Firebase testing project: cim-summarizer-testing - Supabase testing database: ghurdhqdcrxeugyuxxqa.supabase.co - Google Cloud Storage buckets configured - Document AI processor active (ID: 575027767a9291f6) - All Week 8 database tables created 🧪 TESTING ENVIRONMENT: - Backend API deployed and operational - Health endpoints available - Cost monitoring endpoints ready - Caching functionality active - Microservice health monitoring 📋 TODO - NEXT PHASE: - [ ] Deploy frontend to Firebase Hosting - [ ] Set up production environment variables - [ ] Configure custom domain and SSL - [ ] Implement real-time monitoring dashboard - [ ] Add comprehensive API documentation - [ ] Set up automated testing pipeline - [ ] Configure production alerting - [ ] Implement backup and recovery procedures - [ ] Add performance benchmarking tools - [ ] Create user documentation and guides 🚀 DEPLOYMENT STATUS: - Backend: ✅ LIVE (https://cim-summarizer-testing.web.app/api) - Database: ✅ CONNECTED (all tables created) - External Services: ✅ CONFIGURED - Week 8 Features: ✅ OPERATIONAL This commit represents the successful completion of all Week 8 objectives with a fully functional testing environment ready for validation.
120 lines
4.9 KiB
JSON
120 lines
4.9 KiB
JSON
{
|
|
"name": "cim-processor-backend",
|
|
"version": "1.0.0",
|
|
"description": "Backend API for CIM Document Processor",
|
|
"main": "dist/index.js",
|
|
"scripts": {
|
|
"dev": "ts-node-dev --respawn --transpile-only --max-old-space-size=8192 --expose-gc src/index.ts",
|
|
"dev:testing": "NODE_ENV=testing ts-node-dev --respawn --transpile-only --max-old-space-size=8192 --expose-gc src/index.ts",
|
|
"build": "tsc --skipLibCheck && node src/scripts/prepare-dist.js && cp .puppeteerrc.cjs dist/",
|
|
"start": "node --max-old-space-size=8192 --expose-gc dist/index.js",
|
|
"test:gcs": "ts-node src/scripts/test-gcs-integration.ts",
|
|
"test:staging": "ts-node src/scripts/test-staging-environment.ts",
|
|
"test:environment": "NODE_ENV=testing npm run test:staging",
|
|
"setup:gcs": "ts-node src/scripts/setup-gcs-permissions.ts",
|
|
"lint": "eslint src --ext .ts",
|
|
"lint:fix": "eslint src --ext .ts --fix",
|
|
"db:migrate": "ts-node src/scripts/setup-database.ts",
|
|
"db:seed": "ts-node src/models/seed.ts",
|
|
"db:setup": "npm run db:migrate && node scripts/setup_supabase.js",
|
|
"db:setup-sharing": "ts-node src/scripts/setup-document-sharing.ts",
|
|
"db:setup-sharing-firebase": "ts-node src/scripts/setup-document-sharing-firebase.ts",
|
|
"deploy:firebase": "npm run build && firebase deploy --only functions",
|
|
"deploy:testing": "firebase use testing && npm run build && firebase deploy --only functions --config firebase-testing.json",
|
|
"deploy:production": "firebase use production && npm run build && firebase deploy --only functions",
|
|
"deploy:cloud-run": "npm run build && gcloud run deploy cim-processor-backend --source . --region us-central1 --platform managed --allow-unauthenticated",
|
|
"deploy:docker": "npm run build && docker build -t cim-processor-backend . && docker run -p 8080:8080 cim-processor-backend",
|
|
"docker:build": "docker build -t cim-processor-backend .",
|
|
"docker:push": "docker tag cim-processor-backend gcr.io/cim-summarizer/cim-processor-backend:latest && docker push gcr.io/cim-summarizer/cim-processor-backend:latest",
|
|
"emulator": "firebase emulators:start --only functions",
|
|
"emulator:ui": "firebase emulators:start --only functions --ui",
|
|
"test:email": "ts-node src/scripts/test-email-service.ts",
|
|
"test": "jest",
|
|
"test:watch": "jest --watch",
|
|
"test:coverage": "jest --coverage",
|
|
"test:unit": "jest --testPathPattern=unit",
|
|
"test:integration": "jest --testPathPattern=integration",
|
|
"test:api": "jest --testPathPattern=api",
|
|
"test:health": "jest --testPathPattern=health",
|
|
"test:circuit-breaker": "jest --testPathPattern=circuit-breaker",
|
|
"prepare": "echo 'Skipping husky install for deployment'",
|
|
"pre-commit": "lint-staged",
|
|
"format": "prettier --write \"src/**/*.{ts,js,json}\"",
|
|
"format:check": "prettier --check \"src/**/*.{ts,js,json}\"",
|
|
"type-check": "tsc --noEmit",
|
|
"quality-check": "npm run lint && npm run format:check && npm run type-check"
|
|
},
|
|
"lint-staged": {
|
|
"*.{ts,js}": [
|
|
"eslint --fix",
|
|
"prettier --write",
|
|
"git add"
|
|
],
|
|
"*.{json,md}": [
|
|
"prettier --write",
|
|
"git add"
|
|
]
|
|
},
|
|
"dependencies": {
|
|
"@anthropic-ai/sdk": "^0.57.0",
|
|
"@google-cloud/documentai": "^9.3.0",
|
|
"@google-cloud/storage": "^7.16.0",
|
|
"@supabase/supabase-js": "^2.53.0",
|
|
"@types/pdfkit": "^0.17.2",
|
|
"axios": "^1.11.0",
|
|
"bcryptjs": "^2.4.3",
|
|
"cors": "^2.8.5",
|
|
"dotenv": "^16.3.1",
|
|
"express": "^4.18.2",
|
|
"express-rate-limit": "^7.1.5",
|
|
"firebase-admin": "^13.4.0",
|
|
"firebase-functions": "^6.4.0",
|
|
"helmet": "^7.1.0",
|
|
"joi": "^17.11.0",
|
|
"jsonwebtoken": "^9.0.2",
|
|
"morgan": "^1.10.0",
|
|
"nodemailer": "^6.9.7",
|
|
"openai": "^5.10.2",
|
|
"pdf-parse": "^1.1.1",
|
|
"pdfkit": "^0.17.1",
|
|
"pg": "^8.11.3",
|
|
"puppeteer": "^21.11.0",
|
|
"redis": "^4.6.10",
|
|
"uuid": "^11.1.0",
|
|
"winston": "^3.11.0",
|
|
"zod": "^3.25.76"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bcryptjs": "^2.4.6",
|
|
"@types/cors": "^2.8.17",
|
|
"@types/express": "^4.17.21",
|
|
"@types/jsonwebtoken": "^9.0.5",
|
|
"@types/morgan": "^1.9.9",
|
|
"@types/node": "^20.9.0",
|
|
"@types/nodemailer": "^6.4.14",
|
|
"@types/pdf-parse": "^1.1.4",
|
|
"@types/pg": "^8.10.7",
|
|
"@types/uuid": "^10.0.0",
|
|
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
"@typescript-eslint/parser": "^6.10.0",
|
|
"eslint": "^8.53.0",
|
|
"ts-node-dev": "^2.0.0",
|
|
"typescript": "^5.2.2",
|
|
"jest": "^29.7.0",
|
|
"@types/jest": "^29.5.8",
|
|
"ts-jest": "^29.1.1",
|
|
"supertest": "^6.3.3",
|
|
"@types/supertest": "^2.0.16",
|
|
"jest-environment-node": "^29.7.0",
|
|
"jest-extended": "^4.0.2",
|
|
"husky": "^8.0.3",
|
|
"lint-staged": "^15.2.0",
|
|
"prettier": "^3.1.0",
|
|
"@types/prettier": "^3.0.0",
|
|
"swagger-jsdoc": "^6.2.8",
|
|
"swagger-ui-express": "^5.0.0",
|
|
"@types/swagger-jsdoc": "^6.0.4",
|
|
"@types/swagger-ui-express": "^4.1.6"
|
|
}
|
|
}
|