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/image-url.jpg%20%22Optional%20title%22?q=database&page=1&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 8409 results for "database"(5561ms)

thirdTimervaltown.mdc2 matches

@dreevโ€ขUpdated 5 hours ago
179```
180โ”œโ”€โ”€ backend/
181โ”‚ โ”œโ”€โ”€ database/
182โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
183โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
239 ```
240
241### Database Patterns
242- Run migrations on startup or comment out for performance
243- Change table names when modifying schemas rather than altering

sqliteadminREADME.md1 match

@peterqliuโ€ขUpdated 6 hours ago
7It's currently super limited (no pagination, editing data, data-type specific viewers), and is just a couple dozens lines of code over a couple different vals. Forks encouraged! Just comment on the val if you add any features that you want to share.
8
9To use it on your own Val Town SQLite database, [fork it](https://www.val.town/v/stevekrouse/sqlite_admin/fork) to your account.
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).

sqlite_adminREADME.md1 match

@peterqliuโ€ขUpdated 6 hours ago
7It's currently super limited (no pagination, editing data, data-type specific viewers), and is just a couple dozens lines of code over a couple different vals. Forks encouraged! Just comment on the val if you add any features that you want to share.
8
9To use it on your own Val Town SQLite database, [fork it](https://www.val.town/v/stevekrouse/sqlite_admin/fork) to your account.
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).

rust-nyc-event-signinAGENT.md3 matches

@colelโ€ขUpdated 8 hours ago
4- **No explicit test/lint commands** - Val Town platform handles these automatically
5- **Development**: Val Town auto-deploys on changes, no local build needed
6- **Database**: SQLite migrations run automatically on startup in backend/index.ts
7
8## Architecture
10- **Backend**: Hono API server (backend/index.ts) handling event management and check-ins
11- **Frontend**: React 18.2.0 with TypeScript (frontend/index.tsx, components/)
12- **Database**: SQLite with events_4, attendees_4, checkins_4, and sessions_2 tables
13- **Features**: Password-protected event creation, CSV attendee upload, fuzzy search, analytics
14- **Shared**: TypeScript types and utilities (shared/types.ts)
28- **Styling**: Default to TailwindCSS via CDN script tag
29- **Error Handling**: Let errors bubble up with context, avoid empty catch blocks
30- **Database**: Change table names (e.g., _3, _4) when modifying schemas instead of ALTER TABLE
31- **Platform**: Use Val Town utils for file operations (readFile, serveFile)
32- **SQLite**: ALWAYS handle query results properly - use `result.rows || result` pattern to access data

rust-nyc-event-signinindex.ts6 matches

@colelโ€ขUpdated 8 hours ago
11 csrfMiddleware
12} from "./auth.ts";
13import { initDatabase, TABLES } from "./database.ts";
14
15const app = new Hono();
20});
21
22// Database table names imported from centralized schema
23
24// Initialize database on startup
25await initDatabase();
26console.log(`๐Ÿš€ [System] Event check-in system ready!`);
27
212 [eventId, name, passwordHash, location || null]
213 );
214 console.log(`โœ… [API] Event successfully inserted into database with ID: ${eventId}`);
215 } catch (error) {
216 console.error(`๐Ÿ’ฅ [API] Failed to insert event:`, error);
247 const verifyAttendees = verifyAttendeesResult.rows || verifyAttendeesResult;
248 const actualAttendeeCount = Number(verifyAttendees[0]?.count || 0);
249 console.log(`๐Ÿ” [API] Attendee verification: expected ${attendees.length}, found ${actualAttendeeCount} in database`);
250
251 console.log(`โœ… [API] Successfully added ${insertedCount} attendees to event ${eventId}`);

rust-nyc-event-signinauth.ts3 matches

@colelโ€ขUpdated 8 hours ago
2import { getCookie, setCookie, deleteCookie } from "https://esm.sh/hono@3.11.7/cookie";
3import type { Context } from "https://esm.sh/hono@3.11.7";
4import { TABLES } from "./database.ts";
5
6// Session configuration
8const SESSION_COOKIE_NAME = "session_token";
9
10// Database interfaces
11interface Session {
12 id: string;
20}
21
22// Note: Sessions table initialization moved to database.ts
23
24// Generate secure random string for session IDs and secrets

postherousindex.ts4 matches

@paulkinlanโ€ขUpdated 8 hours ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { getAllPosts, getPostBySlug, getRecentPosts, getActiveFollowers, getFollowerCount, getPostActivityCounts } from "./database/queries.ts";
3import { initializeDatabase } from "./database/schema.ts";
4import { generateActorDocument } from "./services/activitypub.ts";
5import { generateRSSFeed } from "./services/rss.ts";
15});
16
17// Initialize database lazily on first request to avoid startup memory issues
18let dbInitialized = false;
19async function ensureDbInitialized() {
20 if (!dbInitialized) {
21 await initializeDatabase();
22 dbInitialized = true;
23 }

postherousschema.ts4 matches

@paulkinlanโ€ขUpdated 9 hours ago
11
12/**
13 * Initialize database tables with memory optimization
14 */
15export async function initializeDatabase() {
16 // Prevent concurrent initialization
17 if (isInitializing || isInitialized) {
99
100 isInitialized = true;
101 console.log('Database initialized successfully');
102 } catch (error) {
103 console.error('Database initialization failed:', error);
104 throw error;
105 } finally {
28- [ ] Add validation for duplicate names (case-insensitive)
29
30### Database Schema
31- [ ] Add `allow_onsite_registration` column to events table (default false) (consider migrations carefully)
32- [ ] No changes to attendees or checkins tables required

rust-nyc-event-signinREADME.md2 matches

@colelโ€ขUpdated 9 hours ago
43No external API keys required for basic functionality. Optional Discord integration available for future features.
44
45### Database
46
47The system uses SQLite with the following schema:
126- **Backend**: Hono (API framework)
127- **Frontend**: React 18.2.0 with TypeScript
128- **Database**: SQLite
129- **Styling**: TailwindCSS
130- **Platform**: Val Town (Deno runtime)

customer-database-setup2 file matches

@stevenvapiโ€ขUpdated 1 week ago

prDatabase

@pdwโ€ขUpdated 2 weeks ago