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 is a full-stack food delivery web application built on Django 6.0.3 and Django Channels 4.3.2, designed to connect hungry customers with local restaurants and the delivery drivers who serve them. The project runs entirely under ASGI via the Daphne server, enabling persistent WebSocket connections alongside standard HTTP — a requirement for its real-time order-tracking and driver-dispatch features. It ships with a LangChain + Groq AI chatbot, Google OAuth social login, Cloudinary-backed media storage, Resend transactional email, and a JWT-secured REST API — all production-ready and pre-configured for one-click deployment to Railway.

User Roles

GastroMóvil is built around three distinct user roles, each with its own dashboard and permission set:
RoleSpanish keyResponsibilities
CustomerclienteBrowses restaurants, adds items to cart, places and tracks orders
Restaurant ownerrestauranteManages the restaurant profile, menu categories, and products; monitors incoming orders
Delivery driverrepartidorReceives real-time dispatch notifications via WebSocket and updates delivery status

Key Technical Features

  • ASGI + Daphnegastromovil.asgi:application routes both HTTP and WebSocket traffic through a single ProtocolTypeRouter.
  • Django Channels 4.3.2 — WebSocket consumers in the pedidos and repartidores apps push order-status events to connected clients without polling.
  • Django REST Framework 3.17.0 + SimpleJWT 5.5.1 — A token-based REST API issues short-lived Bearer tokens (60-minute access window) for programmatic access to orders, products, categories, and restaurants.
  • LangChain-Core 1.2.20 + LangChain-Groq 1.1.2 — The chatbot app integrates a Groq-powered LLM assistant accessible through the /api/ chatbot routes.
  • Google OAuth via django-allauth 65.15.1 — Customers can sign in with their Google account; a custom CustomSocialAccountAdapter handles role assignment on first login.
  • Cloudinary — All user-uploaded media (product images, restaurant logos) is stored in Cloudinary (cloudinary_storage.storage.MediaCloudinaryStorage).
  • WhiteNoise 6.12.0 — Static assets are served directly by WhiteNoise middleware without a separate CDN.
  • MySQL + PyMySQL 1.1.2 — The database engine is MySQL, accessed through PyMySQL shimmed as MySQLdb. SSL can be toggled on or off via an environment variable.
  • Tailwind CSS via django-tailwind 4.4.2 — Styles are compiled with the tailwind build management command; the theme app holds the Tailwind configuration.
  • Jazzmin admin — The Django admin interface uses Jazzmin for an enhanced UI, branded as GastroWeb Admin.
  • Resend 2.30.1 — Transactional emails (verification codes, password recovery) are sent through the Resend API.
  • Railway deploymentrailway.toml and railway.json provide Nixpacks build and start commands ready for Railway’s CI/CD.

Application Architecture

GastroMóvil is organized into focused Django apps, each owning its models, views, URLs, and templates:
AppPurpose
coreHomepage, registration, admin panel, order history, shared views
usuariosCustom Usuario model, email/password auth, Google OAuth adapter, email verification
restaurantesRestaurant and product management, categories, menu views, REST endpoints
carritoShopping cart session logic and context processor
pedidosOrder creation, status management, WebSocket consumers for real-time updates
repartidoresDriver profiles, assignment logic, WebSocket consumers for dispatch
chatbotLangChain + Groq AI assistant, chat history, REST endpoint
contactoContact form submission and email routing
The ASGI entry point (gastromovil/asgi.py) composes the WebSocket URL patterns from pedidos.routing and repartidores.routing behind an AuthMiddlewareStack, ensuring only authenticated sessions can open WebSocket connections.

Explore the Docs

Quickstart

Clone the repo, configure environment variables, and start the Daphne ASGI server locally in under 10 minutes.

Deployment

Deploy GastroMóvil to Railway with Nixpacks, a managed MySQL database, Cloudinary media, and Resend email.

Build docs developers (and LLMs) love