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 miliseconds.
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