This guide walks you from a fresh clone to a fully working Urban Store instance running on your local machine. You will start three Docker services — frontend, backend, and MongoDB — configure the required environment variables, register an admin user, add your first product, and run a test purchase end-to-end. The whole process takes under ten minutes once your prerequisites are in place.Documentation 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.
Prerequisites
Before you begin, make sure you have the following installed and available:| Requirement | Purpose | Notes |
|---|---|---|
| Docker + Docker Compose | Runs all three services | Docker Desktop ships Compose on macOS and Windows |
| Git | Clone the repository | Any recent version |
| MongoDB Atlas account | Cloud database | Free tier (M0) is sufficient for development |
| Stripe account | Payment processing | Use test mode keys for local development |
| Cloudinary account | Product image hosting | Free tier covers development workloads |
| Gmail app password | Transactional email | Create one at myaccount.google.com → Security → App passwords |
The first
docker-compose up --build downloads base images and installs all Python and Node dependencies inside the containers. Depending on your internet connection, this initial build takes 3–5 minutes. Subsequent starts (without --build) are nearly instant.Setup Steps
Clone the repository
Clone the Urban Store repository and move into the project root:The repository contains two top-level directories —
backend/ and frontend/ — plus the docker-compose.yml file that wires them together.Configure the backend environment
Create a Populate it with the following variables:
.env file in the backend/ directory. Docker Compose reads it automatically via the env_file directive in docker-compose.yml.Configure the frontend environment
Create Add the following two variables:
.env.local in the frontend/ directory:NEXT_PUBLIC_ prefixed variables are inlined into the browser bundle at build time by Next.js, so they must be set before running docker-compose up --build.Build and start all services
From the project root, build the images and start all three containers:Docker Compose starts the services in dependency order: MongoDB first, then the Django backend (which connects to MongoDB on startup), then the Next.js frontend. All three containers stream their logs to the same terminal session.
- Detached mode
- Foreground mode (default)
Run in the background and follow logs selectively:
Verify the services are running
Once the build completes, confirm both the frontend and the backend API are reachable:
If the frontend shows a network error, wait a few more seconds — Next.js compilation can take an extra 15–20 seconds on the very first cold start.
| Service | URL | Expected response |
|---|---|---|
| Frontend | http://localhost:3000 | Urban Store home page |
| Backend API | http://localhost:8000/api/ | JSON response or 404 from DRF |
| Django Admin | http://localhost:8000/admin/ | Django admin login page |
Register a user and verify your email
Open http://localhost:3000/register in your browser and fill in the registration form. Urban Store sends a 6-digit verification code to the email address you provide via Gmail SMTP.After submitting the form you will be redirected to
/verify-email. Enter the code from your inbox to activate the account.Check your spam folder if the verification email does not arrive within a minute. Gmail may flag the first email sent from a new app password.
Promote your user to admin
By default, every registered user has After updating the document, log out and log back in so that a fresh JWT is issued with
is_admin: false. To access the admin dashboard at /admin, promote your user directly in MongoDB using mongosh or the Atlas web UI:is_admin: true in its payload. The Next.js middleware reads the is_admin claim from the token to grant or deny access to /admin.Add your first product via the admin panel
With admin access, navigate to http://localhost:3000/admin and open the product management section. Fill in the product name, description, price, available sizes and colors, and upload an image (it will be stored in Cloudinary automatically). Save the product and it will immediately appear in the catalog at http://localhost:3000/catalog.
Test a Purchase
With a product in the catalog, you can run through the full checkout flow using Stripe’s test card.- Open the catalog, add a product to the cart, and proceed to checkout.
- Enter a shipping address and continue to the payment page.
- Enter the test card details and confirm the payment.
- You will be redirected to the order confirmation page and receive a confirmation email.