• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
loading

loading

matrix

simple matrix client
Public
Like
matrix
Home
Code
4
backend
1
frontend
3
shared
2
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
6/18/2025
Viewing readonly version of main branch: v146
View latest version
README.md

Matrix Client

A beautiful web-based Matrix client built with React and TailwindCSS featuring customizable themes, responsive design, and mobile support.

Features

  • 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

Mobile Features

  • 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

Project Structure

β”œβ”€β”€ 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

Usage

  1. Open the application on any device
  2. Enter your Matrix homeserver URL (e.g., https://matrix.org)
  3. Login with your Matrix credentials
  4. Browse rooms and start chatting!

Mobile Usage

  • 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)

Features Implemented

  • βœ… 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

Responsive Breakpoints

  • Mobile: < 768px (single column, collapsible sidebar)
  • Tablet: 768px - 1024px (responsive layout)
  • Desktop: > 1024px (full sidebar always visible)

Technical Details

  • 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

Development

The backend serves as a proxy to handle CORS issues with Matrix homeservers. All Matrix API calls are proxied through /api/matrix/* endpoints.

Mobile Testing

Test the responsive design using:

  • Browser developer tools device simulation
  • Real mobile devices
  • Different screen orientations
  • Various viewport sizes
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
Β© 2026 Val Town, Inc.