• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
charmaine

charmaine

charmaineValSearch

Remix of maxm/vtProjectSearch
Public
Like
charmaineValSearch
Home
Code
17
.cursorrules
.vtignore
README.md
api.tsx
client.tsx
components.tsx
db.ts
deno.json
deno.lock
docsearch.ts
enhance-descriptions.ts
C
import.ts
shell.tsx
styles.tsx
types.tsx
utils.tsx
H
web.http.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
5/28/2025
Viewing readonly version of main branch: v36
View latest version
README.md

Val Town Code Search

A powerful search engine for Val Town projects that enables searching across code files, project descriptions, and user data.

Features

  • Full-text search across all project files and content
  • Enhanced project descriptions generated using AI analysis of README files and code
  • Multi-type search supporting files, projects, users, and documentation
  • Real-time typeahead suggestions for usernames and project names
  • Newsletter curation tool for finding active projects
  • JSON API access for programmatic usage

AI-Enhanced Project Descriptions

The system now automatically generates concise, one-line descriptions for projects by analyzing:

  1. Existing project descriptions from Val Town API
  2. README files (README.md, README.txt, etc.)
  3. Main code files (index.ts, main.js, app.tsx, etc.)
  4. File structure and naming for additional context

How It Works

When importing or updating projects, the system:

  1. Checks if the project has a good existing description
  2. Looks for README files in the project root
  3. Analyzes main code files if no README is found
  4. Uses OpenAI to generate a concise summary (under 100 characters)
  5. Stores the enhanced description in the database

Manual Enhancement

You can manually trigger description enhancement for existing projects:

GET /enhance-descriptions?limit=50

This endpoint will:

  • Find projects with poor or missing descriptions
  • Generate AI summaries for up to the specified limit
  • Return statistics about the enhancement process

Enhancement Criteria

Projects are considered to need enhanced descriptions if they:

  • Have no description
  • Have empty descriptions
  • Have descriptions shorter than 10 characters
  • Contain placeholder text like "todo" or "description"

API Endpoints

Search

  • GET /?q=searchterm - Main search interface
  • GET /?q=searchterm&format=json - JSON API access
  • GET /?q=searchterm&type=files|projects|users|docs - Filter by result type

Typeahead

  • GET /typeahead?q=partial - Get typeahead suggestions

Newsletter Curation

  • GET /newsletter?days=30 - Find active projects for newsletter
  • GET /newsletter?days=30&format=json - JSON format

Description Enhancement

  • GET /enhance-descriptions?limit=10 - Enhance project descriptions

Example AI-Generated Descriptions

The AI generates concise, action-oriented descriptions:

  • "Creates interactive data visualizations from CSV files"
  • "Provides real-time weather data API with caching"
  • "Generates QR codes with custom styling options"
  • "Converts Markdown to HTML with syntax highlighting"

Setup and Configuration

The system requires:

  • SQLite database for storing project and file data
  • OpenAI API access for description generation
  • Val Town SDK for data import

Environment variables:

  • OpenAI API key (automatically available in Val Town environment)

Database Schema

The system uses three main tables:

  • projects - Project metadata and enhanced descriptions
  • files - File content for search indexing
  • users - User profile information

Contributing

To contribute to the project description enhancement:

  1. Modify the prompt in enhance-descriptions.ts to improve summary quality
  2. Adjust the enhancement criteria in db.ts
  3. Add new file type support for analysis
  4. Improve the README detection logic

Performance

  • Description enhancement processes 10-50 projects per request
  • Includes rate limiting to avoid API throttling
  • Uses efficient database queries with pagination
  • Caches user data to avoid redundant API calls
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.