Storytelling
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
index.ts
https://Onesideddimple--97b706283f9c11f08a0a76b3cceeab13.web.val.run
A web application that generates short stories and poetry based on user inputs to inspire writers and spark creativity.
- Story Generator: Creates short stories based on genre, character, setting, and theme
- Poetry Generator: Generates poems in various styles (haiku, sonnet, free verse, limerick)
- Customizable Inputs: Users can specify genres, moods, themes, and other creative elements
- AI-Powered: Uses OpenAI to generate high-quality, creative content
- Clean Interface: Simple, writer-friendly design focused on the content
├── backend/
│ └── index.ts # Main Hono server with API routes
├── frontend/
│ ├── index.html # Main HTML template
│ ├── index.tsx # React frontend application
│ └── style.css # Custom styling
├── shared/
│ └── types.ts # Shared TypeScript types
└── README.md
GET /
- Serves the main applicationPOST /api/generate-story
- Generates a short storyPOST /api/generate-poem
- Generates a poem
- Choose between story or poetry generation
- Fill in the creative prompts (genre, mood, theme, etc.)
- Click generate to receive AI-created content
- Use the generated content as inspiration for your own writing
OPENAI_API_KEY
- Required for AI content generation