Famous_Quote_Discussions
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.
index.ts
https://aha--9352df503fae11f0b79476b3cceeab13.web.val.run
A real-time platform where users can post famous quotes and discuss them in chat rooms.
- Split-screen Layout: Quote posting on the left, real-time chat on the right
- User Identity: Username-based authentication (no passwords required)
- Real-time Chat: Live discussion about posted quotes
- Quote Management: Post, view, and discuss famous quotes
- Responsive Design: Works on desktop and mobile devices
βββ backend/
β βββ database/
β β βββ migrations.ts # Database schema setup
β β βββ queries.ts # Database query functions
β βββ routes/
β β βββ quotes.ts # Quote-related API endpoints
β β βββ chat.ts # Chat API endpoints
β β βββ users.ts # User management endpoints
β βββ index.ts # Main Hono server
βββ frontend/
β βββ components/
β β βββ App.tsx # Main application component
β β βββ QuotePanel.tsx # Left panel for quotes
β β βββ ChatPanel.tsx # Right panel for chat
β β βββ UserAuth.tsx # Username creation/login
β βββ index.html # Main HTML template
β βββ index.tsx # Frontend entry point
βββ shared/
βββ types.ts # Shared TypeScript types
- Backend: Hono (TypeScript API framework)
- Database: SQLite for data persistence
- Frontend: React with TypeScript
- Styling: TailwindCSS
- Real-time: Server-Sent Events (SSE) for live updates
- The app will automatically set up the database on first run
- Visit the app URL to start using the platform
- Create a username to begin posting quotes and chatting
- Use the split-screen interface to post quotes and discuss them
GET /
- Main applicationPOST /api/users
- Create/login userGET /api/quotes
- Get all quotesPOST /api/quotes
- Post a new quoteGET /api/chat/messages
- Get chat messagesPOST /api/chat/messages
- Send chat messageGET /api/chat/stream
- SSE stream for real-time updates