5 getProductsByCategory,
6 searchProducts
7} from "../database/queries.ts";
8import { SHOE_CATEGORIES } from "../../shared/types.ts";
9
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { getCookie, setCookie, deleteCookie } from "https://esm.sh/hono@3.11.7/cookie";
3import { createUser, getUserByEmail, verifyUserPassword } from "../database/queries.ts";
4
5const auth = new Hono();
8 getAttendanceReport,
9 getAllStudents
10} from "../database/queries.ts";
11import { formatDate, getTodayDate } from "../../shared/utils.ts";
12
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
3import { runMigrations } from "./database/migrations.ts";
4import jobs from "./routes/jobs.ts";
5import chat from "./routes/chat.ts";
12});
13
14// Initialize database
15await runMigrations();
16
9 deleteStudent,
10 getUniqueClasses
11} from "../database/queries.ts";
12
13const students = new Hono();
90 `);
91
92 console.log("Database migrations completed");
93}
94
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2
3// Database schema setup and migrations
4
5export async function runMigrations() {
6 console.log("Running database migrations...");
7
8 // Students table
45 `);
46
47 console.log("Database migrations completed successfully");
48}
49
15```
16โโโ backend/
17โ โโโ database/
18โ โ โโโ migrations.ts # Database schema setup
19โ โ โโโ queries.ts # Database query functions
20โ โโโ routes/
21โ โ โโโ students.ts # Student management endpoints
38## Getting Started
39
401. The app will automatically set up the database on first run
412. Navigate to the main page to start adding students
423. Use the daily attendance feature to mark present/absent
46
47- **Backend**: Hono (TypeScript API framework)
48- **Database**: SQLite with Val Town's sqlite service
49- **Frontend**: React with TypeScript
50- **Styling**: TailwindCSS
57 `);
58
59 console.log("Database migrations completed successfully");
60 } catch (error) {
61 console.error("Migration error:", error);
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { getChatMessages, createChatMessage } from "../database/queries.ts";
3import type { CreateMessageRequest } from "../../shared/types.ts";
4