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
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { getAllJobs, createJob } from "../database/queries.ts";
3import type { CreateJobRequest } from "../../shared/types.ts";
4
10- Responsive design with TailwindCSS
11- Admin panel for product management
12- SQLite database for data persistence
13
14## Project Structure
16```
17โโโ backend/
18โ โโโ database/
19โ โ โโโ migrations.ts # Database schema
20โ โ โโโ queries.ts # Database operations
21โ โโโ routes/
22โ โ โโโ products.ts # Product API routes
27 )`);
28
29 console.log('Database migrations completed');
30}
31
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 { getDashboardStats } from "./database/queries.ts";
5import { getCookie } from "https://esm.sh/hono@3.11.7/cookie";
6import auth from "./routes/auth.ts";
17});
18
19// Initialize database
20await runMigrations();
21