4
5The directory is a simple
6database of Date Me Docs. Date Me Docs are long-form, earnest dating profiles for romantic partners.
7[Learn more here](https://dateme.directory/faq).
8
9## Todos
10
11- [ ] Make the SQLite database forkable and build a widget/workflow for that, ie fix @stevekrouse/dateme_sqlite
12- [ ] Require an email (that isn't shared publicly)
13 - [ ] Verify the email address with a "magic link"
345 }
346 } catch (e) {
347 console.error("Database error:", e);
348 await email({
349 subject: "Date Me Doc Submit Error: " + body["Name"],
383 );
384};
385// Database migration to add UserEmail column if it doesn't exist
386async function ensureUserEmailColumn() {
387 try {
4
5The directory is a simple
6database of Date Me Docs. Date Me Docs are long-form, earnest dating profiles for romantic partners.
7[Learn more here](https://dateme.directory/faq).
8
9## Todos
10
11- [ ] Make the SQLite database forkable and build a widget/workflow for that, ie fix @stevekrouse/dateme_sqlite
12- [ ] Require an email (that isn't shared publicly)
13 - [ ] Verify the email address with a "magic link"
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { runMigrations } from "./database/migrations.ts";
3import itineraryRoutes from "./routes/itinerary.ts";
4import staticRoutes from "./routes/static.ts";
11});
12
13// Initialize database
14await runMigrations();
15
8 saveTourProgress,
9 getTourProgress
10} from "../database/queries.ts";
11import type { Itinerary, ItineraryRequest, TourProgress, ApiResponse } from "../../shared/types.ts";
12
36 `);
37
38 console.log('Database migrations completed');
39}
40
15```
16โโโ backend/
17โ โโโ database/
18โ โ โโโ migrations.ts # Database schema setup
19โ โ โโโ queries.ts # Itinerary CRUD operations
20โ โโโ routes/
190
191/**
192 * Get database statistics for the homepage
193 */
194export async function getSearchStats(): Promise<{
873 const offset = (page - 1) * pageSize;
874
875 // Start all database queries in parallel
876 // 1. Launch count queries
877 const countsPromise = withTiming(() => Promise.all([
960 ));
961
962 // Wait for all database operations to complete in parallel
963 const [
964 [countsResult, countsTime],
1223 <a href="?q=fetch" className="example-link">fetch</a>
1224 <a href="?q=api" className="example-link">api</a>
1225 <a href="?q=database" className="example-link">database</a>
1226 <a href="?q=image" className="example-link">image</a>
1227 <a href="?q=function" className="example-link">function</a>
1377 <a href="?q=fetch" className="example-link">fetch</a>
1378 <a href="?q=api" className="example-link">api</a>
1379 <a href="?q=database" className="example-link">database</a>
1380 <a href="?q=image" className="example-link">image</a>
1381 <a href="?q=function" className="example-link">function</a>
151 const needFullDocsData = searchTerm && (resultType === "docs" || format.toLowerCase() === "json");
152
153 // Run database search in parallel with appropriate docs search
154 const [searchResponse, docsResult] = await Promise.all([
155 // Database search for files, projects, users
156 searchTerm
157 ? searchFileContentWithContext(searchTerm, 2, page, pageSize, resultType !== "docs" ? resultType : undefined) // Show 2 lines of context
194 };
195
196 // Only get database stats when needed (no query or empty results)
197 const totalResults = combinedResponse.totalFileResults +
198 combinedResponse.totalProjectResults +