Skip to content
This repository was archived by the owner on Sep 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bc2f675
First MVP
nilsreichardt May 1, 2025
da9e4ee
Display placement and scrolling
nilsreichardt May 1, 2025
875242f
Add tooltip and better naming of challenges
nilsreichardt May 2, 2025
d45fc34
Add case description
nilsreichardt May 2, 2025
42f2cc3
Display cases on the desktop as columns
nilsreichardt May 2, 2025
26e85b6
Crop beam logo
nilsreichardt May 2, 2025
e1bd610
Replace Trade Republic logo with png version
nilsreichardt May 2, 2025
c05c85b
Add case description
nilsreichardt May 2, 2025
246cd9a
Improve challenge winner section
nilsreichardt May 2, 2025
6e61f26
Change background color to white
nilsreichardt May 2, 2025
d07e685
Dynamic overscroll color
nilsreichardt May 2, 2025
13171f4
Merge remote-tracking branch 'origin/main' into projects-page
nilsreichardt May 2, 2025
cbb1d4e
Fix NavBar for projects page
nilsreichardt May 2, 2025
1dbbae6
Add sponsor wall at bottom of the page
nilsreichardt May 2, 2025
29f466d
dialog white and margin
nilsreichardt May 2, 2025
3f38d04
Add to be announced if no one project is assigned
nilsreichardt May 2, 2025
d18c4f8
Merge remote-tracking branch 'origin/main' into projects-page
nilsreichardt May 7, 2025
de0dc6d
Add generate case script
nilsreichardt May 10, 2025
938f583
Add script for generating the challenge csv files
nilsreichardt May 10, 2025
c841ded
Update Challenges
nilsreichardt May 10, 2025
5d6198d
Rename scripts
nilsreichardt May 10, 2025
5dd5721
Rename scripts
nilsreichardt May 10, 2025
a270792
update readme
nilsreichardt May 10, 2025
de8f20f
Merge remote-tracking branch 'origin/main' into projects-page
nilsreichardt May 10, 2025
3534484
Remove dummy projects
nilsreichardt May 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions platform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,28 @@ The platform consists of:
- Firestore database for storing team and submission data
- Mailgun for sending automated emails
- Discord integration for monitoring and error reporting

## Flow

### Friday: Team Registration

0. Setup Google Service Account, Mailgun API Key
1. Team registration
2. Download completed submissions from Formbricks, rename to `hackathon_participants.csv`
3. Run `platform/team-allocation/team_allocation.py`
4. Run `platform/team-allocation/send_team_emails.js` (disable test mode in the script)

### Sunday: Submission

0. Setup Google Service Account, Mailgun API Key
1. Download completed submissions from Formbricks, rename to `submissions.csv`
2. Copy `submissions.csv` to `platform/submission/submissions.csv`
3. Navigate to `platform/submission`
4. Run:
```bash
npx tsx src/genreate-project-page-data.ts
npx tsx src/generate-challenge-scoring.ts
npx tsx src/generate-case-scoring.ts
```
5. Commit your changes to deploy the website
6. Import csv files into Google Sheets
1 change: 1 addition & 0 deletions platform/backend/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"main": "lib/index.js",
"dependencies": {
"csv-parse": "^5.5.3",
"dotenv": "^16.5.0",
"firebase-admin": "^13.2.0",
"firebase-functions": "^6.3.2",
Expand Down
120 changes: 120 additions & 0 deletions platform/backend/functions/src/convert-submissions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
import * as admin from "firebase-admin";
import { parse } from "csv-parse/sync";
import * as fs from "fs";
import * as path from "path";
import { firestore } from "./gcp_global";

interface Project {
id: string;
name: string;
case: "Trade Republic" | "avi" | "beam";
description: string;
pitch: string;
githubUrl: string;
videoUrl: string;
placement?: 1 | 2;
challenges?: Array<{
name: string;
sponsoredBy: string;
companies: Array<{
name: string;
url?: string;
logoPath: string;
logoClass: string;
}>;
}>;
}

interface TeamData {
name: string;
emails: string[];
case: "Trade Republic" | "avi" | "beam";
}

async function convertSubmissions() {
try {
// Read CSV file
const csvContent = fs.readFileSync(
path.join(__dirname, "../../../website/export-submission-2025-05-07-08-43-55.csv"),
"utf-8"
);

// Parse CSV
const records = parse(csvContent, {
columns: true,
skip_empty_lines: true,
});

const projects: Project[] = [];

// Process each record
for (const record of records) {
const teamCode = record["1. What is your team code?"];

// Fetch team data from Firestore
const teamDoc = await firestore
.collection("Teams")
.doc(teamCode.toLowerCase())
.get();

if (!teamDoc.exists) {
console.warn(`Team with code ${teamCode} not found in Firestore`);
continue;
}

const teamData = teamDoc.data() as TeamData;

// Parse challenges
const challenges = record["5. Challenges"]
? record["5. Challenges"]
.split(";")
.map((challenge: string) => {
const match = challenge.match(/"([^"]+)" by ([^"]+)/);
if (match) {
return {
name: match[1],
sponsoredBy: match[2],
companies: [], // You'll need to map these based on your challenges data
};
}
return null;
})
.filter(Boolean)
: [];

const project: Project = {
id: `project-${teamCode.toLowerCase()}`,
name: record["7. What is your project?"].split(".")[0], // Take first sentence as name
case: teamData.case,
description: record["7. What is your project?"],
pitch: record["6. One sentence pitch"],
githubUrl: record["2. GitHub Repository"],
videoUrl: record["4. Pitch video"],
challenges: challenges.length > 0 ? challenges : undefined,
};

projects.push(project);
}

// Generate TypeScript file
const tsContent = `// This file is auto-generated. Do not edit manually.
import { Project } from "./projects-page-config";

export const projects: Project[] = ${JSON.stringify(projects, null, 2)};
`;

// Write to file
fs.writeFileSync(
path.join(__dirname, "../../../website/src/constants/projects.ts"),
tsContent
);

console.log("Successfully converted submissions to projects.ts");
} catch (error) {
console.error("Error converting submissions:", error);
process.exit(1);
}
}

// Run the conversion
convertSubmissions();
6 changes: 6 additions & 0 deletions platform/submission/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
dist/
service-account.json
key_store
.env
challenge-scoring-sheets/
38 changes: 38 additions & 0 deletions platform/submission/example_submissions.csv

Large diffs are not rendered by default.

Loading