Public
Like
1
codesearch
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v21View latest version
A web application for searching through your Val Town vals using the Val Town API.
- Powerful Search: Search through all your vals by name, content, or description
- Smart Filtering: Filter by val type (HTTP, cron, email, script) with live counts
- Code Preview: View val code with syntax highlighting and expandable sections
- Quick Actions: Direct links to run HTTP vals or edit in Val Town
- Real-time Search: Results update as you type with intelligent debouncing
- Keyboard Shortcuts: Press
Cmd/Ctrl + Kto focus the search bar - Responsive Design: Works great on desktop and mobile devices
- Search Highlighting: Search terms are highlighted in results
- Detailed Metadata: Shows author, version, privacy level, line count, and last updated
βββ backend/
β βββ index.ts # Main Hono server
β βββ routes/
β βββ api.ts # Val Town API integration
βββ frontend/
β βββ index.html # Main HTML template
β βββ index.tsx # React frontend entry point
β βββ components/
β βββ App.tsx # Main app component
β βββ SearchBar.tsx # Search input component
β βββ ValCard.tsx # Individual val display
β βββ FilterBar.tsx # Type filters
βββ shared/
βββ types.ts # Shared TypeScript types
- Set your Val Town API token as an environment variable:
VALTOWN_API_TOKEN - The app will be available at the HTTP endpoint
GET /- Serves the main applicationGET /api/vals- Search vals with query parameters:q- Search query (optional)type- Filter by val type (optional)limit- Number of results (default: 50)