Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/lffiesco-svg/gastromovil/llms.txt

Use this file to discover all available pages before exploring further.

GastroMóvil loads all sensitive configuration from a .env file at the project root using two complementary libraries: python-dotenv (via load_dotenv()) and python-decouple (via config()). Neither library is used in isolation — load_dotenv populates os.environ at startup, and config() reads from it with optional casting and default values. This means every secret stays out of version control while still being accessible throughout the Django settings module.

Django Core

These two variables control the fundamental security and debug behaviour of the application.
SECRET_KEY
string
required
Django’s secret key used for cryptographic signing of sessions, tokens, and cookies. Generate a unique value for every environment — never reuse between staging and production.
DEBUG
boolean
default:"False"
Enables Django’s verbose debug mode. Set to True only during local development. In production this must be False to avoid leaking stack traces to end users.

Database (MySQL)

GastroMóvil requires MySQL. There is no SQLite fallback in the production settings. All five connection variables are read at startup via config().
DB_NAME
string
required
The name of the MySQL database. Example: gastromovil.
DB_USER
string
required
The MySQL username with full privileges on DB_NAME.
DB_PASSWORD
string
required
Password for the MySQL user above.
DB_HOST
string
required
Hostname or IP address of the MySQL server. Use localhost for local development, or the Railway-provided host for cloud deployments.
DB_PORT
string
default:"3306"
TCP port that MySQL listens on. The default value of 3306 is correct for both local installations and Railway MySQL.
USE_DB_SSL
string
default:"False"
When set to True the database connection uses an SSL context built from the certifi CA bundle with check_hostname disabled. Required on Railway and other cloud-managed MySQL services.

Email (SMTP / Resend)

GastroMóvil sends transactional emails through Resend and uses a legacy SMTP backend for the contact form.
RESEND_API_KEY
string
required
API key for the Resend transactional email service. Used to send verification codes, login alerts, and password recovery emails from noreply@gastromovil.online.
EMAIL_HOST_PASSWORD
string
required
SMTP password for the Gmail account configured as EMAIL_HOST_USER in settings.py. This credential powers the legacy SSLEmailBackend that handles the contact form (contacto app).
CONTACTO_EMAIL_PASSWORD
string
required
Password for the contact-form sender account (CONTATO_EMAIL in settings). Stored separately from EMAIL_HOST_PASSWORD so the two mail accounts can rotate credentials independently.

Cloudinary (Media Storage)

All restaurant banner images and product photos are uploaded to Cloudinary. The three variables below are passed directly to cloudinary.config() in settings.py.
CLOUDINARY_CLOUD_NAME
string
required
Your Cloudinary cloud name, visible in the Cloudinary dashboard URL: https://console.cloudinary.com/console/<cloud_name>.
CLOUDINARY_API_KEY
string
required
Cloudinary API key. Found under Settings → Access Keys in the Cloudinary console.
CLOUDINARY_API_SECRET
string
required
Cloudinary API secret. Treat this with the same care as a database password — it grants full write access to your media library.

External APIs

GOOGLE_API_KEY
string
required
Google Maps Geocoding API key. Used by the cart checkout flow to convert a user-supplied address string into latitude/longitude coordinates via https://maps.googleapis.com/maps/api/geocode/json.
GROQ_API_KEY
string
required
API key for the Groq inference platform. The chatbot uses the llama-3.3-70b-versatile model at temperature 0.5 to answer product-related questions.

Optional

FRONTEND_URL
string
default:"http://localhost:8000"
Base URL used by the AI chatbot (chatbot/ai/chatbot.py) to build absolute product links inside chatbot responses. In production this should be set to https://gastromovil.online.

Sample .env file

Copy the block below into a file named .env at the project root and fill in the real values before starting the server.
# ── Django Core ──────────────────────────────────────────────
SECRET_KEY=your-very-long-random-secret-key-here
DEBUG=True

# ── Database (MySQL) ─────────────────────────────────────────
DB_NAME=gastromovil
DB_USER=gastro_user
DB_PASSWORD=supersecretpassword
DB_HOST=localhost
DB_PORT=3306
USE_DB_SSL=False

# ── Email ────────────────────────────────────────────────────
RESEND_API_KEY=re_xxxxxxxxxxxxxxxxxxxx
EMAIL_HOST_PASSWORD=gmail-app-password-here
CONTACTO_EMAIL_PASSWORD=contact-account-password-here

# ── Cloudinary ───────────────────────────────────────────────
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=123456789012345
CLOUDINARY_API_SECRET=your-cloudinary-api-secret

# ── External APIs ────────────────────────────────────────────
GOOGLE_API_KEY=AIzaSy-your-google-maps-key
GROQ_API_KEY=gsk_your-groq-api-key

# ── Optional ─────────────────────────────────────────────────
FRONTEND_URL=http://localhost:8000
Never commit your .env file to version control. Add .env to your .gitignore immediately after creating it. If a secret is accidentally exposed, rotate it in the provider dashboard and update your environment before redeploying.
For local development set DEBUG=True and USE_DB_SSL=False. When deploying to Railway or any cloud MySQL service, flip both to DEBUG=False and USE_DB_SSL=True to enable the SSL CA bundle provided by certifi.

Build docs developers (and LLMs) love