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/$%7Bart_info.art.src%7D?q=database&page=199&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 7787 results for "database"(1624ms)

untitled-2706appointments.ts1 match

@reemgalal28โ€ขUpdated 2 weeks ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { createAppointment, isTimeSlotAvailable, getAppointmentsByDate } from "../database/queries.ts";
3import type { ServiceType } from "../../shared/types.ts";
4

untitled-2706chat.ts1 match

@reemgalal28โ€ขUpdated 2 weeks ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { getRecentChatMessages, addChatMessage } from "../database/queries.ts";
3
4const chat = new Hono();

untitled-2706blog.ts1 match

@reemgalal28โ€ขUpdated 2 weeks ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { getAllBlogPosts, getBlogPost } from "../database/queries.ts";
3
4const blog = new Hono();

untitled-2706README.md4 matches

@reemgalal28โ€ขUpdated 2 weeks ago
14```
15โ”œโ”€โ”€ backend/
16โ”‚ โ”œโ”€โ”€ database/
17โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema setup
18โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
19โ”‚ โ”œโ”€โ”€ routes/
20โ”‚ โ”‚ โ”œโ”€โ”€ blog.ts # Blog API endpoints
38
39- **Backend**: Hono (TypeScript API framework)
40- **Database**: SQLite
41- **Frontend**: React with TypeScript
42- **Styling**: TailwindCSS

Appindex.ts2 matches

@CHUKSINHO_KEYDโ€ขUpdated 2 weeks 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 webhook from "./routes/webhook.ts";
5import api from "./routes/api.ts";
12});
13
14// Initialize database on startup
15await runMigrations();
16

Appapi.ts1 match

@CHUKSINHO_KEYDโ€ขUpdated 2 weeks ago
5 getAllChats,
6 getMessageById
7} from "../database/queries.ts";
8import type { DeletedMessageResponse } from "../../shared/types.ts";
9

Appwebhook.ts2 matches

@CHUKSINHO_KEYDโ€ขUpdated 2 weeks ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import type { WhatsAppWebhookPayload } from "../../shared/types.ts";
3import { saveMessage, markMessageAsDeleted } from "../database/queries.ts";
4
5const webhook = new Hono();
102 }
103
104 // Save message to database
105 await saveMessage({
106 id: message.id,

Appmigrations.ts3 matches

@CHUKSINHO_KEYDโ€ขUpdated 2 weeks ago
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2
3// Database schema for WhatsApp message tracking
4export const MESSAGES_TABLE = 'whatsapp_messages_v1';
5export const CHATS_TABLE = 'whatsapp_chats_v1';
6
7export async function runMigrations() {
8 console.log('Running database migrations...');
9
10 // Create messages table
50 `);
51
52 console.log('Database migrations completed successfully');
53}

AppREADME.md4 matches

@CHUKSINHO_KEYDโ€ขUpdated 2 weeks ago
32```
33โ”œโ”€โ”€ backend/
34โ”‚ โ”œโ”€โ”€ database/
35โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema
36โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database operations
37โ”‚ โ”œโ”€โ”€ routes/
38โ”‚ โ”‚ โ”œโ”€โ”€ webhook.ts # WhatsApp webhook handler
53
541. WhatsApp sends webhook events when messages are received or deleted
552. The app stores all incoming messages in the database
563. When a deletion event is received, the message is marked as deleted
574. Users can view deleted messages through the web interface

demo_projectindex.ts3 matches

@amunevicโ€ขUpdated 2 weeks 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 { getAllJobs, getChatMessages } from "./database/queries.ts";
5import jobsRouter from "./routes/jobs.ts";
6import chatRouter from "./routes/chat.ts";
13});
14
15// Initialize database on startup
16await runMigrations();
17

bookmarksDatabase

@s3thiโ€ขUpdated 4 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 7 months ago