Browser Requirements
The application requires a modern browser with support for:ECMAScript 2015+
ES6+ features including arrow functions, classes, and modules
React 18
Modern React features and hooks API
CSS3
Flexbox, Grid, and modern layout features
Hash Routing
Support for client-side routing with hash-based URLs
Supported Browsers
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
Project Structure
Understanding the project structure helps you navigate and modify the codebase:CDN Dependencies
The application loads all dependencies via CDN for zero build configuration. Here’s what’s included inindex.html:15-39:
UI Framework & Styling
Bootstrap 5.0.2
Bootstrap 5.0.2
Font Awesome 4.5.0
Font Awesome 4.5.0
Google Fonts
Google Fonts
React & React DOM
React 18.0.0 & React DOM 18.2.0
React 18.0.0 & React DOM 18.2.0
For production, replace with
.production.min.js versions for better performance.Babel Standalone
Babel Standalone
type="text/jsx" are automatically processed.Routing
React Router 6.18.0
React Router 6.18.0
HashRouter defined in app.js:16.State Management
Redux Toolkit & React Redux
Redux Toolkit & React Redux
Local Dependencies
Local scripts are loaded in dependency order fromindex.html:41-60:
Installation Methods
Method 1: Direct File System
You cannot open
index.html directly (file://) due to CORS restrictions when loading modules and fetching remote data.Method 2: Live Server Extension
If you use VS Code:Install Live Server
Install the Live Server extension from the VS Code marketplace.
Configuration
Update API Endpoint
The application fetches camera data from a remote JSON file. To use your own data source, modifyservices/getdata.js:2:
Camera Data Schema
Each camera object should follow this structure (fromstore/camarasSlice.js:4-18):
Required Fields
Required Fields
id(number): Unique identifiermodelo(string): Camera model name (used in URLs)diseño(string): “Interior” or “Exterior”resolucion(string): Resolution (e.g., “2 mp”, “4 mp”)tipo_de_camara(string): Camera type (e.g., “Domo”, “Bullet”)imagenes(array): Array of image URLs
Troubleshooting
Blank page on load
Blank page on load
Problem: The page loads but stays blank.Solutions:
- Check browser console for JavaScript errors
- Verify all CDN resources loaded (check Network tab)
- Ensure you’re using HTTPS or HTTP, not
file:// - Check that remote data API is accessible
Filters not working
Filters not working
Problem: Clicking filters doesn’t update results.Solutions:
- Check that Redux store initialized correctly
- Verify camera data matches the expected schema
- Ensure
diseño,resolucion, andtipo_de_camarafields exist - Check browser console for dispatch errors
Images not loading
Images not loading
Problem: Camera images show broken image icons.Solutions:
- Verify image URLs are accessible
- Check for CORS issues in browser console
- Ensure image URLs use HTTPS (if site is HTTPS)
- Confirm
imagenesarray contains valid URLs
CORS errors
CORS errors
Problem: Console shows CORS policy errors.Solutions:
- Use a local HTTP server (not
file://) - Ensure API endpoint includes proper CORS headers
- For development, use a CORS proxy or browser extension
- Contact API provider to enable CORS
Production Deployment
For production deployment:Switch to production builds
In
index.html, replace React development builds with production versions:Configure caching
Set appropriate cache headers on your web server:
- Static assets: 1 year
- HTML: No cache or short TTL
- API responses: Based on update frequency
Next Steps
Architecture Overview
Learn how the application is structured
Component Guide
Explore React components and their props
State Management
Understand Redux store and actions
API Reference
Detailed API documentation for components