WhatGift is a modern, responsive web application designed for families to share wishlists and coordinate holiday and birthday gifts in secret. Built following Apple Human Interface Guidelines (HIG) with vector Hugeicons, haptic feedback, and multi-theme customization.
- Direct Invite Links with Auto-Launch:
- Share a direct invite link with family members:
http://<host>:5173/?family=MELBY-2026 - When opened, WhatGift automatically launches directly into the family portal.
- No manual family code entry required.
- Share a direct invite link with family members:
- Simplified Login (No PIN Required):
- Family members log in simply by typing their first name (e.g. "Sean", "Jia").
- Quick-tap avatar chips allow instant 1-tap login on mobile devices.
- Surprise Protection & Anti-Spoiler Guard:
- My Wishlist View: When viewing their own list, the owner cannot see whether any item has been claimed or purchased. All claim data is stripped at the backend API boundary (
claim: null). - Family Circle View: When viewing another family member's list, users can see if an item is available, claimed (Want to Buy), or purchased (Bought), including who marked it.
- My Wishlist View: When viewing their own list, the owner cannot see whether any item has been claimed or purchased. All claim data is stripped at the backend API boundary (
- Apple HIG Design & Hugeicons:
- iOS system grouped background (
#F2F2F7light,#000000true OLED dark), borderless elevated cards, and authentic iOS segmented controls. - Vector Hugeicons throughout the app; emojis strictly reserved as user profile avatars.
- iOS system grouped background (
- Themes & Haptics:
- Dynamic holiday themes (Classic Blue, Christmas Red & Green, Birthday Gold & Blue, Emerald, Purple).
- Integrated Web Haptics for native mobile tactile response (toggleable in Settings).
- Smart Auto-Fill & Cross-Origin Previews:
- Paste links from Australian and international retailers (Amazon, JB Hi-Fi, Target, Kmart, Spotlight, etc.) to automatically extract titles, approximate prices, and product imagery.
- Resilient image fallback caching ensures thumbnails load reliably across all devices.
This guide covers installing and running WhatGift on Ubuntu (20.04 LTS, 22.04 LTS, 24.04 LTS), Debian, and other Debian-based Linux distributions.
Open a terminal and update your package lists, then install Python 3, python3-venv, python3-pip, build-essential (needed for compiling Python cryptographic dependencies), and curl:
sudo apt update
sudo apt install -y python3 python3-pip python3-venv python3-dev build-essential git curl sqlite3Note
On Debian and Ubuntu, the python3-venv package is separate from python3. It must be explicitly installed to create Python virtual environments without ensurepip errors.
Ubuntu's default apt repository may contain an outdated version of Node.js. It is recommended to install Node.js LTS (v20.x) using the official NodeSource repository or NVM:
# Add NodeSource repository for Node.js 20 LTS
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
# Install Node.js and npm
sudo apt install -y nodejs
# Verify versions
node -v # Should show v20.x.x
npm -v # Should show v10.x.xcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm install 20
nvm use 20cd /path/to/WhatGift-
Navigate to the
backend/directory:cd backend -
Create a virtual environment:
python3 -m venv .venv
-
Activate the virtual environment:
source .venv/bin/activate -
Upgrade
pipand install backend requirements:pip install --upgrade pip pip install -r requirements.txt
-
(Optional) Run tests to verify the backend setup:
pytest tests
Or run pytest directly with the virtual environment interpreter:
.venv/bin/python -m pytest tests
-
In a new terminal tab (or navigate back to project root), enter the
frontend/directory:cd ../frontend -
Install npm dependencies:
npm install
cd backend
source .venv/bin/activate
uvicorn app.main:app --host 0.0.0.0 --port 8100 --reload- API Docs:
http://localhost:8100/docs - Note:
--host 0.0.0.0allows connections from other devices on your local network (e.g. testing on mobile phones) or across WSL2/VM bridges.
In a second terminal:
cd frontend
npm run dev -- --host- Web App:
http://localhost:5173 - Note: The Vite dev server will proxy all
/apirequests automatically tohttp://127.0.0.1:8100. - The
--hostflag prints both your local URL (http://localhost:5173) and Network URL (http://192.168.x.x:5173) so you can access WhatGift directly from a mobile device connected to the same Wi-Fi network.
If deploying on an Ubuntu server (e.g. VPS, home server, Raspberry Pi):
cd frontend
npm run buildThis generates the optimized, production-ready static assets in frontend/dist/.
Run the FastAPI backend as a persistent background daemon managed by systemd.
Create /etc/systemd/system/whatgift.service:
[Unit]
Description=WhatGift FastAPI Backend
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/WhatGift/backend
Environment="PATH=/var/www/WhatGift/backend/.venv/bin"
ExecStart=/var/www/WhatGift/backend/.venv/bin/uvicorn app.main:app --host 127.0.0.1 --port 8100
# Auto-restart on failure
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.targetEnsure the www-data user has read/write permissions to the database file:
sudo chown -R www-data:www-data /var/www/whatgiftEnable and start the backend service:
sudo systemctl daemon-reload
sudo systemctl enable --now whatgift
sudo systemctl status whatgiftVerify the backend is running:
curl http://127.0.0.1:8100/api/health
# Returns: {"status":"ok","app":"WhatGift API"}Choose between Apache (for side-by-side subdomain hosting alongside an existing site) or Nginx.
If you already have an Apache website serving your root domain (e.g. yourdomain.dev), you can run WhatGift alongside it as an independent VirtualHost on the subdomain whatgift.yourdomain.dev.
In your DNS provider (Cloudflare, Namecheap, Route 53, etc.), add a record for your subdomain:
- Type:
Arecord (orCNAMEpointing toyourdomain.dev) - Name:
whatgift - Value: Your server's public IP address
Ensure Apache's proxy, HTTP proxy, rewrite, headers, and SSL modules are active:
sudo a2enmod proxy proxy_http rewrite headers ssl
sudo systemctl restart apache2Create a new configuration file at /etc/apache2/sites-available/whatgift.conf:
<VirtualHost *:80>
ServerName whatgift.yourdomain.dev
ServerAdmin webmaster@yourdomain.dev
# 1. Frontend Static Files (Built Vite App)
DocumentRoot /var/www/WhatGift/frontend/dist
<Directory /var/www/WhatGift/frontend/dist>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
# Single Page Application (SPA) routing:
# Directs all non-file route requests to index.html
FallbackResource /index.html
</Directory>
# 2. Reverse Proxy for Backend API (/api/*)
ProxyPreserveHost On
ProxyPass /api/ http://127.0.0.1:8100/api/
ProxyPassReverse /api/ http://127.0.0.1:8100/api/
# 3. Interactive API Documentation (Optional)
ProxyPass /docs http://127.0.0.1:8100/docs
ProxyPassReverse /docs http://127.0.0.1:8100/docs
ProxyPass /openapi.json http://127.0.0.1:8100/openapi.json
ProxyPassReverse /openapi.json http://127.0.0.1:8100/openapi.json
# 4. Logs
ErrorLog ${APACHE_LOG_DIR}/whatgift_error.log
CustomLog ${APACHE_LOG_DIR}/whatgift_access.log combined
</VirtualHost>Note
- Your existing
<VirtualHost *:80>and<VirtualHost *:443>blocks foryourdomain.devremain completely untouched. - Apache inspects the
Host:request header (whatgift.yourdomain.devvsyourdomain.dev) to route traffic to the correct site.
# Enable the WhatGift site
sudo a2ensite whatgift.conf
# Test Apache configuration syntax
sudo apache2ctl configtest
# Should output: Syntax OK
# Reload Apache
sudo systemctl reload apache2Install Certbot with the Apache plugin to obtain and install a free SSL certificate:
sudo apt install -y certbot python3-certbot-apache
sudo certbot --apache -d whatgift.yourdomain.dev- Certbot will automatically create the secure
<VirtualHost *:443>block in/etc/apache2/sites-available/whatgift-le-ssl.confand configure automatic HTTP → HTTPS redirection. - Your existing root domain's SSL certificates remain separate and unaffected.
If using Nginx as your web server, create /etc/nginx/sites-available/whatgift:
server {
listen 80;
server_name whatgift.yourdomain.dev;
# Frontend static files
root /var/www/WhatGift/frontend/dist;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
# Backend API proxy
location /api/ {
proxy_pass http://127.0.0.1:8100;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# API documentation proxy
location /docs {
proxy_pass http://127.0.0.1:8100/docs;
}
location /openapi.json {
proxy_pass http://127.0.0.1:8100/openapi.json;
}
}Enable the site and reload Nginx:
sudo ln -s /etc/nginx/sites-available/whatgift /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginxEnsure HTTP (80) and HTTPS (443) are allowed through the firewall:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enableWhen you push code updates or bug fixes to GitHub and want to pull them onto your production server:
cd /var/www/WhatGift # (or /var/www/whatgift)
git pull origin mainWhenever you modify React files or frontend dependencies, you must rebuild the production bundle into frontend/dist:
cd frontend
npm install # Only needed if package.json dependencies were added/updated
npm run buildNote
Apache/Nginx immediately serves the updated files from frontend/dist/. You do not need to restart Apache unless you changed .conf VirtualHost settings.
Whenever you modify backend code, you must restart the systemd service so uvicorn loads the new Python code:
cd backend
source .venv/bin/activate
pip install -r requirements.txt # Only needed if requirements.txt changed
# Restart the background backend service
sudo systemctl restart whatgiftVerify backend health:
sudo systemctl status whatgift
curl http://127.0.0.1:8100/api/healthIf you want to pull and apply all updates in one shot, run this single block from the repository root:
git pull origin main && \
(cd frontend && npm install && npm run build) && \
(cd backend && .venv/bin/pip install -r requirements.txt) && \
sudo systemctl restart whatgiftOnce deployed on your domain, invite links automatically adapt to your live URL:
- Local Dev:
http://localhost:5173/?family=MELBY-2026 - Production Subdomain:
https://whatgift.yourdomain.dev/?family=MELBY-2026
Sharing Links:
- Click "Copy Invite Link" in the top navigation bar to copy the direct URL.
- Family members who tap the link on mobile or desktop are immediately logged into the family view without needing to enter the family code.