Introduction
TradeMaster Transactions (TMT) is a comprehensive event ticketing and management platform built with React 18, Redux Toolkit, and Firebase. The application provides a complete solution for managing events, venues, tickets, transactions, and user roles across multiple organizational levels.Technology Stack
The platform is built using modern web technologies:Frontend Framework
React 18.3.1 with functional components and hooks
State Management
Redux Toolkit with Redux Persist
Backend Services
Firebase (Authentication, Firestore, Cloud Functions)
UI Framework
Material-UI (MUI) v5 with custom theming
Application Architecture
Entry Point
The application bootstraps inmain.jsx with several key providers:
main.jsx
Core Application Flow
The mainApp.jsx component orchestrates the application:
App.jsx
Routing Architecture
The application uses React Router v6 with a centralized routing configuration inroutes/Router.js:
Route Protection Layers
Authentication Guard
AuthGuard protects all authenticated routes, redirecting unauthenticated users to loginRoute Structure
Router.js
State Management
Redux Store Configuration
The application uses Redux Toolkit with persistence for key state slices:Store.js
Redux Slice Pattern
All feature modules follow a consistent slice pattern with async thunks:EventsSlice.js
Component Architecture
Layout System
The application uses two primary layouts:Component Organization
Permission System (CASL)
The platform implements role-based access control using CASL:- Roles
- Implementation
- Administrador: Full system access
- Cliente: Client-level access
- Coordinador: Event coordination permissions
- Contador: Financial/accounting access
- Soporte: Support team permissions
Data Flow Patterns
Typical Data Flow
Example: Fetching and Displaying Events
Key Dependencies
Core Dependencies
Core Dependencies
reactv18.3.1 - UI frameworkreact-router-domv6.3.0 - Routing@reduxjs/toolkitv1.8.3 - State managementfirebasev9.5.0 - Backend services
UI & Styling
UI & Styling
@mui/materialv5.10.16 - Component library@emotion/react&@emotion/styled- CSS-in-JS@tabler/icons- Icon library
Form & Validation
Form & Validation
formikv2.2.9 - Form managementyupv0.32.11 - Schema validation
Authorization
Authorization
API Communication
Firebase Integration
The platform primarily uses Firebase services:- Authentication: User authentication and session management
- Firestore: Real-time database for all application data
- Cloud Functions: Server-side logic (httpsCallable functions)
- Storage: File and image storage
HTTP Callable Functions
Server-side operations are handled via Firebase Cloud Functions:Firebase.js
Development Patterns
Lazy Loading
All route components are lazy-loaded for optimal performance:Custom Hooks
The application provides custom hooks for common operations:useAuth()- Access authentication contextuseMounted()- Track component mount state
Error Handling
Consistent error handling with toast notifications:Next Steps
Authentication
Learn about Firebase authentication, Auth0 integration, and session management
Redux Store
Explore Redux store configuration and persistence
Redux Slices
Discover all Redux slices and their state management patterns
Components
Deep dive into React components and their APIs