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/$1?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 5559 results for "database"(495ms)

daREADME.md5 matches

@dani786โ€ขUpdated 21 hours ago
15
16- **Backend**: TypeScript with Hono framework
17- **Database**: SQLite
18- **Frontend**: HTML, CSS, JavaScript with Bootstrap 5
19- **Authentication**: Session-based authentication
23```
24โ”œโ”€โ”€ backend/
25โ”‚ โ”œโ”€โ”€ database/
26โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema setup
27โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
28โ”‚ โ”œโ”€โ”€ routes/
29โ”‚ โ”‚ โ”œโ”€โ”€ auth.ts # Authentication routes
44## Getting Started
45
461. The system will automatically set up the database on first run
472. Default admin credentials: admin@hospital.com / admin123
483. Access the system through the main HTTP endpoint

whatsappindex.ts3 matches

@w_acheโ€ขUpdated 21 hours ago
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 } from "./database/migrations.ts";
4import { getMessageTemplates, getContacts, getSettings } from "./database/queries.ts";
5import messages from "./routes/messages.ts";
6import scheduler from "./routes/scheduler.ts";
13});
14
15// Initialize database on startup
16await runMigrations();
17

whatsappscheduler.ts1 match

@w_acheโ€ขUpdated 21 hours ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import type { ApiResponse } from "../../shared/types.ts";
3import { getPendingMessages, updateMessageStatus, createScheduledMessage } from "../database/queries.ts";
4import { generateWhatsAppUrl, getNextRecurrence } from "../../shared/utils.ts";
5

whatsappmessages.ts1 match

@w_acheโ€ขUpdated 21 hours ago
7 updateMessageStatus,
8 createOrUpdateContact
9} from "../database/queries.ts";
10import { formatPhoneNumber, validatePhoneNumber, isValidFutureDateTime, generateId } from "../../shared/utils.ts";
11

whatsappmigrations.ts2 matches

@w_acheโ€ขUpdated 21 hours ago
10
11export async function runMigrations() {
12 console.log('Running database migrations...');
13
14 // Scheduled Messages table
67 await insertDefaultSettings();
68
69 console.log('Database migrations completed');
70}
71

whatsappREADME.md4 matches

@w_acheโ€ขUpdated 21 hours ago
25- **Frontend**: React with TypeScript
26- **Backend**: Hono API framework
27- **Database**: SQLite for message storage
28- **Styling**: TailwindCSS
29- **Storage**: Local storage + server backup
34โ”œโ”€โ”€ backend/
35โ”‚ โ”œโ”€โ”€ index.ts # Main API server
36โ”‚ โ”œโ”€โ”€ database/
37โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema
38โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database operations
39โ”‚ โ””โ”€โ”€ routes/
40โ”‚ โ”œโ”€โ”€ messages.ts # Message CRUD operations

personalShopperoauth-setup.md1 match

@bgschillerโ€ขUpdated 22 hours ago
95- **HTTP-Only Cookies**: Session cookies are not accessible via JavaScript
96- **Token Refresh**: Automatic refresh of expired access tokens
97- **Secure Storage**: Tokens are stored securely in the database
98
99## Troubleshooting

personalShopperREADME.md7 matches

@bgschillerโ€ขUpdated 22 hours ago
3## Description
4
5This is an AI-powered Grocery Shopping assistant that turns an imprecise list of items like "milk, bread, eggs" into a Kroger cart full of groceries. It relies on the Kroger API to search each item, then uses an LLM to decide which specific UPC to add to the cart (again, using the Kroger API). Once an item is selected, we store the UPC in the database so we can avoid consulting the LLM for that item again.
6
7Households have preferences for which items to buy, and what priorities they have for each item. For example, we prefer to buy free range eggs and poultry, but don't particularly care whether they are organic or not. These details are stored in a database, which should also be consulted to add context to the LLM's decisions.
8
9## Kroger OAuth Implementation
35- **User Management**: Create/update users based on Kroger profile ID
36
37## Database Schema
38
39The database consists of the following tables:
40
41### kroger_users_1
119โ”œโ”€โ”€ backend/
120โ”‚ โ”œโ”€โ”€ index.ts # Main HTTP handler with OAuth routes
121โ”‚ โ”œโ”€โ”€ database/
122โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema setup
123โ”‚ โ”‚ โ””โ”€โ”€ krogerQueries.ts # Database query functions
124โ”‚ โ””โ”€โ”€ services/
125โ”‚ โ””โ”€โ”€ krogerAuth.ts # Kroger OAuth service

personalShoppersetupTelegramChatDb.ts2 matches

@bgschillerโ€ขUpdated 23 hours ago
1// Script to set up the telegram_chats table in SQLite
2// Run this script manually to create the database table
3
4export default async function setupTelegramChatDb() {
25 `);
26
27 return "Telegram chat database table created successfully.";
28 } catch (error) {
29 console.error("Error setting up telegram_chats table:", error);

personalShopperREADME.md2 matches

@bgschillerโ€ขUpdated 23 hours ago
4
5* `index.ts` - this is the **entrypoint** for this whole project
6* `database/` - this contains the code for interfacing with the app's SQLite database table
7
8## Hono
26## CRUD API Routes
27
28This app has two CRUD API routes: for reading and inserting into the messages table. They both speak JSON, which is standard. They import their functions from `/backend/database/queries.ts`. These routes are called from the React app to refresh and update data.
29
30## Errors

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago