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%22Image%20title%22?q=database&page=73&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 4206 results for "database"(973ms)

productpanelvalidation.ts1 match

@tijsโ€ขUpdated 1 week ago
176 }
177
178 // Return cleaned data mapped to our database field names
179 return {
180 valid: true,

productpanelDESIGN_BRIEF.md5 matches

@tijsโ€ขUpdated 1 week ago
3## 1. Project Overview
4
5**AppFeedback.val** is a personal service for collecting, storing, and viewing user feedback from your apps. Built exclusively on Val Town, the service will leverage TypeScript with Deno runtime and Val Town's built-in SQLite database for data storage. This project is designed for personal use, allowing you to collect feedback from one or more of your applications and view it in a consolidated dashboard.
6
7## 2. Technical Requirements
10- **Runtime:** Deno (Val Town's native runtime)
11- **Programming Language:** TypeScript
12- **Database:** Val Town's built-in SQLite database (limit: 10MB free, 1GB paid)
13- **Authentication:** Simple API key authentication for your apps to send feedback
14- **Frontend:** HTML/CSS/JS served directly from Val Town HTTP vals
61โ”œโ”€โ”€ index.ts # Main entry point for the project
62โ”œโ”€โ”€ db/
63โ”‚ โ”œโ”€โ”€ schema.ts # Database schema definitions
64โ”‚ โ”œโ”€โ”€ init.ts # Database initialization
65โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
66โ”œโ”€โ”€ api/
67โ”‚ โ”œโ”€โ”€ submitFeedback.ts # HTTP val for feedback submission

productpanelPROJECT_PLAN.md11 matches

@tijsโ€ขUpdated 1 week ago
3## ๐Ÿ” Project Overview
4
5**AppFeedback.val** is a personal service built on Val Town for collecting and managing app feedback in a SQLite database. This service will be single-user (for personal use only) and implemented as a Val Town Project using TypeScript with the Deno runtime.
6
7> **Note:** The project has been created in Val Town with the name **"productpanel"**. Updates can be pushed to Val Town using the `vt` command line tool.
20 - [ ] Push updates to Val Town using the `vt` command
21
222. **Database Schema Design**
23 - [x] Create `db/schema.ts` with table definitions
24 - [x] Create `db/init.ts` for database initialization
25 - [x] Create `db/queries.ts` for database operation functions
26 - [x] Create `db/migrations.ts` for handling schema changes
27
35 - [x] Create `api/submitFeedback.ts` as an HTTP val for receiving feedback
36 - [x] Implement request validation in `utils/validation.ts`
37 - [x] Create database query functions in `db/queries.ts`
38
393. **App Management API**
81 - [ ] Test API endpoints with Deno's testing framework
82 - [ ] Test email notification delivery
83 - [ ] Verify database performance
84
85---
94โ”œโ”€โ”€ db/
95โ”‚ โ”œโ”€โ”€ schema.ts # Table definitions
96โ”‚ โ”œโ”€โ”€ init.ts # Database initialization
97โ”‚ โ””โ”€โ”€ queries.ts # Query functions
98โ”œโ”€โ”€ api/
123
1242. **SQLite via Val Town**
125 - Use `std/sqlite` for database operations
126 - Implement parameterized queries for security
127 - Structure queries in `db/queries.ts` for reusability
1411. **Feedback Collection Flow**
142 - App sends POST request with feedback data + API key to submitFeedback endpoint
143 - Authentication middleware validates API key against database
144 - Validation middleware checks input data
145 - Database module stores feedback in SQLite
146 - Email module sends notification
147 - Response sent back to app
162
163- Set up Val Town Project structure
164- Design and implement database schema and operations
165- Test Deno runtime features and Val Town integration
166- Create API key generation and authentication utilities

productpanelproject-overview.mdc3 matches

@tijsโ€ขUpdated 1 week ago
6# AppFeedback.val Project Overview
7
8This is a personal service for collecting and managing app feedback built on Val Town using TypeScript. It leverages Val Town's SQLite database for storage, HTTP vals for API endpoints, and email functionality for notifications.
9
10## Key Project Documents
16AppFeedback.val is a single-user service that allows you to:
171. Collect feedback from your various applications
182. Store that feedback in a SQLite database
193. View and analyze feedback through a dashboard
204. Receive email notifications when new feedback is submitted
30โ”œโ”€โ”€ db/
31โ”‚ โ”œโ”€โ”€ schema.ts # Table definitions
32โ”‚ โ”œโ”€โ”€ init.ts # Database initialization
33โ”‚ โ””โ”€โ”€ queries.ts # Query functions
34โ”œโ”€โ”€ api/

productpanelimplementation-guides.mdc5 matches

@tijsโ€ขUpdated 1 week ago
11
121. **Incremental Development**
13 - Start with database schema initialization
14 - Then build core API endpoints
15 - Finally develop the dashboard UI
312. **SQLite Usage**
32 - Use parameterized queries to prevent SQL injection
33 - Keep database schema simple to stay within size limits (10MB free, 1GB paid)
34 - Create new tables when modifying schema rather than using ALTER TABLE
35 - Consider occasional exports for backup
434. **Authentication**
44 - Generate strong API keys (at least 32 characters)
45 - Store API keys in the database, not as environment variables
46 - Use basic authentication for dashboard access
47 - Always validate API keys against the database
48
495. **UI Development**
113## Troubleshooting
114
115- **Database Issues**: Check SQLite query syntax and parameter types
116- **HTTP Val Errors**: Verify Request/Response format against Web API standards
117- **Authentication Problems**: Ensure API keys match and Authorization header is correctly formatted

productpanelapi-design.mdc2 matches

@tijsโ€ขUpdated 1 week ago
57
58All API endpoints are secured using one of two methods:
591. API key authentication for app submissions (stored in database, not hardcoded)
602. Basic authentication for dashboard access
61
92 const data = await req.json();
93
94 // Store feedback in database
95 const feedback = await storeFeedback(apiKey, data);
96

productpanelval-town-integration.mdc4 matches

@tijsโ€ขUpdated 1 week ago
10## Core Val Town Features Used
11
12### SQLite Database
13- Using `std/sqlite` for all database operations
14- Val Town provides up to 10MB storage on free tier, 1GB on paid tier
15- Database connection is managed by Val Town
16
17```ts
18import { sqlite } from "https://esm.town/v/std/sqlite";
19
20// Example database operation
21await sqlite.execute(`
22 SELECT * FROM apps WHERE api_key = ?

productpaneldatabase-schema.mdc6 matches

@tijsโ€ขUpdated 1 week ago
4alwaysApply: false
5---
6# Database Schema Design
7
8The AppFeedback.val project uses Val Town's SQLite database for storage. The database has the following schema:
9
10## Apps Table
33```
34
35## Database Operations
36
37Database interactions are encapsulated in dedicated modules:
38
39- `db/schema.ts` - Contains table definitions and constraints
40- `db/init.ts` - Handles database initialization on startup
41- `db/queries.ts` - Provides query functions with proper TypeScript types
42
43## Implementation Notes
44
45- All database operations are performed through Val Town's `std/sqlite` API
46- Schema includes proper constraints:
47 - Primary keys for uniquely identifying records

Mailboxmain.tsx1 match

@Nothingboyโ€ขUpdated 1 week ago
187 const { name, email: userEmail, comment } = await request.json();
188
189 // Save to database
190 await sqlite.execute(
191 `

cerebras_codermain.tsx2 matches

@Lamaโ€ขUpdated 1 week ago
1import { serveFile } from "https://esm.town/v/std/utils/index.ts";
2import { generateCode } from "./backend/generate-code.ts";
3import { createTables } from "./database/migrations.ts";
4import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries.ts";
5
6await createTables();

bookmarksDatabase

@s3thiโ€ขUpdated 2 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 5 months ago