• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
toowired

toowired

Prompt_Improver

Unlisted
Like
Prompt_Improver
Home
Code
21
.github
1
backend
11
frontend
9
shared
1
workers
3
.vtignore
API_DOCUMENTATION.md
DEPLOY.md
DEPLOYMENT.md
README.md
VALTOWN_BENEFITS.md
deno.json
deploy.sh
H
index.http.ts
resource_example.html
test_all_endpoints.js
test_database.js
test_prompt_library.js
test_resources.js
test_ui_ux.js
val.json
Branches
3
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
/
DEPLOY.md
Code
/
DEPLOY.md
Search
9/5/2025
Viewing readonly version of main branch: v230
View latest version
DEPLOY.md

Val Town Projects Deployment Guide

This project uses Val Town Projects architecture for modular deployment.

Prerequisites

  1. Val Town CLI installed:

    npm install -g @valtown/cli
  2. Authenticate with Val Town:

    vt auth
  3. Environment Variables:

    • OPENAI_API_KEY - Your OpenAI API key
    • VAL_TOWN_API_KEY - Automatically provided by Val Town

Project Structure

Prompt_Improver/
β”œβ”€β”€ index.http.ts           # Main HTTP handler
β”œβ”€β”€ val.json               # Project configuration
β”œβ”€β”€ workers/
β”‚   β”œβ”€β”€ clarifier.ts       # Clarification worker
β”‚   β”œβ”€β”€ condenser.ts       # Condensation worker
β”‚   └── includer.ts        # Enhancement worker
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ index.html         # Frontend UI
β”‚   └── ...
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ backend_logic.js   # Orchestration logic
β”‚   └── ...
β”œβ”€β”€ shared/
β”‚   └── shared_utils.js    # Shared utilities
└── README.md

Deployment Commands

1. Deploy the Project

From the project root directory:

cd /home/toowired/Prompt_Improver vt push

This will:

  • Deploy the entire project as a Val Town Project
  • Create the main HTTP endpoint
  • Bundle all workers, frontend, and backend code
  • Set up proper routing and imports

2. Check Deployment Status

vt status

3. View Logs

vt logs

4. Development Mode (Optional)

For local development:

vt dev

Access Your Application

After deployment, your application will be available at:

https://[username]-prompt-improver.web.val.run

API Endpoints

  • GET / - Frontend interface
  • POST /api/improve - Improve prompt endpoint
  • GET /health - Health check
  • GET /api/test-workers - Test all workers

Configuration Details

The val.json file configures:

  • Entry point: index.http.ts
  • Project type: HTTP
  • Dependencies: Hono, OpenAI, Val Town utils
  • Environment variables required
  • Public visibility

Benefits of This Approach

  1. Single Deployment: One vt push deploys everything
  2. Local Workers: All workers run in the same context (fast)
  3. Relative Imports: Clean import paths within the project
  4. File Serving: Frontend files served directly from project
  5. Version Control: Entire project versioned together

Troubleshooting

Authentication Issues

vt auth --reset

Push Failures

Check that:

  • You're in the correct directory
  • val.json is valid JSON
  • All imports use correct relative paths

Runtime Errors

vt logs --tail

Environment Variables

Set in Val Town dashboard:

  1. Go to your val's settings
  2. Add OPENAI_API_KEY
  3. VAL_TOWN_API_KEY is automatically provided

Project Updates

To update the deployed project:

vt push

This will update the existing deployment with your changes.

Local Testing

Before deployment, test locally:

vt dev

Visit http://localhost:3000 to test the application.

File Organization

  • Frontend files in /frontend/ are served via serveFile()
  • Workers are imported directly as TypeScript modules
  • Shared utilities available to all components
  • Backend logic handles orchestration

This architecture provides the benefits of modular design while keeping everything in a single deployable project.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
Β© 2025 Val Town, Inc.