8- Customer reviews and ratings system
9- Responsive design with modern UI
10- SQLite database for data persistence
11
12## Project Structure
14```
15โโโ backend/
16โ โโโ database/
17โ โ โโโ migrations.ts # Database schema setup
18โ โ โโโ queries.ts # Database query functions
19โ โโโ routes/
20โ โ โโโ machinery.ts # Machinery CRUD operations
35## Getting Started
36
371. The backend runs on Hono with SQLite database
382. Frontend uses React with TailwindCSS for styling
393. Database tables are created automatically on first run
404. Sample machinery data is seeded for demonstration
41
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 { getDashboardStats } from "../database/queries.ts";
4
5const app = new Hono();
6 getAllFans,
7 getFansByTeam
8} from "../database/queries.ts";
9import type { CreateFanRequest } from "../../shared/types.ts";
10
7 updateEventContactCount,
8 updateGoalProgress
9} from "../database/queries.ts";
10
11const events = new Hono();
10 markFollowUpCompleted,
11 updateGoalProgress
12} from "../database/queries.ts";
13
14const contacts = new Hono();
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { runMigrations } from "./database/migrations.ts";
3import auth from "./routes/auth.ts";
4import users from "./routes/users.ts";
13});
14
15// Initialize database on startup
16await runMigrations();
17
7
8export async function runMigrations() {
9 console.log('Running database migrations...');
10
11 // Contacts table
62 `);
63
64 console.log('Database migrations completed');
65}
66
17```
18โโโ backend/
19โ โโโ database/
20โ โ โโโ migrations.ts # Database schema
21โ โ โโโ queries.ts # Database operations
22โ โโโ routes/
23โ โ โโโ contacts.ts # Contact CRUD operations
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 { getAllJobs, getChatMessages } from "./database/queries.ts";
5import jobsRouter from "./routes/jobs.ts";
6import chatRouter from "./routes/chat.ts";
13});
14
15// Initialize database on startup
16await runMigrations();
17
76### Update Course Information
77
78Courses are stored in the database. To modify them:
79
801. Edit the `insertDefaultCourses()` function in `/backend/database/migrations.ts`
812. Change the table name (e.g., add `_2` to create a fresh table)
823. Redeploy and visit `/init-db` to update