The project defaults to SQLite for development. Switch to MySQL for production by updating these variables and uncommenting the MySQL DATABASES block in config/settings.py.
Variable
Required
Default
Description
DATABASE_ENGINE
No
django.db.backends.sqlite3
Django database backend. Use django.db.backends.mysql for production.
DATABASE_NAME
No
parque_marino_db.sqlite3
Database name (filename for SQLite, schema name for MySQL).
Comma-separated list of allowed CORS origins. Defaults to http://localhost:5173, http://127.0.0.1:5173, http://localhost:3000, http://127.0.0.1:3000.
CORS_ALLOW_CREDENTIALS is hardcoded to True in config/settings.py. This is required for JWT cookie-based authentication to work correctly with the frontend.
The Vite frontend reads variables prefixed with VITE_ from a .env file in the frontend/ directory. Create this file manually — there is no .env.example committed to the repository.
Only variables prefixed with VITE_ are exposed to the browser bundle. Never put server-side secrets in frontend environment variables.
Base URL of the Django API. Used to construct media file URLs (e.g. QR code images). The Axios instance in src/api/axiosInstance.js defaults to http://127.0.0.1:8000/ and should be updated to read from this variable for multi-environment support.
The frontend sends invoice emails directly from the browser using EmailJS. Configure a service and template in your EmailJS account, then set these variables.
Variable
Required
Default
Description
VITE_EMAILJS_SERVICE_ID
Yes
—
EmailJS service ID (e.g. service_ke9gzcs). Found in your EmailJS dashboard under Email Services.
VITE_EMAILJS_TEMPLATE_ID
Yes
—
Primary template ID for invoice emails (e.g. template_factura).
VITE_EMAILJS_PUBLIC_KEY
Yes
—
EmailJS public key (e.g. 3mQx8AVIUbbufg0BX). Found in Account → General.
The current codebase has the EmailJS credentials hardcoded in src/services/emailInvoiceService.js. Move them to environment variables for proper secret management in production.