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/$%7Burl%7D?q=database&page=71&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 4130 results for "database"(519ms)

sqliteExplorerAppREADME.md1 match

@skynocoverโ€ขUpdated 1 week ago
30- [ ] add triggers to sidebar
31- [ ] add upload from SQL, CSV and JSON
32- [ ] add ability to connect to a non-val town Turso database
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable

discord-botapi-server.js1 match

@boucherโ€ขUpdated 1 week ago
1import express from 'express';
2import { getMessages, getLinks, getCategories, updateLinkCategory } from './database.js';
3import { Configuration, OpenAIApi } from 'openai';
4import 'dotenv/config';

discord-botquery-service.js1 match

@boucherโ€ขUpdated 1 week ago
1import { getMessages, getLinks } from './database.js';
2import { analyzeConversation, categorizeContent, summarizeConversation } from './anthropic-service.js';
3import 'dotenv/config';

discord-botdiscord-client.js2 matches

@boucherโ€ขUpdated 1 week ago
1import { Client, Events, GatewayIntentBits } from 'discord.js';
2import 'dotenv/config';
3import { saveDMMessages } from './database.js';
4
5/**
89 console.log(`Fetched ${messages.length} messages`);
90
91 // Save messages to database
92 await saveDMMessages(messages);
93

discord-botREADME.md5 matches

@boucherโ€ขUpdated 1 week ago
5## Features
6
7- **Message History Storage**: Securely stores your DM history in a SQLite database
8- **Link Detection & Categorization**: Automatically detects and categorizes links shared in conversations
9- **AI-Powered Querying**: Ask natural language questions about your conversation history
53 - `OPENAI_API_KEY`: Your OpenAI API key
54
555. Initialize the database
56 ```
57 node index.js
124- `/analyze [query]`: Analyze your conversation with AI
125
126## Database Schema
127
128The application uses a SQLite database with the following tables:
129
130- `messages`: Stores all DM messages
148- OpenAI for AI-powered querying
149- Val.town for hosting and scheduling
150- Better-SQLite3 for database management

discord-bot.cursorrules2 matches

@boucherโ€ขUpdated 1 week ago
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

discord-botindex.js6 matches

@boucherโ€ขUpdated 1 week ago
1import { initializeDatabase } from './database.js';
2import { fetchAndStoreDMs } from './discord-client.js';
3import { batchProcessLinks } from './link-analyzer.js';
10app.use(express.json());
11
12// Initialize database
13initializeDatabase();
14
15// API routes
134 console.log('Initializing Discord DM Analyzer...');
135
136 // Initialize database
137 const db = initializeDatabase();
138 console.log('Database initialized');
139
140 // Additional setup if needed

discord-botlink-analyzer.js3 matches

@boucherโ€ขUpdated 1 week ago
1import linkify from 'linkify-it';
2import { getMessages, updateLinkCategory } from './database.js';
3import { categorizeContent } from './anthropic-service.js';
4import 'dotenv/config';
174
175/**
176 * Batch process all links in the database
177 * - Categorizes uncategorized links
178 * - Updates link metadata
194 const metadata = await extractLinkMetadata(link.url);
195
196 // Update link in database
197 updateLinkCategory(link.id, categorization.category);
198

discord-botREADME.md2 matches

@boucherโ€ขUpdated 1 week ago
12The project is structured to work with Val.town and has the following components:
13
14- **Database Layer**: Uses Val.town's built-in SQLite database
15- **AI Integration**: Leverages Anthropic's Claude API for analysis
16- **Discord Integration**:
90## Val.town Specific Considerations
91
92- The database uses Val.town's built-in SQLite database
93- The code uses Deno and ESM modules compatible with Val.town
94- HTTP endpoints are designed to work with Val.town's serverless model

discord-bottypes.ts1 match

@boucherโ€ขUpdated 1 week ago
55}
56
57// Database-related types
58export interface MessageRecord {
59 id: string;

bookmarksDatabase

@s3thiโ€ขUpdated 2 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 5 months ago