13```
14โโโ backend/
15โ โโโ database/
16โ โ โโโ migrations.ts # Database schema setup
17โ โ โโโ queries.ts # Database query functions
18โ โโโ routes/
19โ โ โโโ products.ts # Product CRUD operations
39- `POST /api/chat/messages` - Send a chat message
40
41## Database Schema
42
43### Products Table
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 { createTasksTable } from "./database/migrations.ts";
4import { getAllTasks } from "./database/queries.ts";
5import tasks from "./routes/tasks.ts";
6
12});
13
14// Initialize database on startup
15await createTasksTable();
16
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { getAllTasks, getTaskById, createTask, updateTask, deleteTask } from "../database/queries.ts";
3import type { CreateTaskRequest, UpdateTaskRequest, ApiResponse } from "../../shared/types.ts";
4
16โโโ backend/
17โ โโโ index.ts # Main Hono API server
18โ โโโ database/
19โ โ โโโ migrations.ts # Database schema
20โ โ โโโ queries.ts # Database operations
21โ โโโ routes/
22โ โโโ tasks.ts # Task CRUD operations
42
43- **Backend**: Hono (API framework)
44- **Database**: SQLite
45- **Frontend**: React with TypeScript
46- **Styling**: TailwindCSS
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { AttendanceQueries, EmployeeQueries } from "../database/queries.ts";
3import type { ApiResponse, EmployeeReport } from "../../shared/types.ts";
4import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
5import { TABLES } from "../database/migrations.ts";
6
7const reports = new Hono();
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { AttendanceQueries, EmployeeQueries } from "../database/queries.ts";
3import type { ClockInRequest, ClockOutRequest, ApiResponse } from "../../shared/types.ts";
4
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { EmployeeQueries } from "../database/queries.ts";
3import type { CreateEmployeeRequest, UpdateEmployeeRequest, ApiResponse } from "../../shared/types.ts";
4
8
9export async function runMigrations() {
10 console.log('Running database migrations...');
11
12 // Create employees table
66 }
67
68 console.log('Database migrations completed successfully');
69}
70
14```
15โโโ backend/
16โ โโโ database/
17โ โ โโโ migrations.ts # Database schema setup
18โ โ โโโ queries.ts # Database query functions
19โ โโโ routes/
20โ โ โโโ employees.ts # Employee CRUD operations
59## Getting Started
60
611. The backend will automatically set up the database tables on first run
622. Navigate to the app to start managing employees and tracking attendance
633. Use the attendance tracker to clock employees in and out
67
68- **Backend**: Hono (Express-like framework for Deno)
69- **Database**: SQLite with automatic migrations
70- **Frontend**: TypeScript with React-like components
71- **Styling**: TailwindCSS for responsive design
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 jobsRouter from "./routes/jobs.ts";
5import chatRouter from "./routes/chat.ts";
12});
13
14// Initialize database
15await runMigrations();
16