feat: add analytics dashboard and registration page with updated Next.js routing configuration
Some checks failed
Build and Push App / build (push) Failing after 22m29s
Some checks failed
Build and Push App / build (push) Failing after 22m29s
This commit is contained in:
41
admin/package-lock.json
generated
41
admin/package-lock.json
generated
@@ -12,6 +12,7 @@
|
||||
"@prisma/client": "^7.7.0",
|
||||
"@prisma/config": "^7.7.0",
|
||||
"@types/bcryptjs": "^2.4.6",
|
||||
"afrohub": "file:..",
|
||||
"bcryptjs": "^3.0.3",
|
||||
"dotenv": "^17.4.1",
|
||||
"lucide-react": "^1.8.0",
|
||||
@@ -35,6 +36,42 @@
|
||||
"typescript": "^5"
|
||||
}
|
||||
},
|
||||
"..": {
|
||||
"name": "afrohub",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@google/genai": "^1.30.0",
|
||||
"@prisma/adapter-pg": "^7.6.0",
|
||||
"@prisma/client": "^7.6.0",
|
||||
"@prisma/config": "^7.6.0",
|
||||
"@tailwindcss/postcss": "^4.2.2",
|
||||
"@tailwindcss/typography": "^0.5.19",
|
||||
"@types/bcryptjs": "^2.4.6",
|
||||
"@types/node": "^22.14.0",
|
||||
"@types/pg": "^8.16.0",
|
||||
"autoprefixer": "^10.4.27",
|
||||
"bcryptjs": "^3.0.3",
|
||||
"dotenv": "^17.3.1",
|
||||
"lucide-react": "^0.554.0",
|
||||
"next": "^16.1.6",
|
||||
"pg": "^8.19.0",
|
||||
"postcss": "^8.5.10",
|
||||
"prisma": "^7.6.0",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"react-hot-toast": "^2.6.0",
|
||||
"recharts": "^3.8.1",
|
||||
"tailwindcss": "^4.2.2",
|
||||
"tsx": "^4.21.0",
|
||||
"typescript": "~5.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^9.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "24.x"
|
||||
}
|
||||
},
|
||||
"node_modules/@alloc/quick-lru": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
|
||||
@@ -2599,6 +2636,10 @@
|
||||
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/afrohub": {
|
||||
"resolved": "..",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/ajv": {
|
||||
"version": "6.14.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"@prisma/client": "^7.7.0",
|
||||
"@prisma/config": "^7.7.0",
|
||||
"@types/bcryptjs": "^2.4.6",
|
||||
"afrohub": "file:..",
|
||||
"bcryptjs": "^3.0.3",
|
||||
"dotenv": "^17.4.1",
|
||||
"lucide-react": "^1.8.0",
|
||||
@@ -35,4 +36,4 @@
|
||||
"tailwindcss": "^4",
|
||||
"typescript": "^5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,6 +136,7 @@ async function getMetrics(range: string = 'week', from?: string, to?: string) {
|
||||
|
||||
const recentIPs = await Promise.all(
|
||||
recentUniqueIPs.map(async (item) => {
|
||||
if (!item.ip || !item._max.createdAt) return null;
|
||||
return await prisma.analyticsEvent.findFirst({
|
||||
where: {
|
||||
ip: item.ip,
|
||||
|
||||
Reference in New Issue
Block a user