A chat application frontend built with React + Vite, focused on real-world problems like chat invitations, pagination, and debounced search.
This repo contains only the frontend of the project and communicates with a REST API backend. For the first time, I used figma to visualize before coding.
- Login & Signup flows
- JWT-based authentication (short-lived tokens handled on backend)
- Protected routes for authenticated users
- Search users only by username
- Send a first message as a chat invitation
- Messaging is blocked until the receiver accepts the invite
- Supports accepted, pending, and blocked chat states
- UI adapts based on chat status (pending / accepted / blocked)
- Prevents users from messaging themselves
- Graceful handling of empty states and edge cases
- Messages are fetched in chunks using cursor-based pagination
- Older messages load when scrolling up
- Designed to work efficiently without fetching the entire chat history
This feature highlighted real-world UX challenges, and helped me deeply understand scroll containers, layout constraints, and pagination strategies.
- Search input is debounced to avoid excessive API calls
- Improves performance and prevents unnecessary backend load
- Search results only return minimal user info (id + username)
- Optional casual name for better identity
- User mood (happy / sad / angry / neutral)
- Mood visibility depends on chat relationship status
- React
- Vite (Fast dev & build tooling)
- Styled Components (CSS-in-JS, no Tailwind)
- React Router (Client-side routing)
- Pure JavaScript
- REST API
- Deployed using Netlify
- Includes
_redirectsconfiguration to support client-side routing
Try it out now: https://messaging-punith1117.netlify.app/
- Cursor-based pagination is harder than it looks—especially in chat UIs
- Scroll behavior differs significantly between desktop and mobile
- Debouncing is essential for search-heavy interfaces
- UI must actively reflect backend rules (chat status, permissions)
- Building full features > reading documentation endlessly
- Backend Repo: https://github.com/Punith1117/messaging

