TLDR
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: v20View latest version
A simple web application that summarizes articles and URLs into 1-3 sentence summaries using OpenAI's API.
- Simple Interface: Clean textarea for pasting URLs or article text
- Smart Summarization: Uses OpenAI API to generate concise 1-3 sentence summaries
- URL Support: Automatically fetches and summarizes content from URLs
- Error Handling: Graceful handling of invalid URLs, API failures, and other errors
- Responsive Design: Works well on desktop and mobile devices
├── backend/
│ ├── index.ts # Main Hono server with API routes
│ └── README.md # Backend documentation
├── frontend/
│ ├── index.html # Main HTML template
│ ├── index.tsx # React frontend application
│ ├── components/
│ │ └── App.tsx # Main app component
│ └── README.md # Frontend documentation
├── shared/
│ ├── types.ts # Shared TypeScript types
│ └── README.md # Shared utilities documentation
└── README.md # This file
-
Environment Variables: Set up your OpenAI API key in Val Town environment variables:
- Go to your Val Town settings
- Add environment variable:
OPENAI_API_KEY
with your OpenAI API key
-
Deploy: The app will automatically deploy when you save the files in Val Town
-
Access: Your app will be available at your Val Town HTTP endpoint
GET /
- Serves the main applicationPOST /api/summarize
- Summarizes text or URL contentGET /frontend/*
- Serves frontend assetsGET /shared/*
- Serves shared utilities
- Open the application in your browser
- Paste either:
- A URL to an article you want summarized
- The full text of an article
- Click "Summarize" button
- View the 1-3 sentence summary generated by AI
The app handles various error scenarios:
- Invalid or unreachable URLs
- OpenAI API failures or rate limits
- Network connectivity issues
- Malformed input data