matrix
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.
Viewing readonly version of main branch: v134View latest version
A beautiful web-based Matrix client built with React and TailwindCSS featuring customizable themes, responsive design, and mobile support.
- Connect to any Matrix homeserver
- Login with username/password
- View and join rooms
- Send and receive messages
- Real-time message updates
- Customizable themes with multiple color schemes
- App settings page for theme customization
- Fully responsive design optimized for mobile and desktop
- Mobile-first UI with touch-friendly interactions
- Enhanced message display with better grouping
- Smooth animations and transitions
- Responsive Layout: Adapts seamlessly to all screen sizes
- Mobile Sidebar: Collapsible sidebar with overlay on mobile
- Touch Optimized: Proper touch targets and gestures
- Safe Area Support: Works with device notches and rounded corners
- Mobile Header: Dedicated mobile navigation with room info
- Optimized Input: Mobile-friendly message composition
- Swipe Navigation: Easy room switching on mobile devices
βββ backend/
β βββ index.ts # Proxy server for Matrix API (CORS handling)
βββ frontend/
β βββ components/
β β βββ App.tsx # Main application component (responsive)
β β βββ Login.tsx # Login form (mobile-optimized)
β β βββ RoomList.tsx # List of joined rooms (responsive)
β β βββ ChatView.tsx # Chat interface (mobile-friendly)
β β βββ MessageList.tsx # Message display
β β βββ MessageInput.tsx # Message composition (touch-optimized)
β β βββ Settings.tsx # App settings and theme selection
β βββ index.html # Main HTML template (mobile meta tags)
β βββ index.tsx # Frontend entry point
βββ shared/
β βββ types.ts # Shared TypeScript types
β βββ themes.ts # Theme definitions and utilities
βββ README.md
- Open the application on any device
- Enter your Matrix homeserver URL (e.g., https://matrix.org)
- Login with your Matrix credentials
- Browse rooms and start chatting!
- Tap the hamburger menu to open/close the sidebar
- Tap a room to open it and automatically close the sidebar
- Use the mobile header to navigate back to room list
- Tap and hold for additional options (future feature)
- β Advanced Theme System: Multiple color themes with CSS custom properties
- β App Settings Page: Dedicated settings interface for theme customization
- β Theme Persistence: Remembers selected theme across sessions
- β Live Theme Preview: See how themes look before applying them
- β Smooth Theme Transitions: Beautiful animated color changes
- β No Flash Loading: Theme applied before page render to prevent white flash
- β System Integration: Automatically follows system dark/light mode preference as default
- β Fully Responsive Design: Works perfectly on desktop, tablet, and mobile
- β Mobile-First UI: Touch-optimized interface with proper spacing
- β Collapsible Sidebar: Mobile-friendly navigation with overlay
- β Safe Area Support: Handles device notches and rounded corners
- β Touch Targets: Minimum 44px touch targets for accessibility
- β Mobile Headers: Dedicated mobile navigation bars
- β Enhanced Login: Gradient background with responsive form styling
- β Tabbed Interface: Separate tabs for public rooms and direct messages
- β Private Messages: Full support for direct message conversations
- β Smart Room Detection: Automatically categorizes rooms vs DMs
- β Advanced Chat View: Enhanced message bubbles with better grouping
- β Smart Message Display: Date separators and time grouping
- β Responsive Input: Auto-resizing message input with mobile optimization
- β Duplicate Prevention: Smart filtering to prevent message repetition
- β Real-time Sync: Live message updates with optimized polling
- β Session Persistence: Automatic login restoration
- β Error Handling: Comprehensive error states with retry options
- β Optimistic Sending: Messages appear instantly with proper fallback
- β Smooth Animations: CSS transitions and message animations
- β Custom Scrollbars: Styled for all themes and devices
- Mobile: < 768px (single column, collapsible sidebar)
- Tablet: 768px - 1024px (responsive layout)
- Desktop: > 1024px (full sidebar always visible)
- Backend: Hono-based proxy server to handle CORS issues with Matrix homeservers
- Frontend: React SPA with TailwindCSS for responsive styling
- Real-time: Polling-based sync for new messages
- Storage: LocalStorage for session persistence
- API: Matrix Client-Server API v1.0
- Mobile: Viewport meta tags, safe area support, touch optimization
The backend serves as a proxy to handle CORS issues with Matrix homeservers.
All Matrix API calls are proxied through /api/matrix/* endpoints.
Test the responsive design using:
- Browser developer tools device simulation
- Real mobile devices
- Different screen orientations
- Various viewport sizes