Backend changes: - Socket.IO: Send last 20 messages on join_event_room - REST API: Add GET /api/events/:eventId/messages endpoint with pagination - Support for 'before' cursor-based pagination for loading older messages Frontend changes: - Load initial 20 messages when joining event chat - Implement infinite scroll to load older messages on scroll to top - Add loading indicator for older messages - Preserve scroll position when loading older messages - Add eventsAPI.getMessages() function for pagination User experience: - New users see last 20 messages immediately - Scrolling up automatically loads older messages in batches of 20 - Smooth scrolling experience with position restoration Note: Messages are encrypted in transit via HTTPS/WSS but stored as plain text in database (no E2E encryption).
React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.