A web application for searching through your Val Town vals using the Val Town API.
├── 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
Get your Val Town API token:
vals:read - Required to read your vals and their contentuser:read - Required to access your user information and vals listSet the environment variable:
VALTOWN_API_TOKEN to your API tokenAccess the app:
The application requires the following Val Town API scopes:
vals:read - Allows reading your vals, their code content, metadata, and search functionalityuser:read - Allows accessing your user profile and listing your valsThese scopes provide read-only access to your vals and are necessary for the search functionality to work properly.
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)