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 auth from "./routes/auth.ts";
5import bookings from "./routes/bookings.ts";
14});
15
16// Initialize database
17await runMigrations();
18
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { createPayment, updatePaymentStatus, getBookingById, updateBookingStatus } from "../database/queries.ts";
3import { verifyToken } from "./auth.ts";
4import type { ApiResponse, Payment } from "../../shared/types.ts";
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { createFeedback, getAllFeedback, getFeedbackByCategory, getUserById } from "../database/queries.ts";
3import { verifyToken } from "./auth.ts";
4import type { ApiResponse, Feedback } from "../../shared/types.ts";
7 getAllDestinations,
8 getDestinationsByCategory
9} from "../database/queries.ts";
10import { verifyToken } from "./auth.ts";
11import type { ApiResponse, Booking, Destination } from "../../shared/types.ts";
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { createUser, getUserByEmail } from "../database/queries.ts";
3import { blob } from "https://esm.town/v/std/blob";
4import type { AuthResponse } from "../../shared/types.ts";
23โโโ backend/
24โ โโโ index.ts # Main Hono server
25โ โโโ database/
26โ โ โโโ migrations.ts # Database schema
27โ โ โโโ queries.ts # Database operations
28โ โโโ routes/
29โ โโโ auth.ts # Authentication routes
50- **Backend**: Hono (TypeScript)
51- **Frontend**: React 18.2.0 with TypeScript
52- **Database**: SQLite
53- **Styling**: TailwindCSS
54- **Animations**: CSS transitions and transforms
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { runMigrations } from "./database/migrations.ts";
3import devices from "./routes/devices.ts";
4import staticRoutes from "./routes/static.ts";
11});
12
13// Initialize database on startup
14await runMigrations();
15
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 { getAllDevices } from "../database/queries.ts";
4
5const staticRoutes = new Hono();
7 updateDevice,
8 deleteDevice
9} from "../database/queries.ts";
10import {
11 Device,
4
5export async function runMigrations() {
6 console.log('Running database migrations...');
7
8 // Create devices table
31 `);
32
33 console.log('Database migrations completed successfully');
34}
35