30 `);
31
32 console.log("Database migrations completed");
33}
16
17- Backend: Hono (TypeScript)
18- Database: SQLite
19- Frontend: HTML, TypeScript, Tailwind CSS
20- Authentication: Simple username-based system
24```
25โโโ backend/
26โ โโโ database/
27โ โ โโโ migrations.ts # Schema definitions
28โ โ โโโ queries.ts # DB query functions
2import { cors } from "https://esm.sh/hono@3.11.7/middleware";
3import { readFile, serveFile } from "https://esm.town/v/std/utils/index.ts";
4import { runMigrations } from "./database/migrations.ts";
5import {
6 createJobPosting,
9 createChatMessage,
10 getRecentChatMessages
11} from "./database/queries.ts";
12import type { JobPosting, ChatMessage } from "../shared/types.ts";
13
64}
65
66// Helper functions to map database rows to TypeScript types
67function mapJobRow(row: any): JobPosting {
68 return {
9
10- `backend/`: Server-side code
11 - `database/`: SQLite database setup and queries
12 - `index.ts`: Main HTTP entry point using Hono
13- `frontend/`: Client-side code
2import { cors } from "https://esm.sh/hono@3.11.7/middleware";
3import { readFile, serveFile } from "https://esm.town/v/std/utils/index.ts";
4import { runMigrations } from "./database/migrations.ts";
5import {
6 getAllJobs,
10 updateUserActivity,
11 getActiveUsers
12} from "./database/queries.ts";
13import { Job, ChatMessage, ApiResponse, SessionData } from "../shared/types.ts";
14
38 `);
39
40 console.log("Database migrations completed successfully");
41}
15## Technical Stack
16
17- **Backend**: Hono.js API framework with SQLite database
18- **Frontend**: React with Tailwind CSS
19- **Data Storage**: SQLite for job postings and chat messages
23```
24โโโ backend/
25โ โโโ database/
26โ โ โโโ migrations.ts # Schema definitions
27โ โ โโโ queries.ts # DB query functions
1import { serveFile } from "https://esm.town/v/std/utils/index.ts";
2import { generateCode } from "./backend/generate-code.ts";
3import { createTables } from "./database/migrations.ts";
4import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries.ts";
5
6await createTables();
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { cors } from "https://esm.sh/hono@3.11.7/middleware";
3import { initializeDatabase } from "./database/migrations.ts";
4import jobRoutes from "./routes/jobs.ts";
5import chatRoutes from "./routes/chat.ts";
7import { parseProject } from "https://esm.town/v/std/utils@85-main/index.ts";
8
9// Initialize the database
10await initializeDatabase();
11
12// Create the Hono app