- Created analytics service with summary, trends, comparison, and aggregated data methods - Implemented 5 analytics endpoints: summary, trends, comparison, aggregated, and CSV export - Added time series data with day/week/month interval support - Implemented period-over-period comparison metrics with percentage changes - Added CSV export functionality using json2csv - Updated frontend analytics service to unwrap API responses - Fixed chart components to work with new data structure (reportCount, eventCount, litterCollected) - Updated TypeScript types to match backend API structure - All endpoints tested and verified working Requirements satisfied: 5.1, 5.2, 5.3, 5.4, 5.5
50 lines
1.2 KiB
JSON
50 lines
1.2 KiB
JSON
{
|
|
"name": "beach-litter-api",
|
|
"version": "1.0.0",
|
|
"description": "Backend API for Beach Litter Mapping Platform",
|
|
"main": "dist/index.js",
|
|
"scripts": {
|
|
"dev": "tsx watch src/index.ts",
|
|
"build": "tsc",
|
|
"start": "node dist/index.js",
|
|
"prisma:generate": "prisma generate",
|
|
"prisma:migrate": "prisma migrate dev",
|
|
"prisma:studio": "prisma studio"
|
|
},
|
|
"keywords": [
|
|
"beach",
|
|
"litter",
|
|
"environment",
|
|
"api"
|
|
],
|
|
"author": "",
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@clerk/clerk-sdk-node": "^5.0.0",
|
|
"@prisma/client": "^5.22.0",
|
|
"axios": "^1.13.2",
|
|
"cors": "^2.8.5",
|
|
"dotenv": "^16.4.5",
|
|
"exifr": "^7.1.3",
|
|
"express": "^4.21.1",
|
|
"express-validator": "^7.2.0",
|
|
"helmet": "^8.0.0",
|
|
"json2csv": "^6.0.0-alpha.2",
|
|
"multer": "^1.4.5-lts.1",
|
|
"node-cron": "^4.2.1",
|
|
"redis": "^5.9.0",
|
|
"zod": "^3.23.8"
|
|
},
|
|
"devDependencies": {
|
|
"@types/cors": "^2.8.17",
|
|
"@types/express": "^5.0.0",
|
|
"@types/json2csv": "^5.0.7",
|
|
"@types/multer": "^1.4.12",
|
|
"@types/node": "^22.9.0",
|
|
"@types/node-cron": "^3.0.11",
|
|
"prisma": "^5.22.0",
|
|
"tsx": "^4.19.2",
|
|
"typescript": "^5.6.3"
|
|
}
|
|
}
|