Frontend Overview
The Iquea Commerce frontend is a modern React application built with TypeScript, providing a fast and responsive user interface for the e-commerce platform.Technology Stack
The frontend leverages cutting-edge web technologies:React 19
Latest React with improved performance and new features
TypeScript 5.9
Type-safe development with advanced type checking
Vite 7
Lightning-fast build tool and dev server
React Router 7
Client-side routing with modern navigation
Key Dependencies
Based on the project’spackage.json:
package.json
Core Libraries
- jwt-decode - Decodes JWT tokens for authentication
- react-icons - Icon library with FiIcons and Material Design icons
- react-router-dom - Client-side routing
Project Structure
The source code follows a modular, feature-based structure:Development Workflow
Starting Development Server
http://localhost:5173.
Building for Production
dist/ directory.
Type Checking
TypeScript compilation happens automatically during build:Linting
Preview Production Build
Configuration Files
Vite Configuration
vite.config.ts
TypeScript Configuration
The project uses three TypeScript config files:tsconfig.json- Base configurationtsconfig.app.json- Application-specific settingstsconfig.node.json- Node/build tool settings
Styling Approach
The application uses pure CSS without any CSS framework:- Component-specific CSS files (e.g.,
Navbar.css,Footer.css) - BEM-like naming convention (e.g.,
navbar__container,navbar__link) - Custom properties for theming
- No CSS-in-JS or utility frameworks
Architecture Patterns
Context-Based State Management
Global state is managed using React Context API:AuthContext- User authentication stateCartContext- Shopping cart state
Type-Safe API Layer
All API calls are typed with TypeScript interfaces, ensuring type safety throughout the application.Component Composition
Reusable components follow React best practices:- Functional components with hooks
- Props interfaces for type safety
- Separation of concerns (UI vs. logic)
Next Steps
React Components
Learn about the UI component library
Routing Setup
Understand the application routing
State Management
Explore authentication and cart contexts
API Integration
See how the frontend connects to the backend