Technology Stack Overview
Tienda ETCA is built with modern web technologies focused on React ecosystem tools. The application uses Vite for fast development and optimized builds, with a carefully selected set of dependencies for UI, routing, and state management.Core Technologies
React 19
Latest React version with improved performance and concurrent features
Vite 6.3
Lightning-fast build tool with instant HMR
React Router 7
Client-side routing with nested routes and protected routes
Bootstrap 5
Responsive UI framework for layout and components
Dependencies Breakdown
Based on~/workspace/source/package.json:
Production Dependencies
React Ecosystem
React Ecosystem
Core Libraries
- React 19.0.0 - Core library for building UI components
- React DOM 19.0.0 - React rendering for web browsers
- Functional components with hooks
- Context API for state management
- StrictMode for development warnings
- Concurrent rendering capabilities
Routing
Routing
- Client-side routing
- Nested routes
- Route parameters (e.g.,
/productos/:id) - Protected routes via wrapper components
- Programmatic navigation with
useNavigate BrowserRouterfor clean URLs
UI Framework & Styling
UI Framework & Styling
- Modern CSS framework
- Responsive grid system
- Pre-built components
- Utility classes
- Bootstrap components as React components
- No jQuery dependency
- Better integration with React
- Tooltip and popover positioning
- Required by Bootstrap for dropdowns
User Notifications
User Notifications
- Non-blocking notifications
- Multiple toast types (success, error, info, warning)
- Customizable position and duration
- Auto-dismiss
- Delete confirmations
- Success/error messages for CRUD operations
- Admin panel alerts
Icons
Icons
- Font Awesome
- Material Design Icons
- Bootstrap Icons
- And many more
Development Dependencies
Build Tool
Build Tool
- Instant server start
- Lightning-fast Hot Module Replacement (HMR)
- Optimized production builds
- Native ES modules support
- Built-in TypeScript support
- Fast Refresh for React
- JSX transformation
- React DevTools integration
Code Quality
Code Quality
- Syntax error detection
- Best practice recommendations
- Code style consistency
- eslint-plugin-react-hooks - Enforces Rules of Hooks
- eslint-plugin-react-refresh - Ensures Fast Refresh compatibility
Type Checking
Type Checking
- Enable better IDE autocomplete
- Provide inline documentation
- Help catch potential errors during development
- Support future TypeScript migration
External APIs
MockAPI
Base URL:
https://681cdce3f74de1d219ae0bdb.mockapi.io/tiendatobeREST API for product data and CRUD operations| Method | Endpoint | Purpose | Context |
|---|---|---|---|
| GET | /productos | Fetch all products | CartContext, AdminContext |
| POST | /productos | Create new product | AdminContext |
| PUT | /productos/:id | Update product | AdminContext |
| DELETE | /productos/:id | Delete product | AdminContext |
State Management
React Context API
React Context API
Built-in State ManagementNo external state management library (Redux, MobX, etc.) needed.Three Context Providers:
- AuthContext - Authentication and authorization
- CartContext - Shopping cart and products
- AdminContext - Admin panel operations
- No additional dependencies
- Simple API with hooks
- Sufficient for application scale
- Built-in to React
Browser Storage
localStorage - Client-side persistence- Authentication status (
isAuth) - User role (
role- ‘admin’ or ‘cliente’)
Development Tools
Vite Dev Server
Fast development with instant HMR at
localhost:5173React DevTools
Browser extension for inspecting React components
ESLint
Code quality and consistency checks
Browser Console
Debugging with console.log and error messages
Version Compatibility
Node.js RequirementsWhile not explicitly specified in package.json, Vite 6 requires:
- Node.js 18+ or 20+
- npm 7+ or yarn/pnpm
- React 19 (latest) - Uses modern concurrent features
- React Router 7 (latest) - Enhanced routing capabilities
- Vite 6 (latest) - Improved build performance
- Bootstrap 5 (no jQuery) - Modern CSS framework
Build Configuration
Vite Configuration
While not shown in the provided files, typical Vite config for React:CSS Architecture
Multiple Styling Approaches:- Bootstrap Classes - Utility and component classes
- Custom CSS - Component-specific styles in
components/style/ - Global Styles -
index.cssandApp.css - React Toastify CSS - Imported from node_modules
Package Scripts
Technology Decisions
Why React 19?
Why React 19?
Latest React version with:
- Improved concurrent rendering
- Better performance
- Enhanced developer experience
- Future-proof application
Why Vite over Create React App?
Why Vite over Create React App?
Vite provides:
- 10-100x faster dev server startup
- Instant Hot Module Replacement
- Faster production builds
- Modern tooling (ESM, esbuild)
- Better developer experience
Why Bootstrap 5?
Why Bootstrap 5?
Bootstrap 5 offers:
- No jQuery dependency (lighter)
- Modern CSS Grid/Flexbox
- Comprehensive component library
- Responsive utilities
- Well-documented
Why Context API over Redux?
Why Context API over Redux?
For this application size:
- Simpler API and setup
- No additional dependencies
- Built into React
- Sufficient state management
- Easier to learn and maintain
Why Two Notification Libraries?
Why Two Notification Libraries?
Different use cases:
- React Toastify: Quick, non-blocking notifications (cart actions)
- SweetAlert2: Modal confirmations and important alerts (delete confirmations)
Dependency Summary
Total Dependencies: 8 production + 9 development = 17 packagesLightweight Stack
Minimal dependencies focused on essential functionality, resulting in faster installs and smaller bundle size.
Future Considerations
TypeScript Migration
Type definitions already included for smooth migration path
Testing
Consider adding Vitest for unit tests and React Testing Library
Real Backend
Replace MockAPI with real backend (Node.js, Django, etc.)
State Management
If app grows, consider Zustand or Redux Toolkit
Next Steps
Architecture
Understand how these technologies work together
Project Structure
See how files are organized