100 <div className="">✷ Hono + React + Tailwind</div>
101 <div className="">✷ React Router + React Query</div>
102 <div className="">✷ Built-in database (blob storage)</div>
103 <div className="">✷ Farcaster mini app manifest + webhook + embed metadata</div>
104 <div className="">✷ Farcaster notifications (storing tokens, sending recurring notifications, ...)</div>
46 words refer to specific large numbers). Sean was seated at his
47 computer terminal, so he executed a search of the Internet domain name
48 registry database to see if the newly suggested name was still
49 available for registration and use. Sean is not an infallible speller,
50 and he made the mistake of searching for the name spelled as
134 3
135 </sup>. If you buy a domain at Google, maybe you’d also host your
136 website or database there, integrate with Gemini, etc.
137 </p>
138 <p>
198 other registries you’ve never heard of own even more (like{" "}
199 <a href="https://www.identity.digital">Identity Digital</a>, formerly
200 named Donuts and listed in the root zone database as Binky Moon, LLC).
201 Registries pay Serious Money for some TLDs, like the $25 million Google
202 paid for <code>.app</code> when it was auctioned in 2015. Google has
4import type { Place } from "../models/place-models.ts";
5import { processCheckinEvent as _processCheckinEvent } from "../ingestion/record-processor.ts";
6import { db } from "../database/db.ts";
7import { checkinsTable } from "../database/schema.ts";
8import { eq } from "https://esm.sh/drizzle-orm";
9import type { OAuthSessionsInterface } from "jsr:@tijs/atproto-oauth-hono@^0.2.6";
429 console.log(`✅ Created checkin record: ${checkinResult.uri}`);
430
431 // IMMEDIATELY save to local database for instant feed updates
432 try {
433 const rkey = extractRkey(checkinResult.uri);
443 },
444 });
445 console.log(`✅ Saved checkin to local database: ${rkey}`);
446 } catch (localSaveError) {
447 console.error(
448 "Failed to save checkin to local database:",
449 localSaveError,
450 );
198```
199├── backend/
200│ ├── database/
201│ │ ├── migrations.ts # Schema definitions
202│ │ ├── queries.ts # DB query functions
257 ```
258
259### Database Patterns
260- Run migrations on startup or comment out for performance
261- Change table names when modifying schemas rather than altering
27 isEmailAlreadyInvited,
28 isEmailAlreadyParticipant
29} from "../database/queries.ts";
30
31const api = new Hono();
274 }
275
276 // Add user message to database
277 const userMessage = await addMessage(currentConversationId, 'user', message);
278
305 }
306
307 // Add assistant message to database
308 const assistantMessage = await addMessage(currentConversationId, 'assistant', assistantResponse);
309
1# Backend
2
3Hono-based API server with LastLogin authentication, SQLite database, and group chat functionality.
4
5## Structure
6
7- `index.ts` - Main HTTP handler with LastLogin wrapper
8- `database/` - Database migrations and query functions
9- `routes/` - API route handlers
10
34- `GET /api/conversations/:id/stream` - Server-Sent Events for real-time updates
35
36## Database Schema
37
38### Core Tables
39- **Backend**: Hono, LastLogin auth, SQLite, OpenAI, Server-Sent Events
40- **Frontend**: React, TailwindCSS, Real-time SSE connections
41- **Database**: SQLite with participant and invitation tables
42
43## Getting Started
2import { lastlogin } from "https://esm.town/v/stevekrouse/lastlogin_safe";
3import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
4import { runMigrations } from "./database/migrations.ts";
5import api from "./routes/api.ts";
6
10app.onError((err) => Promise.reject(err));
11
12// Run database migrations on startup
13await runMigrations();
14
71 `);
72
73 console.log('Database migrations completed');
74}
90 // ---- Query Firestore publicLenses ----
91 const pubDocRes = await fetch(
92 `https://firestore.googleapis.com/v1/projects/${projectId}/databases/(default)/documents/publicLenses/${id}`,
93 { headers: { Authorization: `Bearer ${access_token}` } },
94 );
106 // ---- Query Firestore private user doc ----
107 const privDocRes = await fetch(
108 `https://firestore.googleapis.com/v1/projects/${projectId}/databases/(default)/documents/users/${owner}/lenses/${id}`,
109 { headers: { Authorization: `Bearer ${access_token}` } },
110 );