ProtoShareadmin.ts1 match
6deleteContentItem,
7getContentItemById
8} from "../database/queries.ts";
9import { requireAuth } from "./auth.ts";
10
16### ๐ง Management API
17- **RESTful Endpoints**: Complete CRUD operations for channels and playlists
18- **Database Storage**: SQLite with proper indexing and relationships
19- **User Management**: Admin roles and authentication
20- **Stream Monitoring**: Health checks and status tracking
41```
42โโโ backend/
43โ โโโ database/
44โ โ โโโ migrations.ts # Database schema and setup
45โ โ โโโ queries.ts # Database operations and queries
46โ โโโ routes/ # API endpoints (integrated in index.ts)
47โ โโโ index.ts # Main Hono server with all routes
108- `ADMIN_PASSWORD` - Admin access password (optional)
109110### Database
111- **Auto-Migration**: Database schema is created automatically on startup
112- **SQLite Storage**: Persistent storage with proper indexing
113- **Default Admin**: Admin user created automatically if none exists
169### Backend Stack
170- **Hono**: Fast and lightweight web framework
171- **SQLite**: Embedded database with full SQL support
172- **TypeScript**: End-to-end type safety
173- **Val Town**: Serverless hosting and deployment
175### Performance Optimizations
176- **Server-Side Rendering**: Initial data injection for faster loading
177- **Database Indexing**: Optimized queries for large channel lists
178- **Lazy Loading**: Progressive loading of channel data
179- **Caching**: Efficient data caching and state management
ProtoSharemigrations.ts2 matches
23export async function runMigrations() {
4console.log("Running database migrations...");
56// Users table
75await sqlite.execute(`CREATE INDEX IF NOT EXISTS idx_challenges_email ON webauthn_challenges (email)`);
7677console.log("Database migrations completed successfully");
78}
ProtoShareREADME.md3 matches
16```
17โโโ backend/
18โ โโโ database/
19โ โ โโโ migrations.ts # Database schema
20โ โ โโโ queries.ts # Database operations
21โ โโโ routes/
22โ โ โโโ auth.ts # WebAuthn authentication
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, createDefaultAdmin } from "./database/migrations.ts";
4import * as db from "./database/queries.ts";
5import type {
6Channel,
14const app = new Hono();
1516// Initialize database on startup
17await runMigrations();
18await createDefaultAdmin();
275}
276277// Save channels to database
278const channelIds: string[] = [];
279for (const channel of parseResult.playlist.channels) {
iptvmigrations.ts2 matches
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
23// Database schema for IPTV Platform
4export async function runMigrations() {
5// Users table
110await sqlite.execute(`CREATE INDEX IF NOT EXISTS idx_epg_channel_time ON epg_programs(channel_id, start_time)`);
111112console.log("Database migrations completed successfully");
113}
114
untitled-923index.ts1 match
63const body = await c.req.json();
64
65// Here you would typically save to database or send email
66console.log("Contact form submission:", body);
67
PetWebsiteindex.ts4 matches
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { runMigrations, seedData } from "./database/migrations.ts";
3import auth from "./routes/auth.ts";
4import pets from "./routes/pets.ts";
14});
1516// Initialize database on startup
17try {
18await runMigrations();
19await seedData();
20console.log("Database initialized successfully");
21} catch (error) {
22console.error("Database initialization failed:", error);
23}
24
PetWebsitestore.ts1 match
11createOrderItems,
12getOrdersByUser
13} from "../database/queries.ts";
14import type { ApiResponse, Product, Order } from "../../shared/types.ts";
15
PetWebsiteservices.ts1 match
8createVetAppointment,
9getVetAppointmentsByUser
10} from "../database/queries.ts";
11import type { ServiceBookingForm, ApiResponse, GroomingAppointment, VetAppointment } from "../../shared/types.ts";
12