This project uses Val Town Projects architecture for modular deployment.
Val Town CLI installed:
npm install -g @valtown/cli
Authenticate with Val Town:
vt auth
Environment Variables:
OPENAI_API_KEY - Your OpenAI API keyVAL_TOWN_API_KEY - Automatically provided by Val TownPrompt_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
From the project root directory:
cd /home/toowired/Prompt_Improver vt push
This will:
vt status
vt logs
For local development:
vt dev
After deployment, your application will be available at:
https://[username]-prompt-improver.web.val.run
GET / - Frontend interfacePOST /api/improve - Improve prompt endpointGET /health - Health checkGET /api/test-workers - Test all workersThe val.json file configures:
index.http.tsvt push deploys everythingvt auth --reset
Check that:
val.json is valid JSONvt logs --tail
Set in Val Town dashboard:
OPENAI_API_KEYVAL_TOWN_API_KEY is automatically providedTo update the deployed project:
vt push
This will update the existing deployment with your changes.
Before deployment, test locally:
vt dev
Visit http://localhost:3000 to test the application.
/frontend/ are served via serveFile()This architecture provides the benefits of modular design while keeping everything in a single deployable project.