Quote Discussion Platform

A real-time platform where users can post famous quotes and discuss them in chat rooms.

Features

  • 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

Project Structure

├── 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

Technology Stack

  • 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

Getting Started

  1. The app will automatically set up the database on first run
  2. Visit the app URL to start using the platform
  3. Create a username to begin posting quotes and chatting
  4. Use the split-screen interface to post quotes and discuss them

API Endpoints

  • GET / - Main application
  • POST /api/users - Create/login user
  • GET /api/quotes - Get all quotes
  • POST /api/quotes - Post a new quote
  • GET /api/chat/messages - Get chat messages
  • POST /api/chat/messages - Send chat message
  • GET /api/chat/stream - SSE stream for real-time updates