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=37&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 7179 results for "database"(652ms)

untitled-1297main.tsx1 match

@sneezyโ€ขUpdated 5 days ago
6DB_NAME = "period_tracker.db"
7
8# Initialize database
9def init_db():
10 with sqlite3.connect(DB_NAME) as conn:

kevinbetREADME.md4 matches

@kibetโ€ขUpdated 5 days ago
15```
16โ”œโ”€โ”€ backend/
17โ”‚ โ”œโ”€โ”€ database/
18โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema setup
19โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
20โ”‚ โ”œโ”€โ”€ routes/
21โ”‚ โ”‚ โ”œโ”€โ”€ votes.ts # Voting API endpoints
37- **Backend**: Hono (TypeScript API framework)
38- **Frontend**: React with TypeScript
39- **Database**: SQLite
40- **Styling**: TailwindCSS
41- **Real-time**: Server-Sent Events (SSE)

TownieTODOs.md1 match

@Irisโ€ขUpdated 5 days ago
9- [ ] make it one click to branch off like old jp townie demos
10- [ ] opentownie as a pr bot
11- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them
12- [ ] do a browser use or screenshot thing to give it access to its own visual output
13- [ ] Have it default to creating a new branch off main

Towniethink.ts1 match

@Irisโ€ขUpdated 5 days ago
7export const thinkTool = tool({
8 description:
9 "Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.",
10 parameters: z.object({
11 thought: z.string().describe("A thought to think about."),

Towniesystem_prompt.txt2 matches

@Irisโ€ขUpdated 5 days ago
174```
175โ”œโ”€โ”€ backend/
176โ”‚ โ”œโ”€โ”€ database/
177โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
178โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
234 ```
235
236### Database Patterns
237- Run migrations on startup or comment out for performance
238- Change table names when modifying schemas rather than altering

Towniesend-message.ts1 match

@Irisโ€ขUpdated 5 days ago
12 overLimit,
13 startTrackingUsage,
14} from "../database/queries.tsx";
15import { makeChangeValTypeTool, makeFetchTool, makeTextEditorTool } from "../tools/index.ts";
16import fileWithLinesNumbers from "../utils/fileWithLinesNumbers.ts";

Towniequeries.tsx1 match

@Irisโ€ขUpdated 5 days ago
4import { INFERENCE_CALLS_TABLE, USAGE_TABLE } from "./schema.tsx";
5
6// Eventually we'll have a user database,
7// but in the meantime, we can cache user info in memory
8const userIdCache: { [key: string]: any } = {};

Townie.cursorrules2 matches

@Irisโ€ขUpdated 5 days 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

IdeasemployeeApp.ts2 matches

@PhylisMโ€ขUpdated 5 days ago
20
21 // --- Handle GET requests to /ideas ---
22 // This endpoint will return all ideas currently stored in your database.
23 if (url.pathname === "/ideas" && req.method === "GET") {
24 const allIdeas: Idea[] = [];
41
42 // --- Handle POST requests to /ideas ---
43 // This endpoint will add a new idea to your database.
44 // It expects a JSON body with 'text' and 'projectId'.
45 if (url.pathname === "/ideas" && req.method === "POST") {

untitled-4618chat.ts1 match

@Mo5โ€ขUpdated 5 days ago
5
6// Initialize the chat messages table
7export async function initChatDatabase() {
8 await sqlite.execute(`CREATE TABLE IF NOT EXISTS ${CHAT_TABLE} (
9 id INTEGER PRIMARY KEY AUTOINCREMENT,

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago