omo
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.
A full-stack flight booking application built with React and Hono on Val Town.
- Search for flights by origin, destination, and date
- View available flights with pricing
- Book flights with passenger information
- View booking confirmations
- Responsive design with TailwindCSS
├── backend/
│ ├── database/
│ │ ├── migrations.ts # Database schema setup
│ │ └── queries.ts # Database query functions
│ ├── routes/
│ │ ├── flights.ts # Flight search and booking routes
│ │ └── static.ts # Static file serving
│ └── index.ts # Main Hono app entry point
├── frontend/
│ ├── components/
│ │ ├── App.tsx # Main React app component
│ │ ├── FlightSearch.tsx # Flight search form
│ │ ├── FlightResults.tsx# Flight search results
│ │ └── BookingForm.tsx # Flight booking form
│ ├── index.html # Main HTML template
│ └── index.tsx # Frontend React entry point
├── shared/
│ └── types.ts # Shared TypeScript types
└── README.md
GET /
- Serves the main applicationGET /api/flights/search
- Search for flightsPOST /api/flights/book
- Book a flightGET /api/bookings/:id
- Get booking details
flights
- Available flights with routes, times, and pricingbookings
- User flight bookings with passenger information
This app runs on Val Town. The backend serves both the API and the frontend files.