Installation Guide
This comprehensive guide covers everything you need to install, configure, and deploy Reseñas Gastronómicas. Whether you’re setting up for local development or preparing for production deployment, this guide has you covered.System Requirements
Minimum Requirements
Node.js
Version 14.0 or higher
npm
Version 6.0 or higher (included with Node.js)
Browser
Any modern browser (Chrome, Firefox, Safari, Edge)
Firebase Account
Free tier is sufficient
Recommended Specifications
- Operating System: Windows 10+, macOS 10.14+, or Linux
- RAM: 4GB minimum, 8GB recommended
- Storage: 500MB free space
- Internet: Stable connection for Firebase CDN access
Installation Steps
Don't have Node.js installed?
Download and install Node.js from nodejs.org. Choose the LTS (Long Term Support) version for stability.After installation, close and reopen your terminal, then verify the installation with the commands above.
# Using Git
git clone <your-repository-url>
cd resenas-gastronomicas
# Or download the ZIP and extract it
# Then navigate to the directory
cd resenas-gastronomicas
The application primarily uses CDN-delivered libraries (Firebase, Tailwind CSS, Font Awesome) to minimize bundle size and improve loading performance.
- Click “Add project” or “Create a project”
- Enter project name:
resenas-gastronomicas(or your preferred name) - Click Continue
- Choose whether to enable Google Analytics
- For development, you can disable it
- Click Create project
- Click “Create database”
- Choose a starting mode:
If you choose test mode, remember that the permissive rules expire after 30 days. You’ll need to update your security rules before then.
- Click the gear icon (⚙️) next to “Project Overview”
- Select Project settings
- Scroll to “Your apps” section
- Click the Web icon (
</>) - Register your app (e.g., “Reseñas Gastronómicas Web”)
- Copy the
firebaseConfigobject
src/js/data/firebase-config.js:
Your actual Firebase config will have real values. Copy them exactly as shown in the Firebase Console.
# Firebase configuration
src/js/data/firebase-config.js
# Environment variables
.env
# Dependencies
node_modules/
# Build output
dist/
# IDE files
.vscode/
.idea/
Never commit
firebase-config.js to public repositories. These credentials allow access to your Firebase project.# Option 1: If dev-server.js exists
npm run dev
# Option 2: Using Python
python -m http.server 8000
# Option 3: Using npx http-server
npx http-server -p 8000
# Option 4: Using PHP
php -S localhost:8000
Project Structure
Understanding the project structure helps with customization and troubleshooting:Application Architecture
The application follows a modular ES6 architecture:Entry Point (app.js)
Firebase Service Layer (firebase.js)
Handles all Firebase interactions:Data Store (datastore.js)
Manages application state and real-time synchronization:UI Module (ui.js)
Handles rendering and updates:Configuration Options
Firebase Security Rules
For production, configure Firestore security rules:- Go to Firestore Database
- Click Rules tab
- Paste your rules
- Click Publish
Custom Styling
The application uses Tailwind CSS via CDN. For custom styles, edit:Environment Variables (Optional)
For advanced configurations, create a.env file:
dotenv in your build process.
Development Scripts
Thepackage.json includes these scripts:
Running Development Server
Building for Production
Serving Built Files
Database Schema
Reviews are stored in Firestore with this structure:Either or both reviewers can be present. The
timestamp field is used for ordering reviews, while date is the user-friendly display date.Troubleshooting
Common Issues
Module not found errors
Module not found errors
Symptom: Browser console shows
Failed to load module scriptCause:- Incorrect file paths in imports
- Missing
firebase-config.jsfile - Server not serving from correct directory
Firebase initialization errors
Firebase initialization errors
Symptom: Console shows
Firebase App not initialized or similarCause:- Incorrect Firebase configuration
- Firebase SDK not loaded from CDN
- Network blocking CDN access
CORS errors when loading
CORS errors when loading
Symptom: Console shows
CORS policy errorsCause:- Opening
index.htmldirectly (file:// protocol) - Module imports require HTTP server
Reviews not persisting to Firebase
Reviews not persisting to Firebase
Symptom: Reviews appear but disappear on refreshCause:
- Firestore not enabled
- Security rules blocking writes
- Network connectivity issues
Debug Mode
Enable verbose logging:Deployment
Firebase Hosting (Recommended)
publicNoNoOther Hosting Options
Netlify
Drag and drop the
public folder to NetlifyVercel
Connect your GitHub repo and deploy automatically
GitHub Pages
Push to
gh-pages branch for free hostingTraditional Hosting
Upload files via FTP to any web host
Next Steps
Now that you have Reseñas Gastronómicas installed:Quick Start
Learn basic usage and features
Customization
Customize the look and feel
API Reference
Explore the module APIs
Best Practices
Learn optimization and security tips
Getting Help
If you need assistance:- Check the browser console for specific error messages
- Verify all installation steps were completed correctly
- Review Firebase Console for service status and quotas
- Check that your Firebase project is on the Blaze (pay as you go) plan if needed
Happy cooking and reviewing! 👨🍳👩🍳