Getting GastroMóvil running on your local machine takes about ten minutes. The application uses Daphne as its ASGI server (instead of the usualDocumentation 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.
runserver) because Django Channels requires a real ASGI runtime to handle WebSocket connections for real-time order tracking and driver dispatch. Follow the steps below to go from a fresh clone to a fully functional local instance.
GastroMóvil uses
channels.layers.InMemoryChannelLayer as its default channel layer, which is configured in settings.py. This means you do not need a Redis server for local development — WebSocket messages are routed in-process. The InMemoryChannelLayer is not suitable for production multi-worker deployments, but it works perfectly for a single local process.Prerequisites
Before you begin, make sure you have the following available on your machine:- Python 3.11 or newer — GastroMóvil targets Python 3.11+; check with
python --version. - MySQL — A locally running MySQL instance with permission to create databases.
- Cloudinary account — Free tier is sufficient; you will need your cloud name, API key, and API secret.
- Resend account — A free Resend account provides the API key for transactional email (verification codes, password recovery).
- Groq API key — Sign up at console.groq.com to obtain a key for the LangChain-powered AI chatbot.
Create and activate a virtual environment
Create a Python virtual environment to isolate the project’s dependencies from your system Python:Then activate it:
Install Python dependencies
Install all required packages from the pinned requirements file:This installs Django 6.0.3, Daphne 4.2.1, Django Channels 4.3.2, Django REST Framework 3.17.0, SimpleJWT 5.5.1, LangChain-Groq 1.1.2, django-allauth 65.15.1, PyMySQL 1.1.2, cloudinary, django-cloudinary-storage, WhiteNoise 6.12.0, django-tailwind 4.4.2, Resend 2.30.1, and all their transitive dependencies.
Create a .env file
GastroMóvil reads configuration from a
.env file in the project root via python-dotenv and python-decouple. Create the file and populate every variable:Run database migrations
Make sure your local MySQL server is running and the database named in
DB_NAME exists, then apply all migrations:Create a superuser
Create an admin account to access the Django admin panel at Enter a username, email address, and password when prompted. You can then log into
/admin/:/admin/ to manage restaurants, users, and orders.Build Tailwind CSS
GastroMóvil uses the This compiles the Tailwind configuration from the
django-tailwind package to compile its Tailwind CSS stylesheet. Run the build command before starting the server so that all styles are available:theme app and outputs the production CSS into the static directory.Start the Daphne ASGI server
GastroMóvil must be served by Daphne (not Django’s built-in Daphne will load
runserver) because Django Channels requires a real ASGI process to accept WebSocket connections. Start it with:gastromovil/asgi.py, which wires HTTP traffic to get_asgi_application() and WebSocket traffic to the pedidos and repartidores channel routing tables behind AuthMiddlewareStack.Open the application
Navigate to http://localhost:8000 in your browser. You should see the GastroMóvil homepage. The Django admin is available at http://localhost:8000/admin/.Key URLs to explore:
| URL | Description |
|---|---|
/ | Homepage — restaurant listing |
/admin/ | Jazzmin-powered Django admin |
/usuarios/login/ | Login page |
/register/ | Customer registration |
/panel/ | Staff admin panel |
/panel-restaurante/ | Restaurant owner dashboard |
/panel-repartidor/ | Driver dispatch panel |
/api/login/ | JWT token endpoint (POST) |
/api/pedidos/ | Orders REST API |