|
| 1 | +// Hackathon data types and mock data generator |
| 2 | + |
| 3 | +export interface Agenda { |
| 4 | + summary: string; |
| 5 | + name: string; |
| 6 | + type: 'workshop' | 'presentation' | 'coding' | 'break' | 'ceremony'; |
| 7 | + startedAt: Date; |
| 8 | + endedAt: Date; |
| 9 | +} |
| 10 | + |
| 11 | +export interface Person { |
| 12 | + name: string; |
| 13 | + avatar: string; |
| 14 | + gender: 'male' | 'female' | 'other'; |
| 15 | + age: number; |
| 16 | + address: string; |
| 17 | + organizations: string[]; |
| 18 | + skills: string[]; |
| 19 | + githubLink: string; |
| 20 | + githubAccount: string; |
| 21 | + createdBy: string; |
| 22 | +} |
| 23 | + |
| 24 | +export interface Organization { |
| 25 | + name: string; |
| 26 | + logo: string; |
| 27 | + link: string; |
| 28 | + members: string[]; |
| 29 | + prizes: string[]; |
| 30 | +} |
| 31 | + |
| 32 | +export interface Prize { |
| 33 | + name: string; |
| 34 | + image: string; |
| 35 | + price: number; |
| 36 | + amount: number; |
| 37 | + level: 'gold' | 'silver' | 'bronze' | 'special'; |
| 38 | + sponsor: string; |
| 39 | +} |
| 40 | + |
| 41 | +export interface Template { |
| 42 | + name: string; |
| 43 | + summary: string; |
| 44 | + sourceLink: string; |
| 45 | + previewLink: string; |
| 46 | +} |
| 47 | + |
| 48 | +export interface Project { |
| 49 | + name: string; |
| 50 | + summary: string; |
| 51 | + createdBy: string; |
| 52 | + group: string[]; |
| 53 | + members: string[]; |
| 54 | + products: string[]; |
| 55 | + score: number; |
| 56 | +} |
| 57 | + |
| 58 | +export interface Hackathon { |
| 59 | + id: string; |
| 60 | + title: string; |
| 61 | + description: string; |
| 62 | + startDate: Date; |
| 63 | + endDate: Date; |
| 64 | + location: string; |
| 65 | + agenda: Agenda[]; |
| 66 | + people: Person[]; |
| 67 | + organizations: Organization[]; |
| 68 | + prizes: Prize[]; |
| 69 | + templates: Template[]; |
| 70 | + projects: Project[]; |
| 71 | +} |
| 72 | + |
| 73 | +// Mock data generator |
| 74 | +export function generateMockHackathon(id: string): Hackathon { |
| 75 | + return { |
| 76 | + id, |
| 77 | + title: 'Open Source Innovation Hackathon 2026', |
| 78 | + description: |
| 79 | + 'A 48-hour coding marathon bringing together developers, designers, and innovators to build the future of open source software.', |
| 80 | + startDate: new Date('2026-03-15T09:00:00'), |
| 81 | + endDate: new Date('2026-03-17T18:00:00'), |
| 82 | + location: 'Virtual & On-site (Beijing)', |
| 83 | + agenda: [ |
| 84 | + { |
| 85 | + summary: 'Welcome participants and introduce the hackathon theme', |
| 86 | + name: 'Opening Ceremony', |
| 87 | + type: 'ceremony', |
| 88 | + startedAt: new Date('2026-03-15T09:00:00'), |
| 89 | + endedAt: new Date('2026-03-15T10:00:00'), |
| 90 | + }, |
| 91 | + { |
| 92 | + summary: 'Introduction to modern web development frameworks', |
| 93 | + name: 'Web Development Workshop', |
| 94 | + type: 'workshop', |
| 95 | + startedAt: new Date('2026-03-15T10:30:00'), |
| 96 | + endedAt: new Date('2026-03-15T12:00:00'), |
| 97 | + }, |
| 98 | + { |
| 99 | + summary: 'Lunch break and networking', |
| 100 | + name: 'Lunch & Networking', |
| 101 | + type: 'break', |
| 102 | + startedAt: new Date('2026-03-15T12:00:00'), |
| 103 | + endedAt: new Date('2026-03-15T13:30:00'), |
| 104 | + }, |
| 105 | + { |
| 106 | + summary: 'Teams start working on their projects', |
| 107 | + name: 'Coding Session - Day 1', |
| 108 | + type: 'coding', |
| 109 | + startedAt: new Date('2026-03-15T13:30:00'), |
| 110 | + endedAt: new Date('2026-03-15T22:00:00'), |
| 111 | + }, |
| 112 | + { |
| 113 | + summary: 'Continue development and team collaboration', |
| 114 | + name: 'Coding Session - Day 2', |
| 115 | + type: 'coding', |
| 116 | + startedAt: new Date('2026-03-16T09:00:00'), |
| 117 | + endedAt: new Date('2026-03-16T22:00:00'), |
| 118 | + }, |
| 119 | + { |
| 120 | + summary: 'Final sprint for project completion', |
| 121 | + name: 'Coding Session - Day 3', |
| 122 | + type: 'coding', |
| 123 | + startedAt: new Date('2026-03-17T09:00:00'), |
| 124 | + endedAt: new Date('2026-03-17T14:00:00'), |
| 125 | + }, |
| 126 | + { |
| 127 | + summary: 'Teams present their projects to judges', |
| 128 | + name: 'Project Presentations', |
| 129 | + type: 'presentation', |
| 130 | + startedAt: new Date('2026-03-17T14:30:00'), |
| 131 | + endedAt: new Date('2026-03-17T17:00:00'), |
| 132 | + }, |
| 133 | + { |
| 134 | + summary: 'Announce winners and distribute prizes', |
| 135 | + name: 'Awards Ceremony', |
| 136 | + type: 'ceremony', |
| 137 | + startedAt: new Date('2026-03-17T17:00:00'), |
| 138 | + endedAt: new Date('2026-03-17T18:00:00'), |
| 139 | + }, |
| 140 | + ], |
| 141 | + people: [ |
| 142 | + { |
| 143 | + name: 'Li Wei', |
| 144 | + avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=liwei', |
| 145 | + gender: 'male', |
| 146 | + age: 28, |
| 147 | + address: 'Beijing, China', |
| 148 | + organizations: ['Tech Innovators', 'Open Source Alliance'], |
| 149 | + skills: ['React', 'Node.js', 'TypeScript', 'GraphQL'], |
| 150 | + githubLink: 'https://github.com/liwei-dev', |
| 151 | + githubAccount: 'liwei-dev', |
| 152 | + createdBy: 'admin', |
| 153 | + }, |
| 154 | + { |
| 155 | + name: 'Zhang Mei', |
| 156 | + avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=zhangmei', |
| 157 | + gender: 'female', |
| 158 | + age: 26, |
| 159 | + address: 'Shanghai, China', |
| 160 | + organizations: ['Cloud Computing Society'], |
| 161 | + skills: ['Python', 'Django', 'Machine Learning', 'Docker'], |
| 162 | + githubLink: 'https://github.com/zhangmei-ml', |
| 163 | + githubAccount: 'zhangmei-ml', |
| 164 | + createdBy: 'admin', |
| 165 | + }, |
| 166 | + { |
| 167 | + name: 'Wang Jun', |
| 168 | + avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=wangjun', |
| 169 | + gender: 'male', |
| 170 | + age: 30, |
| 171 | + address: 'Shenzhen, China', |
| 172 | + organizations: ['DevOps Guild', 'Open Source Alliance'], |
| 173 | + skills: ['Kubernetes', 'Go', 'AWS', 'CI/CD'], |
| 174 | + githubLink: 'https://github.com/wangjun-ops', |
| 175 | + githubAccount: 'wangjun-ops', |
| 176 | + createdBy: 'admin', |
| 177 | + }, |
| 178 | + { |
| 179 | + name: 'Chen Xiao', |
| 180 | + avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=chenxiao', |
| 181 | + gender: 'female', |
| 182 | + age: 24, |
| 183 | + address: 'Hangzhou, China', |
| 184 | + organizations: ['UI/UX Designers Hub'], |
| 185 | + skills: ['Figma', 'React', 'CSS', 'Design Systems'], |
| 186 | + githubLink: 'https://github.com/chenxiao-design', |
| 187 | + githubAccount: 'chenxiao-design', |
| 188 | + createdBy: 'admin', |
| 189 | + }, |
| 190 | + ], |
| 191 | + organizations: [ |
| 192 | + { |
| 193 | + name: 'Tech Innovators', |
| 194 | + logo: 'https://api.dicebear.com/7.x/identicon/svg?seed=techinnovators', |
| 195 | + link: 'https://techinnovators.example.com', |
| 196 | + members: ['Li Wei', 'Wang Jun'], |
| 197 | + prizes: ['Best Innovation Award'], |
| 198 | + }, |
| 199 | + { |
| 200 | + name: 'Cloud Computing Society', |
| 201 | + logo: 'https://api.dicebear.com/7.x/identicon/svg?seed=cloudcomputing', |
| 202 | + link: 'https://cloudcomputing.example.com', |
| 203 | + members: ['Zhang Mei'], |
| 204 | + prizes: ['Best Cloud Solution'], |
| 205 | + }, |
| 206 | + { |
| 207 | + name: 'Open Source Alliance', |
| 208 | + logo: 'https://api.dicebear.com/7.x/identicon/svg?seed=opensource', |
| 209 | + link: 'https://opensource.example.com', |
| 210 | + members: ['Li Wei', 'Wang Jun'], |
| 211 | + prizes: ['Community Choice Award', 'Best Open Source Project'], |
| 212 | + }, |
| 213 | + { |
| 214 | + name: 'UI/UX Designers Hub', |
| 215 | + logo: 'https://api.dicebear.com/7.x/identicon/svg?seed=uiuxhub', |
| 216 | + link: 'https://uiuxhub.example.com', |
| 217 | + members: ['Chen Xiao'], |
| 218 | + prizes: ['Best Design Award'], |
| 219 | + }, |
| 220 | + ], |
| 221 | + prizes: [ |
| 222 | + { |
| 223 | + name: 'Best Innovation Award', |
| 224 | + image: 'https://api.dicebear.com/7.x/shapes/svg?seed=gold', |
| 225 | + price: 10000, |
| 226 | + amount: 1, |
| 227 | + level: 'gold', |
| 228 | + sponsor: 'Tech Innovators', |
| 229 | + }, |
| 230 | + { |
| 231 | + name: 'Best Cloud Solution', |
| 232 | + image: 'https://api.dicebear.com/7.x/shapes/svg?seed=silver', |
| 233 | + price: 7000, |
| 234 | + amount: 1, |
| 235 | + level: 'silver', |
| 236 | + sponsor: 'Cloud Computing Society', |
| 237 | + }, |
| 238 | + { |
| 239 | + name: 'Best Design Award', |
| 240 | + image: 'https://api.dicebear.com/7.x/shapes/svg?seed=bronze', |
| 241 | + price: 5000, |
| 242 | + amount: 1, |
| 243 | + level: 'bronze', |
| 244 | + sponsor: 'UI/UX Designers Hub', |
| 245 | + }, |
| 246 | + { |
| 247 | + name: 'Community Choice Award', |
| 248 | + image: 'https://api.dicebear.com/7.x/shapes/svg?seed=special1', |
| 249 | + price: 3000, |
| 250 | + amount: 2, |
| 251 | + level: 'special', |
| 252 | + sponsor: 'Open Source Alliance', |
| 253 | + }, |
| 254 | + { |
| 255 | + name: 'Best Open Source Project', |
| 256 | + image: 'https://api.dicebear.com/7.x/shapes/svg?seed=special2', |
| 257 | + price: 5000, |
| 258 | + amount: 1, |
| 259 | + level: 'special', |
| 260 | + sponsor: 'Open Source Alliance', |
| 261 | + }, |
| 262 | + ], |
| 263 | + templates: [ |
| 264 | + { |
| 265 | + name: 'React TypeScript Starter', |
| 266 | + summary: 'A modern React template with TypeScript, ESLint, and Prettier pre-configured', |
| 267 | + sourceLink: 'https://github.com/templates/react-typescript-starter', |
| 268 | + previewLink: 'https://react-ts-starter.demo.com', |
| 269 | + }, |
| 270 | + { |
| 271 | + name: 'Next.js Full-stack Template', |
| 272 | + summary: 'Complete Next.js setup with API routes, authentication, and database integration', |
| 273 | + sourceLink: 'https://github.com/templates/nextjs-fullstack', |
| 274 | + previewLink: 'https://nextjs-fullstack.demo.com', |
| 275 | + }, |
| 276 | + { |
| 277 | + name: 'Python FastAPI Starter', |
| 278 | + summary: 'FastAPI template with PostgreSQL, Docker, and comprehensive testing setup', |
| 279 | + sourceLink: 'https://github.com/templates/fastapi-starter', |
| 280 | + previewLink: 'https://fastapi-starter.demo.com', |
| 281 | + }, |
| 282 | + { |
| 283 | + name: 'Kubernetes Microservices', |
| 284 | + summary: 'Production-ready microservices architecture with Kubernetes manifests', |
| 285 | + sourceLink: 'https://github.com/templates/k8s-microservices', |
| 286 | + previewLink: 'https://k8s-microservices.demo.com', |
| 287 | + }, |
| 288 | + ], |
| 289 | + projects: [ |
| 290 | + { |
| 291 | + name: 'EcoTracker', |
| 292 | + summary: |
| 293 | + 'A mobile app for tracking personal carbon footprint and suggesting eco-friendly alternatives', |
| 294 | + createdBy: 'Li Wei', |
| 295 | + group: ['Team Green'], |
| 296 | + members: ['Li Wei', 'Chen Xiao'], |
| 297 | + products: ['Mobile App', 'API Backend'], |
| 298 | + score: 95, |
| 299 | + }, |
| 300 | + { |
| 301 | + name: 'CodeMentor AI', |
| 302 | + summary: |
| 303 | + 'AI-powered code review assistant that provides real-time suggestions and best practices', |
| 304 | + createdBy: 'Zhang Mei', |
| 305 | + group: ['AI Innovators'], |
| 306 | + members: ['Zhang Mei'], |
| 307 | + products: ['VS Code Extension', 'Web Dashboard'], |
| 308 | + score: 92, |
| 309 | + }, |
| 310 | + { |
| 311 | + name: 'CloudOps Dashboard', |
| 312 | + summary: 'Unified monitoring dashboard for multi-cloud infrastructure management', |
| 313 | + createdBy: 'Wang Jun', |
| 314 | + group: ['DevOps Masters'], |
| 315 | + members: ['Wang Jun'], |
| 316 | + products: ['Web Application', 'CLI Tool'], |
| 317 | + score: 88, |
| 318 | + }, |
| 319 | + { |
| 320 | + name: 'DesignSync', |
| 321 | + summary: 'Collaborative design tool that syncs Figma designs with development code', |
| 322 | + createdBy: 'Chen Xiao', |
| 323 | + group: ['Design Tech'], |
| 324 | + members: ['Chen Xiao', 'Li Wei'], |
| 325 | + products: ['Figma Plugin', 'React Component Library'], |
| 326 | + score: 90, |
| 327 | + }, |
| 328 | + ], |
| 329 | + }; |
| 330 | +} |
0 commit comments