2026-01-30 13:41:32 +01:00
|
|
|
import { router } from '../trpc'
|
|
|
|
|
import { programRouter } from './program'
|
|
|
|
|
import { roundRouter } from './round'
|
|
|
|
|
import { projectRouter } from './project'
|
|
|
|
|
import { userRouter } from './user'
|
|
|
|
|
import { assignmentRouter } from './assignment'
|
|
|
|
|
import { evaluationRouter } from './evaluation'
|
|
|
|
|
import { fileRouter } from './file'
|
|
|
|
|
import { exportRouter } from './export'
|
|
|
|
|
import { auditRouter } from './audit'
|
|
|
|
|
import { settingsRouter } from './settings'
|
|
|
|
|
import { gracePeriodRouter } from './gracePeriod'
|
|
|
|
|
// Phase 2 routers
|
|
|
|
|
import { learningResourceRouter } from './learningResource'
|
|
|
|
|
import { partnerRouter } from './partner'
|
|
|
|
|
import { notionImportRouter } from './notion-import'
|
|
|
|
|
import { typeformImportRouter } from './typeform-import'
|
|
|
|
|
// Phase 2B routers
|
|
|
|
|
import { tagRouter } from './tag'
|
|
|
|
|
import { applicantRouter } from './applicant'
|
|
|
|
|
import { liveVotingRouter } from './live-voting'
|
|
|
|
|
import { analyticsRouter } from './analytics'
|
|
|
|
|
// Storage routers
|
|
|
|
|
import { avatarRouter } from './avatar'
|
|
|
|
|
import { logoRouter } from './logo'
|
|
|
|
|
// Applicant system routers
|
|
|
|
|
import { applicationRouter } from './application'
|
|
|
|
|
import { mentorRouter } from './mentor'
|
Implement Prototype 1 improvements: unified members, project filters, audit expansion, filtering rounds, special awards
- Unified Member Management: merge /admin/users and /admin/mentors into /admin/members with role tabs, search, pagination
- Project List Filters: add search, multi-status filter, round/category/country selects, boolean toggles, URL persistence
- Audit Log Expansion: track logins, round state changes, evaluation submissions, file access, role changes via shared logAudit utility
- Founding Date Field: add foundedAt to Project model with CSV import support
- Filtering Round System: configurable rules (field-based, document check, AI screening), execution engine, results review with override/reinstate
- Special Awards System: named awards with eligibility criteria, dedicated jury, PICK_WINNER/RANKED/SCORED voting modes, AI eligibility
- Dashboard resilience: wrap heavy queries in try-catch to prevent error boundary on transient DB failures
- Reusable pagination component extracted to src/components/shared/pagination.tsx
- Old /admin/users and /admin/mentors routes redirect to /admin/members
- Prisma migration for all schema additions (additive, no data loss)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:58:29 +01:00
|
|
|
import { filteringRouter } from './filtering'
|
|
|
|
|
import { specialAwardRouter } from './specialAward'
|
2026-02-03 21:30:25 +01:00
|
|
|
import { notificationRouter } from './notification'
|
Implement 15 platform features: digest, availability, templates, comparison, live voting SSE, file versioning, mentorship, messaging, analytics, drafts, webhooks, peer review, audit enhancements, i18n
Features implemented:
- F1: Email digest notifications with cron endpoint and per-user frequency
- F2: Jury availability windows and workload preferences in smart assignment
- F3: Round templates with save-from-round and CRUD management
- F4: Side-by-side project comparison view for jury members
- F5: Real-time voting dashboard with Server-Sent Events (SSE)
- F6: Live voting UX: QR codes, audience voting, tie-breaking, score animations
- F7: File versioning, inline preview, bulk download with presigned URLs
- F8: Mentor dashboard: milestones, private notes, activity tracking
- F9: Communication hub with broadcasts, templates, and recipient targeting
- F10: Advanced analytics: cross-round comparison, juror consistency, diversity metrics, PDF export
- F11: Applicant draft saving with magic link resume and cron cleanup
- F12: Webhook integration layer with HMAC signing, retry, and delivery logs
- F13: Peer review discussions with anonymized scores and threaded comments
- F14: Audit log enhancements: before/after diffs, session grouping, anomaly detection, retention
- F15: i18n foundation with next-intl (EN/FR), cookie-based locale, language switcher
Schema: 12 new models, field additions to User, Project, ProjectFile, LiveVotingSession, LiveVote, MentorAssignment, AuditLog, Program
New routers: roundTemplate, message, webhook (registered in _app.ts)
New services: email-digest, webhook-dispatcher
New cron endpoints: /api/cron/digest, /api/cron/draft-cleanup, /api/cron/audit-cleanup
New API routes: /api/live-voting/stream (SSE), /api/files/bulk-download
All features are admin-configurable via SystemSettings or per-model settingsJson fields.
Docker build verified successfully.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 23:31:41 +01:00
|
|
|
// Feature expansion routers
|
|
|
|
|
import { roundTemplateRouter } from './roundTemplate'
|
|
|
|
|
import { messageRouter } from './message'
|
|
|
|
|
import { webhookRouter } from './webhook'
|
Add dynamic apply wizard customization with admin settings UI
- Create wizard config types, utilities, and defaults (wizard-config.ts)
- Add admin apply settings page with drag-and-drop step ordering, dropdown
option management, feature toggles, welcome message customization, and
custom field builder with select/multiselect options editor
- Build dynamic apply wizard component with animated step transitions,
mobile-first responsive design, and config-driven form validation
- Update step components to accept dynamic config (categories, ocean issues,
field visibility, feature flags)
- Replace hardcoded enum validation with string-based validation for
admin-configurable dropdown values, with safe enum casting at storage layer
- Add wizard template system (model, router, admin UI) with built-in
MOPC Classic preset
- Add program wizard config CRUD procedures to program router
- Update application router getConfig to return wizardConfig, submit handler
to store custom field data in metadataJson
- Add edition-based apply page, project pool page, and supporting routers
- Fix CSS (invalid sm:fixed-none), Enter key handler (skip textarea),
safe area insets for notched phones, buildStepsArray field visibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 13:18:20 +01:00
|
|
|
import { projectPoolRouter } from './project-pool'
|
|
|
|
|
import { wizardTemplateRouter } from './wizard-template'
|
Performance optimization, applicant portal, and missing DB migration
Performance:
- Convert admin dashboard from SSR to client-side tRPC (fixes 503/ChunkLoadError)
- New dashboard.getStats tRPC endpoint batches 16 queries into single response
- Parallelize jury dashboard queries (assignments + gracePeriods via Promise.all)
- Add project.getFullDetail combined endpoint (project + assignments + stats)
- Configure Prisma connection pool (connection_limit=20, pool_timeout=10)
- Add optimizePackageImports for lucide-react tree-shaking
- Increase React Query staleTime from 1min to 5min
Applicant portal:
- Add applicant layout, nav, dashboard, documents, team, and mentor pages
- Add applicant router with document and team management endpoints
- Add chunk error recovery utility
- Update role nav and auth redirect for applicant role
Database:
- Add migration for missing schema elements (SpecialAward job tracking
columns, WizardTemplate table, missing indexes)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 11:04:26 +01:00
|
|
|
import { dashboardRouter } from './dashboard'
|
2026-01-30 13:41:32 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Root tRPC router that combines all domain routers
|
|
|
|
|
*/
|
|
|
|
|
export const appRouter = router({
|
|
|
|
|
program: programRouter,
|
|
|
|
|
round: roundRouter,
|
|
|
|
|
project: projectRouter,
|
|
|
|
|
user: userRouter,
|
|
|
|
|
assignment: assignmentRouter,
|
|
|
|
|
evaluation: evaluationRouter,
|
|
|
|
|
file: fileRouter,
|
|
|
|
|
export: exportRouter,
|
|
|
|
|
audit: auditRouter,
|
|
|
|
|
settings: settingsRouter,
|
|
|
|
|
gracePeriod: gracePeriodRouter,
|
|
|
|
|
// Phase 2 routers
|
|
|
|
|
learningResource: learningResourceRouter,
|
|
|
|
|
partner: partnerRouter,
|
|
|
|
|
notionImport: notionImportRouter,
|
|
|
|
|
typeformImport: typeformImportRouter,
|
|
|
|
|
// Phase 2B routers
|
|
|
|
|
tag: tagRouter,
|
|
|
|
|
applicant: applicantRouter,
|
|
|
|
|
liveVoting: liveVotingRouter,
|
|
|
|
|
analytics: analyticsRouter,
|
|
|
|
|
// Storage routers
|
|
|
|
|
avatar: avatarRouter,
|
|
|
|
|
logo: logoRouter,
|
|
|
|
|
// Applicant system routers
|
|
|
|
|
application: applicationRouter,
|
|
|
|
|
mentor: mentorRouter,
|
Implement Prototype 1 improvements: unified members, project filters, audit expansion, filtering rounds, special awards
- Unified Member Management: merge /admin/users and /admin/mentors into /admin/members with role tabs, search, pagination
- Project List Filters: add search, multi-status filter, round/category/country selects, boolean toggles, URL persistence
- Audit Log Expansion: track logins, round state changes, evaluation submissions, file access, role changes via shared logAudit utility
- Founding Date Field: add foundedAt to Project model with CSV import support
- Filtering Round System: configurable rules (field-based, document check, AI screening), execution engine, results review with override/reinstate
- Special Awards System: named awards with eligibility criteria, dedicated jury, PICK_WINNER/RANKED/SCORED voting modes, AI eligibility
- Dashboard resilience: wrap heavy queries in try-catch to prevent error boundary on transient DB failures
- Reusable pagination component extracted to src/components/shared/pagination.tsx
- Old /admin/users and /admin/mentors routes redirect to /admin/members
- Prisma migration for all schema additions (additive, no data loss)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:58:29 +01:00
|
|
|
filtering: filteringRouter,
|
|
|
|
|
specialAward: specialAwardRouter,
|
2026-02-03 21:30:25 +01:00
|
|
|
notification: notificationRouter,
|
Implement 15 platform features: digest, availability, templates, comparison, live voting SSE, file versioning, mentorship, messaging, analytics, drafts, webhooks, peer review, audit enhancements, i18n
Features implemented:
- F1: Email digest notifications with cron endpoint and per-user frequency
- F2: Jury availability windows and workload preferences in smart assignment
- F3: Round templates with save-from-round and CRUD management
- F4: Side-by-side project comparison view for jury members
- F5: Real-time voting dashboard with Server-Sent Events (SSE)
- F6: Live voting UX: QR codes, audience voting, tie-breaking, score animations
- F7: File versioning, inline preview, bulk download with presigned URLs
- F8: Mentor dashboard: milestones, private notes, activity tracking
- F9: Communication hub with broadcasts, templates, and recipient targeting
- F10: Advanced analytics: cross-round comparison, juror consistency, diversity metrics, PDF export
- F11: Applicant draft saving with magic link resume and cron cleanup
- F12: Webhook integration layer with HMAC signing, retry, and delivery logs
- F13: Peer review discussions with anonymized scores and threaded comments
- F14: Audit log enhancements: before/after diffs, session grouping, anomaly detection, retention
- F15: i18n foundation with next-intl (EN/FR), cookie-based locale, language switcher
Schema: 12 new models, field additions to User, Project, ProjectFile, LiveVotingSession, LiveVote, MentorAssignment, AuditLog, Program
New routers: roundTemplate, message, webhook (registered in _app.ts)
New services: email-digest, webhook-dispatcher
New cron endpoints: /api/cron/digest, /api/cron/draft-cleanup, /api/cron/audit-cleanup
New API routes: /api/live-voting/stream (SSE), /api/files/bulk-download
All features are admin-configurable via SystemSettings or per-model settingsJson fields.
Docker build verified successfully.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 23:31:41 +01:00
|
|
|
// Feature expansion routers
|
|
|
|
|
roundTemplate: roundTemplateRouter,
|
|
|
|
|
message: messageRouter,
|
|
|
|
|
webhook: webhookRouter,
|
Add dynamic apply wizard customization with admin settings UI
- Create wizard config types, utilities, and defaults (wizard-config.ts)
- Add admin apply settings page with drag-and-drop step ordering, dropdown
option management, feature toggles, welcome message customization, and
custom field builder with select/multiselect options editor
- Build dynamic apply wizard component with animated step transitions,
mobile-first responsive design, and config-driven form validation
- Update step components to accept dynamic config (categories, ocean issues,
field visibility, feature flags)
- Replace hardcoded enum validation with string-based validation for
admin-configurable dropdown values, with safe enum casting at storage layer
- Add wizard template system (model, router, admin UI) with built-in
MOPC Classic preset
- Add program wizard config CRUD procedures to program router
- Update application router getConfig to return wizardConfig, submit handler
to store custom field data in metadataJson
- Add edition-based apply page, project pool page, and supporting routers
- Fix CSS (invalid sm:fixed-none), Enter key handler (skip textarea),
safe area insets for notched phones, buildStepsArray field visibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 13:18:20 +01:00
|
|
|
projectPool: projectPoolRouter,
|
|
|
|
|
wizardTemplate: wizardTemplateRouter,
|
Performance optimization, applicant portal, and missing DB migration
Performance:
- Convert admin dashboard from SSR to client-side tRPC (fixes 503/ChunkLoadError)
- New dashboard.getStats tRPC endpoint batches 16 queries into single response
- Parallelize jury dashboard queries (assignments + gracePeriods via Promise.all)
- Add project.getFullDetail combined endpoint (project + assignments + stats)
- Configure Prisma connection pool (connection_limit=20, pool_timeout=10)
- Add optimizePackageImports for lucide-react tree-shaking
- Increase React Query staleTime from 1min to 5min
Applicant portal:
- Add applicant layout, nav, dashboard, documents, team, and mentor pages
- Add applicant router with document and team management endpoints
- Add chunk error recovery utility
- Update role nav and auth redirect for applicant role
Database:
- Add migration for missing schema elements (SpecialAward job tracking
columns, WizardTemplate table, missing indexes)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 11:04:26 +01:00
|
|
|
dashboard: dashboardRouter,
|
2026-01-30 13:41:32 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export type AppRouter = typeof appRouter
|