A university project built during the WS24/25 semester at Reutlingen University as part of my MKI-Projekt Module.
The application is an immersive, fully interactive 3D online ecomerce shop where users can explore, select, and purchase T-shirts inside a three-dimensional virtual store - directly in the browser, no plugins required.
Team: Steffen Alber · Martin Hustoles · Kathrin Krell · Nick Maier · Simon Jell
Professor: Uwe Kloos
Make sure you have the following installed before continuing:
The backend requires a .env file at backend/shopcore/.env. This file is already filled in for local development. The variables and what they do:
| Variable | Description |
|---|---|
SECRET_KEY |
Django secret key — keep this private |
POSTGRES_DB |
Name of the PostgreSQL database |
POSTGRES_USER |
PostgreSQL username |
POSTGRES_PASSWORD |
PostgreSQL password |
STRIPE_SECRET_KEY |
Stripe secret key (from Stripe Dashboard → Developers → API Keys) |
STRIPE_PUBLISHABLE_KEY |
Stripe publishable key (same location) |
STRIPE_WEBHOOK_SECRET_KEY |
Webhook signing secret (see Stripe setup below) |
STRIPE_SITE_URL |
The frontend URL Stripe redirects back to after checkout |
EMAIL_HOST |
SMTP server host (e.g. smtp.gmail.com) |
EMAIL_PORT |
SMTP port (587 for TLS) |
EMAIL_USE_TLS |
Enable TLS for email — should be True |
EMAIL_HOST_USER |
Gmail address used for sending order confirmation emails |
EMAIL_HOST_PASSWORD |
Gmail App Password (not your regular Gmail password) |
DEFAULT_FROM_EMAIL |
The "from" address shown in outgoing emails |
MEDIA_URL |
URL prefix for uploaded media files — set to /media/ |
The frontend has its own .env at frontend/shop-app/.env with a single variable:
VITE_API_URL='http://localhost:8000'
This points the frontend at the local Django server. Change it to the production URL when deploying.
The app uses Stripe in test mode for payments. To get it working:
.env.stripe listen --forward-to localhost:8000/api/v1/payments/webhook/ in a terminalSTRIPE_WEBHOOK_SECRET_KEY in your .envprice_... ID — you'll need it when creating products in the admin board.For test payments use card number 4242 4242 4242 4242 with any future expiry date and any CVC.
From the root folder, run:
./start.sh
This script will:
3d-shop Docker networkOnce it finishes, the project is available at:
| Service | URL |
|---|---|
| Frontend | http://localhost:3000 |
| Backend API | http://localhost:8000 |
| Django Admin | http://localhost:8000/admin |
To stop everything:
./stop.sh
On the very first run (or after model changes), apply database migrations:
./migrate.sh
This runs makemigrations and migrate inside the running Django container. It will also offer to create a superuser at the end — you can skip that and use the dedicated script instead.
A superuser is required to access the admin board and create products. Run:
./superuser.sh
Choose option 1 to create a new superuser. You will be prompted for:
Choose option 2 to delete an existing superuser — it will list all current superusers before asking which to remove.
44.99)price_... ID from your Stripe Dashboard product (see Stripe Setup above).glb file exported from Blender. The model is loaded dynamically from the database at runtime and displayed in the 3D shop scene.The assets/ folder at the root contains all project resources outside the application code:
assets/
├── trailer.mp4 # Project trailer video
├── documentation/
│ ├── backend.pdf # Technical documentation: Django backend architecture,
│ │ # API endpoints, data models, and production setup
│ ├── frontend.pdf # Technical documentation: SvelteKit + Three.js frontend,
│ │ # component structure, and environment config
│ └── virtual-try-on feature.pdf # Research and implementation notes for the AR
│ # virtual try-on feature (PoseNet + canvas overlay)
├── shirts/
│ ├── shirt1.jpg – shirt4.jpg # Reference product images used during development
│ └── tshirt-transformed.glb # Original Blender-exported T-shirt model (for reference;
│ # not loaded at runtime — models are served from the DB)
└── room_250130/
├── room_stand250121.blend # Blender source file for the 3D shop environment
└── Materials/ # Blender material textures for the shop model
The Technische Dokumentation/ folder (mounted separately) contains the full set of technical documentation PDFs covering concept development, backend, frontend, and the virtual try-on feature research.
tshirt-shop/
├── backend/shopcore/ # Django backend
│ ├── shopcore/ # Project settings and URL config
│ ├── users/ # Custom user model and auth endpoints
│ ├── products/ # Product model, CRUD endpoints
│ ├── orders/ # Order model and management endpoints
│ ├── payment/ # Stripe checkout session and webhook handler
│ ├── email_service/ # Order confirmation email logic (Gmail SMTP)
│ ├── Dockerfile
│ ├── docker-compose.yml
│ ├── requirements.txt
│ └── .env
└── frontend/shop-app/ # SvelteKit frontend
├── src/
│ ├── routes/ # SvelteKit pages: shop, checkout, login, register,
│ │ # profile, admin board (products, orders, users)
│ ├── lib/components/
│ │ ├── 3D/ # Threlte/Three.js scene components:
│ │ │ ├── shopModel.svelte # The 3D shop environment
│ │ │ ├── tshirt.svelte # Individual product (loads .glb from DB)
│ │ │ ├── pictureBillboard.svelte # Static image billboards in the scene
│ │ │ └── interactiveBillboard.svelte # Animated/clickable billboard
│ │ ├── popUps/ # Cart, checkout, product detail overlays
│ │ ├── cameraControls/ # Camera movement and position management
│ │ └── messages/ # Toast / notification components
│ ├── api/ # API client functions (auth, products, orders,
│ │ # checkout, email)
│ └── stores/ # Svelte stores for shared state (cart, product
│ # selection, camera)
├── static/ # Static assets served directly:
│ ├── shopModel-transformed.glb # The 3D shop scene model
│ ├── Billboards/ # Billboard images displayed in the 3D scene
│ ├── sounds/ # Ambient music and interaction sound effects
│ └── favicon.png
├── Dockerfile
├── docker-compose.yml
└── .env
The backend is a Django REST API backed by PostgreSQL. It handles user authentication (session-based, with a custom user model), product and order management, Stripe payment sessions and webhooks, and order confirmation emails via Gmail SMTP. Everything runs in Docker.
The frontend is a SvelteKit application that renders the shop entirely in 3D using Threlte (a Svelte wrapper around Three.js). Product .glb models are stored in the database as binary data and loaded dynamically into the scene at runtime. The checkout flow is handled through Stripe's hosted checkout page, with the order status updated automatically via Stripe webhooks.