Prerequisites
Ficha Dubai is a vanilla JavaScript application with minimal requirements:- A modern web browser (Chrome, Firefox, Safari, Edge)
- A local web server (for development)
- A text editor (VS Code, Sublime, etc.)
No build tools, no npm packages, no framework dependencies. Everything runs directly in the browser.
File Structure
Here’s the complete file structure you’ll be working with:Core Dependencies
All dependencies are loaded via CDN in the HTML head section:Tailwind CSS (via CDN)
Google Fonts
- Inter: Body text and general UI elements
- Plus Jakarta Sans: Display headings and prominent text
- Material Icons/Symbols: All icons throughout the interface
Installation Steps
Add Core Files
Copy or create these files in your project root:
index.html- The main HTML templateapp.js- JavaScript application logicstyles.css- Custom CSS (optional)property-5157395.json- Property data
The
styles.css file is optional since most styling comes from Tailwind. It contains only supplementary custom styles.Add Property Images
Place your property images in the The app automatically prepends
images/ directory. Ficha Dubai supports:- WebP format (recommended for best performance)
- JPG/JPEG
- PNG
images/ to relative paths (see app.js:246-249).Property Data Structure
Understanding the JSON structure is crucial for adding your own properties. Here’s the complete schema:Key Fields Explained
Property Details (detalles_propiedad)
Property Details (detalles_propiedad)
- area: Private area in square meters
- area_construida: Built area in square meters
- tipo_inmueble: Property type (Apartamento, Casa, etc.)
- estrato: Socioeconomic stratum (1-6 in Colombia)
- precio_venta: Sale price in Colombian pesos (COP)
- precio_anterior: Previous price (for showing discounts)
- num_habitaciones: Number of bedrooms
- baños: Number of bathrooms
- garajes: Number of parking spaces
- anos_antiguedad: Property age in years
Location Data
Location Data
- direccion: Street address
- barriocomun: Neighborhood name
- ciudad: City name
- departamento: State/department
- latitud: Latitude for map display
- longitud: Longitude for map display
app.js:549-568).Contact Information
Contact Information
- telefono: Phone number for calls
- correo: Email address
- contacto_zona: Alternative contact number
tel:links for phone callsmailto:links for emails- WhatsApp links with country code (+57 for Colombia)
Images Array
Images Array
Each image object contains:
- url: Filename or full URL
- order: Display order (sorted automatically)
- type_img: Image type identifier
images/) and absolute URLs.360° Virtual Tour
360° Virtual Tour
- url_360: Link to 360° virtual tour
- Overlay button on main gallery image
- Link button in description section
Adding Your Property Data
Create a new JSON file for each property:Update Property Information
Edit the JSON with your property details. Required fields:
titulo(title)descripcion(description)detalles_propiedad.precio_venta(price)- At least one image
Key Features Implementation
Currency Formatting
Prices are formatted using Colombian peso (COP) format:currency and style parameters.
Gallery System
The gallery features:- Paginated thumbnails: 8 on desktop, 4 on mobile
- Lightbox mode: Full-screen image viewer with keyboard navigation
- Auto-pagination: Automatically advances pages when using arrow navigation
Responsive Design
Breakpoints are handled by Tailwind CSS classes. The app automatically adjusts:- Gallery thumbnails per page on resize
- Header layout (stacked on mobile)
- Contact sidebar position
Customization Tips
Change Language
All text is in Spanish by default. To translate:
- Update HTML text in
index.html - Update currency locale in
app.js:17("es-CO"→"en-US") - Update property data in JSON files
Add Google Analytics
Already included! Update the tracking ID in
index.html:37-43:Modify Color Scheme
Edit Tailwind config in
index.html:11-34. Custom colors:primary: Main accent coloraccent-teal: 360° tour buttonnavy-deep: Header background
Custom Styles
Add custom CSS to the
<style type="text/tailwindcss"> block in index.html:45-68 or external styles.css.Production Deployment
For production deployment:Update Google Analytics ID
Replace the placeholder ID in
index.html:43 with your actual tracking ID.Consider CDN Alternatives
For production, consider:
- Self-hosting Tailwind CSS for offline availability
- Using a font hosting service or self-hosting fonts
- Implementing a proper backend API for property data
Troubleshooting
Property Data Not Loading
Property Data Not Loading
Error: “No se pudo cargar el inmueble”Solutions:
- Verify JSON file exists in the same directory as
index.html - Check browser console for fetch errors
- Ensure you’re using a web server (not
file://protocol) - Validate JSON syntax using jsonlint.com
Images Not Displaying
Images Not Displaying
Possible causes:
- Images not in
images/directory - Incorrect file paths in JSON
- File permissions issue
Dark Mode Not Working
Dark Mode Not Working
The toggle button (
index.html:238-241) requires JavaScript. Verify:app.jsis loaded successfully- No JavaScript errors in console
- Button is visible (bottom-left corner)
Map Not Showing
Map Not Showing
Maps require valid coordinates:
- Check
latitudandlongitudfields in JSON - OpenStreetMap embed may be blocked by ad blockers
- Try the “Ver en Google Maps” link as fallback
What’s Next?
Now that you have Ficha Dubai installed, explore:- Creating multiple property pages
- Customizing the theme to match your brand
- Integrating with a backend API
- Adding property search functionality
- Building a property listing index page