Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$2?q=database&page=8&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=database

Returns an array of strings in format "username" or "username/projectName"

Found 5584 results for "database"(2171ms)

GlancerhealthCheck.ts3 matches

@lightweight•Updated 17 hours ago
12 status: "connected",
13 message: "Successfully connected to Notion API",
14 databases: response.results.map((db) => ({
15 title: db.title?.[0]?.plain_text || "Untitled",
16 id: db.id,
20
21// update the cache
22// this cron updates a blob that stores the JSON that shows the databases that val.town is connected to
23// we present that at root and embed that into Notion
24// to show everyone that the connection is healthy btw Notion and val.town
29 filter: {
30 property: "object",
31 value: "database",
32 },
33 });

GlancerREADME.md10 matches

@lightweight•Updated 18 hours ago
221```typescript
222export default async function (interval: Interval) {
223 const pages = await notion.databases.query({
224 database_id: Deno.env.get("GLANCE_DEMOS_DB_ID"),
225 });
226
244});
245
246const databaseId = Deno.env.get("GLANCE_DEMOS_DB_ID");
247```
248
250
251- `NOTION_API_KEY`: Notion integration token
252- `GLANCE_DEMOS_DB_ID`: Notion database ID for demo pages
253- `GLANCE_INTERACTIONS_DB_ID`: Notion database ID for interaction tracking
254
255## Project Conventions
291- `/api/*`: JSON data endpoints for frontend consumption
292- `/demo/*`: Personalized demo page serving with data injection
293- `/tasks/*`: Notion webhook processing and database updates
294
295## External Dependencies
300
301- **Email and Alerting**: Slack notifications and email alerts are configured within Notion
302- **Database Management**: Three core Notion databases power the application:
303 - **Glancer Demos Database**: Stores demo configurations, visitor information, and personalization data
304 - **Glancer Interactions Database**: Warehouses demo events, clicks, and user behavior analytics
305 - **Glancer Agents Database**: Manages agent assignments, availability, and contact information
306
307The Val Town application serves as an automation and presentation layer that extends Notion's native capabilities, providing real-time cobrowsing experiences while maintaining all data persistence and workflow management within the Notion ecosystem.

Glancer3RemixsetAction.ts1 match

@stevekrouse•Updated 19 hours ago
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);

Glancer3RemixsetAction.ts1 match

@stevekrouse•Updated 19 hours ago
10 const page = await notion.pages.create({
11 parent: {
12 database_id: Deno.env.get("GLANCE_INTERACTIONS_DB_ID"),
13 },
14 properties: {

Glancer3RemixservePDF.ts1 match

@stevekrouse•Updated 19 hours ago
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

Glancer3Remixroot.ts3 matches

@stevekrouse•Updated 19 hours ago
17 endpoint: c.req.url,
18 fileURL: import.meta.url,
19 databases: response.results.map((db) => ({
20 title: db.title?.[0]?.plain_text || "Untitled",
21 id: db.id,
29 filter: {
30 property: "object",
31 value: "database",
32 },
33 });
42 // endpoint: c.req.url, // API enpoint that renders this output
43 // fileURL: import.meta.url, // location of this file on val.town
44 // databases: response.results.map((db) => ({
45 // title: db.title?.[0]?.plain_text || "Untitled",
46 // id: db.id,

Glancer3RemixREADME.md10 matches

@stevekrouse•Updated 19 hours ago
221```typescript
222export default async function (interval: Interval) {
223 const pages = await notion.databases.query({
224 database_id: Deno.env.get("GLANCE_DEMOS_DB_ID"),
225 });
226
244});
245
246const databaseId = Deno.env.get("GLANCE_DEMOS_DB_ID");
247```
248
250
251- `NOTION_API_KEY`: Notion integration token
252- `GLANCE_DEMOS_DB_ID`: Notion database ID for demo pages
253- `GLANCE_INTERACTIONS_DB_ID`: Notion database ID for interaction tracking
254
255## Project Conventions
291- `/api/*`: JSON data endpoints for frontend consumption
292- `/demo/*`: Personalized demo page serving with data injection
293- `/tasks/*`: Notion webhook processing and database updates
294
295## External Dependencies
300
301- **Email and Alerting**: Slack notifications and email alerts are configured within Notion
302- **Database Management**: Three core Notion databases power the application:
303 - **Glancer Demos Database**: Stores demo configurations, visitor information, and personalization data
304 - **Glancer Interactions Database**: Warehouses demo events, clicks, and user behavior analytics
305 - **Glancer Agents Database**: Manages agent assignments, availability, and contact information
306
307The Val Town application serves as an automation and presentation layer that extends Notion's native capabilities, providing real-time cobrowsing experiences while maintaining all data persistence and workflow management within the Notion ecosystem.

Glancer3RemixINSTRUCTIONS.md5 matches

@stevekrouse•Updated 19 hours ago
43- blob storage for the cache, which enables snappy demos
44- cron(s) that keep the cache up-to-date
45- environment variables, which we use to store connection details for Notion, database ids for essential Notion databases (including the demos and interactions databases)
46- logging features
47
63
64- email and other alerting (e.g., Slack)
65- databases, including:
66 - the "Glancer demos" database
67 - the "Glancer interactions" database, which is where certain demo events (e.g., clicks) are warehoused and visualized
68 - the "Glancer agents" database, which handles agent assignments and management
69
70Note that this app integrates with Notion to extend Notion in important ways; namely, automation and logging. Please be clear about that.

Glancer3RemixgetDatabase.ts5 matches

@stevekrouse•Updated 19 hours ago
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 {

Glancer3RemixgetActions.ts8 matches

@stevekrouse•Updated 19 hours ago
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 });

bookmarksDatabase

@s3thi•Updated 3 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 6 months ago