A simple web application that summarizes articles and URLs into 1-3 sentence summaries using OpenAI's API.
├── 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:
OPENAI_API_KEY
with your OpenAI API keyDeploy: 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 utilitiesThe app handles various error scenarios: