Competition/Round architecture: full platform rewrite (Phases 1-9)
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m45s

Replace Pipeline/Stage system with Competition/Round architecture.
New schema: Competition, Round (7 types), JuryGroup, AssignmentPolicy,
ProjectRoundState, DeliberationSession, ResultLock, SubmissionWindow.
New services: round-engine, round-assignment, deliberation, result-lock,
submission-manager, competition-context, ai-prompt-guard.
Full admin/jury/applicant/mentor UI rewrite. AI prompt hardening with
structured prompts, retry logic, and injection detection. All legacy
pipeline/stage code removed. 4 new migrations + seed aligned.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 23:04:15 +01:00
parent 9ab4717f96
commit 6ca39c976b
349 changed files with 69938 additions and 28767 deletions

View File

@@ -28,12 +28,12 @@ import {
ChevronRight,
BookOpen,
Handshake,
CircleDot,
History,
Trophy,
User,
MessageSquare,
LayoutTemplate,
Medal,
} from 'lucide-react'
import { getInitials } from '@/lib/utils'
import { Logo } from '@/components/shared/logo'
@@ -69,9 +69,9 @@ const navigation: NavItem[] = [
icon: LayoutDashboard,
},
{
name: 'Rounds',
href: '/admin/rounds/pipelines',
icon: CircleDot,
name: 'Competitions',
href: '/admin/competitions',
icon: Medal,
},
{
name: 'Awards',
@@ -223,7 +223,7 @@ export function AdminSidebar({ user }: AdminSidebarProps) {
pathname === item.href ||
(item.href !== '/admin' && pathname.startsWith(item.href))
const isParentActive = item.subItems
? pathname.startsWith('/admin/rounds')
? pathname.startsWith('/admin/competitions')
: false
return (
<div key={item.name}>
@@ -247,7 +247,7 @@ export function AdminSidebar({ user }: AdminSidebarProps) {
<div className="ml-7 mt-0.5 space-y-0.5">
{item.subItems.map((sub) => {
const isSubActive = pathname === sub.href ||
(sub.href !== '/admin/rounds' && pathname.startsWith(sub.href))
(sub.href !== '/admin/competitions' && pathname.startsWith(sub.href))
return (
<Link
key={sub.name}

View File

@@ -20,8 +20,8 @@ export function ApplicantNav({ user }: ApplicantNavProps) {
icon: Users,
},
{
name: 'Pipeline',
href: '/applicant/pipeline',
name: 'Competitions',
href: '/applicant/competitions',
icon: Layers,
},
{

View File

@@ -19,15 +19,15 @@ function RemainingBadge() {
const now = new Date()
const remaining = (assignments as Array<{
stage: { status: string; windowOpenAt: Date | null; windowCloseAt: Date | null } | null
round: { status: string; windowOpenAt: Date | null; windowCloseAt: Date | null } | null
evaluation: { status: string } | null
}>).filter((a) => {
const isActive =
a.stage?.status === 'STAGE_ACTIVE' &&
a.stage.windowOpenAt &&
a.stage.windowCloseAt &&
new Date(a.stage.windowOpenAt) <= now &&
new Date(a.stage.windowCloseAt) >= now
a.round?.status === 'ROUND_ACTIVE' &&
a.round.windowOpenAt &&
a.round.windowCloseAt &&
new Date(a.round.windowOpenAt) <= now &&
new Date(a.round.windowCloseAt) >= now
const isIncomplete = !a.evaluation || a.evaluation.status !== 'SUBMITTED'
return isActive && isIncomplete
}).length
@@ -49,8 +49,8 @@ export function JuryNav({ user }: JuryNavProps) {
icon: Home,
},
{
name: 'Stages',
href: '/jury/stages',
name: 'Competitions',
href: '/jury/competitions',
icon: Layers,
},
{