A TypeScript-based tool for assigning primary school kids to workshops during project week, built on Val.town.
Target Users: Primary school (60-70 kids, ages 5-11)
Scope: 2-day workshop week, 3 time slots per day, 8-10 workshops per slot
Platform: Val.town with SQLite database and server-side JSX
std/sqlite for persistent data storageimport { sqlite } from "https://esm.town/v/std/sqlite";
// Example usage:
const data = await sqlite.execute("SELECT datetime();");
console.log(data.rows[0]);
// Import from your own vals
import { Workshop, Kid } from "./workshopTypes";
import { initDatabase } from "./workshopDatabase";
// Import from other users' vals
import { someTool } from "https://esm.town/v/username/valname";
interface Workshop {
id: number;
name: string;
description: string;
age_groups: string;
capacity: number;
day: 'monday' | 'tuesday';
time_slot: 1 | 2 | 3;
}
interface Kid {
id: number;
name: string;
grade: string;
}
interface Preference {
kid_id: number;
workshop_id: number;
rank: 1 | 2 | 3;
day: 'monday' | 'tuesday';
time_slot: 1 | 2 | 3;
}
Limitation: No client-side JavaScript/React hooks
Workaround: Server-side forms with immediate response pages
Limitation: No real-time updates
Workaround: Page refreshes and status polling via forms
Limitation: Traditional web app feel vs modern SPA
Workaround: Fast server responses and progressive enhancement
This project was designed with Claude's assistance to work within Val.town's server-side constraints while maintaining modern TypeScript development practices. The architecture prioritizes simplicity and rapid deployment over complex client-side interactions.
Repository Structure: Each major component becomes a separate Val on Val.town, with shared utilities imported between vals using Val.town's module system.