52## Sample Data
53
54The application includes sample Bitcoin addresses starting with "1B" and generates additional test data for demonstration purposes. In a production environment, this would connect to a real Bitcoin blockchain API or database.
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { getDashboardStats } from "../database/queries.ts";
3
4export const dashboardRouter = new Hono();
5 markAttendance,
6 logActivity
7} from "../database/queries.ts";
8
9export const attendanceRouter = new Hono();
6 createGrade,
7 logActivity
8} from "../database/queries.ts";
9import type { GradeForm } from "../../shared/types.ts";
10
7 deleteClass,
8 logActivity
9} from "../database/queries.ts";
10import type { ClassForm } from "../../shared/types.ts";
11
7 deleteTeacher,
8 logActivity
9} from "../database/queries.ts";
10import type { TeacherForm } from "../../shared/types.ts";
11
7 deleteStudent,
8 logActivity
9} from "../database/queries.ts";
10import type { StudentForm } from "../../shared/types.ts";
11
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, insertSampleData } from "./database/migrations.ts";
4import { studentsRouter } from "./routes/students.ts";
5import { teachersRouter } from "./routes/teachers.ts";
16});
17
18// Initialize database on startup
19await runMigrations();
20await insertSampleData();
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2
3// Database schema setup for school management system
4export async function runMigrations() {
5 console.log("Running database migrations...");
6
7 // Students table
102 `);
103
104 console.log("Database migrations completed successfully");
105}
106
16```
17โโโ backend/
18โ โโโ database/
19โ โ โโโ migrations.ts # Database schema setup
20โ โ โโโ queries.ts # Database query functions
21โ โโโ routes/
22โ โ โโโ students.ts # Student CRUD operations
441. The backend API runs on the main HTTP endpoint
452. Frontend is served at the root path
463. All data is stored in SQLite database
474. Real-time updates via API polling
48