Urban Store uses twoDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ALEJ4NDRO2025/urban-store/llms.txt
Use this file to discover all available pages before exploring further.
.env files — one for the Django backend and one for the Next.js frontend — to keep all secrets and service credentials out of source code. Neither file should ever be committed to version control; both are already listed in .gitignore. The sections below document every required variable, what it does, and where to obtain it.
Backend Variables
Create a file atbackend/.env and populate it with the following variables:
| Variable | Required | Description |
|---|---|---|
SECRET_KEY | Yes | Django cryptographic secret key used to sign JWTs and sessions |
MONGODB_URI | Yes | MongoDB Atlas connection URI, e.g. mongodb+srv://user:pass@cluster.mongodb.net/urbanstore |
CLOUDINARY_CLOUD_NAME | Yes | Cloudinary cloud name, found on your Cloudinary dashboard |
CLOUDINARY_API_KEY | Yes | Cloudinary API key |
CLOUDINARY_API_SECRET | Yes | Cloudinary API secret |
EMAIL_HOST_USER | Yes | Gmail address used to send transactional emails |
EMAIL_HOST_PASSWORD | Yes | Gmail App Password (16 characters — not your regular Gmail password) |
STRIPE_SECRET_KEY | Yes | Stripe secret key — use sk_test_... during development |
STRIPE_PUBLISHABLE_KEY | Yes | Stripe publishable key — use pk_test_... during development |
backend/.env:
Frontend Variables
Create a file atfrontend/.env.local and populate it with the following variables:
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_API_URL | Yes | Backend API base URL — use http://localhost:8000 in development |
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY | Yes | Stripe publishable key for the Stripe.js frontend SDK |
frontend/.env.local:
How to Obtain Each Credential
Django SECRET_KEY
Generate a cryptographically strong key using Django’s own utility. Run the following command once and paste the output into your
.env:MongoDB URI
- Log in to MongoDB Atlas.
- Open your cluster and click Connect.
- Choose Drivers and select Python.
- Copy the connection string and replace
<password>with your database user’s password. - The database name at the end of the URI should be
urbanstore.
Cloudinary Credentials
- Log in to cloudinary.com.
- Your Dashboard shows
Cloud Name,API Key, andAPI Secretat a glance. - Copy all three values into
backend/.env.
Gmail App Password
- Go to your Google Account → Security.
- Enable 2-Step Verification if it is not already active.
- Under 2-Step Verification, open App Passwords.
- Create a new App Password for Mail / Other (custom name) and name it
Urban Store. - Google will display a 16-character password — copy it immediately (it won’t be shown again).
- Set
EMAIL_HOST_USERto your Gmail address andEMAIL_HOST_PASSWORDto this 16-character password.
Stripe API Keys
- Log in to dashboard.stripe.com.
- Navigate to Developers → API keys.
- Copy the Secret key (
sk_test_...) →STRIPE_SECRET_KEY. - Copy the Publishable key (
pk_test_...) →STRIPE_PUBLISHABLE_KEYandNEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY.
During development,
STRIPE_SECRET_KEY and STRIPE_PUBLISHABLE_KEY must be your test keys — the ones that start with sk_test_ and pk_test_ respectively. Test mode lets you process payments with Stripe’s test card number (4242 4242 4242 4242) without real charges. Switch to live keys (sk_live_ / pk_live_) only when deploying to production.