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"
12 console.log(data);
13 try {
14 // create a database page in the interactions database
15 const page = await setAction(data);
16 // console.log(page);
10 const page = await notion.pages.create({
11 parent: {
12 database_id: Deno.env.get("GLANCE_INTERACTIONS_DB_ID"),
13 },
14 properties: {
8
9 // get each of the actions from this demo from Notion
10 // data is stored in the "Glancer interactions" database and attached to the demo via relation
11 // we can't really use the relation property b/c that only holds an array of page IDs in Notion
12 // so, in Notion, we use a formula to transform the relation array into a string
6});
7
8export async function getDatabase(id: string) {
9 // get database
10 try {
11 const database = await notion.databases.retrieve({
12 database_id: id,
13 });
14 return database;
15 } catch (error: any) {
16 return {
1import { Hono } from "npm:hono";
2import { getDatabase } from "../../controllers/getDatabase.ts";
3
4const app = new Hono();
9 // hit the controller to return data
10 try {
11 const data = await getDatabase(id);
12 //
13 console.log(data);
3// Import route modules
4import cobrowse from "./cobrowse.ts";
5import database from "./database.ts";
6import demo from "./demo.ts";
7import page from "./page.ts";
12
13// mount routes
14app.route("/db", database);
15app.route("/page", page);
16app.route("/cobrowse", cobrowse);
7
8export async function getAllInteractionsPages() {
9 const databaseId = Deno.env.get("GLANCE_INTERACTIONS_DB_ID");
10
11 if (!databaseId) {
12 throw new Error(
13 "GLANCE_INTERACTIONS_DB_ID environment variable is not set"
16
17 try {
18 const response = await notion.databases.query({
19 database_id: databaseId,
20 });
21
37
38export async function getAllInteractionsPagesWithPagination() {
39 const databaseId = Deno.env.get("GLANCE_INTERACTIONS_DB_ID");
40
41 if (!databaseId) {
42 throw new Error(
43 "GLANCE_INTERACTIONS_DB_ID environment variable is not set"
51
52 while (hasMore) {
53 const response = await notion.databases.query({
54 database_id: databaseId,
55 start_cursor: startCursor,
56 });
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
15```
16โโโ backend/
17โ โโโ database/
18โ โ โโโ migrations.ts # Database schema setup
19โ โ โโโ queries.ts # Itinerary CRUD operations
20โ โโโ routes/