Ocipe’s Django backend requires several environment variables for secrets and database credentials. The React frontend does not use environment variables — its backend URL is hardcoded inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/viet2811/ocipe/llms.txt
Use this file to discover all available pages before exploring further.
src/api/axios.ts. This page documents every backend variable with a description and example value, and explains how to change the frontend API target.
Backend environment variables
The Django backend loads its environment from a.env file in ocipe/backend/ using python-dotenv. The following variables are read in settings.py:
The Django
SECRET_KEY used for cryptographic signing of sessions, CSRF tokens, and other security-sensitive operations. Generate a long, random string and keep it secret. Rotating this value will invalidate all existing sessions.Example: django-insecure-g3$kx!p2v8q... (use a tool like python -c "import secrets; print(secrets.token_urlsafe(50))" to generate one)Name of the PostgreSQL database.Example:
ocipePostgreSQL username.Example:
postgresPassword for the PostgreSQL user.Example:
supersecretpasswordHostname or IP address of the PostgreSQL server.Example:
localhost (local) or a Render/cloud hostname in productionGoogle Gemini API key used by the
recipes app to autofill recipe details with AI. Obtain yours from Google AI Studio.Example: AIzaSyABC123...ALLOWED_HOSTS and CORS_ALLOWED_ORIGINS are hardcoded in settings.py for the hosted deployment (ocipe.onrender.com and https://ocipe.vercel.app respectively). If you self-host either service at a different domain, update those values directly in settings.py.Frontend environment variables
The Vite frontend does not currently read anyVITE_ environment variables at runtime. The backend URL is set directly in src/api/axios.ts as a hardcoded value. To target a different backend, edit the baseURL in that file before building or running the dev server.
There are no frontend environment variables to configure. If you self-host the backend, update
baseURL in src/api/axios.ts directly.Sample configuration files
JWT settings
The following JWT-related values are configured directly insettings.py via SIMPLE_JWT. They are not environment variables — change them by editing the file.
| Setting | Default | Description |
|---|---|---|
ACCESS_TOKEN_LIFETIME | timedelta(minutes=5) | How long an access token is valid. Short-lived for security; the client silently refreshes using the cookie. |
REFRESH_TOKEN_LIFETIME | timedelta(days=30) | How long the refresh token cookie remains valid before the user must log in again. |
ROTATE_REFRESH_TOKENS | False | When False, the same refresh token is reused until it expires. |
users/views.py:
| Cookie attribute | Value | Why |
|---|---|---|
httponly | True | Prevents JavaScript from reading the token, mitigating XSS theft |
secure | True | Cookie is only sent over HTTPS |
samesite | "None" | Allows the cookie to be sent in cross-site requests (Vercel → Render) |
max_age | 3600 * 24 * 30 (30 days) | Matches REFRESH_TOKEN_LIFETIME |