Full-stack e-commerce platform for mycopunk merchandise: Backend (FastAPI): - Design service reading from mycopunk-swag repo - Cart, checkout, and order management - Stripe payment integration - POD webhook handlers (Prodigi, Printful) - Admin API with JWT auth - PostgreSQL with Alembic migrations Frontend (Next.js 15): - Product catalog with SSR - Shopping cart with localStorage persistence - Stripe checkout redirect flow - Tailwind CSS + shadcn/ui theming Infrastructure: - Docker Compose with PostgreSQL, Redis - Traefik labels for swag.mycofi.earth - Multi-stage Dockerfiles Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| backend | ||
| frontend | ||
| .env.example | ||
| .gitignore | ||
| CLAUDE.md | ||
| README.md | ||
| docker-compose.yml | ||
README.md
Mycopunk Swag Store
E-commerce platform for mycopunk merchandise at swag.mycofi.earth
Stack
- Frontend: Next.js 15 + shadcn/ui + Tailwind CSS
- Backend: FastAPI + SQLAlchemy + Alembic
- Database: PostgreSQL
- Payments: Stripe Checkout
- Fulfillment: Printful (apparel) + Prodigi (stickers/prints)
Architecture
swag.mycofi.earth
│
▼
Cloudflare Tunnel → Traefik
│ │
▼ ▼
Next.js (3000) FastAPI (8000)
│
┌───────────────┼───────────────┐
▼ ▼ ▼
PostgreSQL Stripe POD APIs
Development
Prerequisites
- Docker & Docker Compose
- Python 3.12+
- Node.js 20+
- pnpm
Quick Start
# Clone and setup
cd /home/jeffe/Github/mycopunk-swag-store
cp .env.example .env
# Edit .env with your API keys
# Start services
docker compose up -d
# Backend available at http://localhost:8000
# Frontend available at http://localhost:3000
Local Development (without Docker)
# Backend
cd backend
pip install -e .
uvicorn app.main:app --reload
# Frontend
cd frontend
pnpm install
pnpm dev
Project Structure
mycopunk-swag-store/
├── backend/ # FastAPI Python backend
│ ├── app/
│ │ ├── api/ # Route handlers
│ │ ├── models/ # SQLAlchemy ORM
│ │ ├── schemas/ # Pydantic models
│ │ ├── services/ # Business logic
│ │ └── pod/ # POD provider clients
│ └── alembic/ # Database migrations
│
└── frontend/ # Next.js 15 frontend
├── app/ # App Router pages
├── components/ # React components
└── lib/ # Utilities
Environment Variables
See .env.example for required configuration.
Deployment
Deployed on Netcup RS 8000 via Docker Compose with Traefik reverse proxy.
# On server
cd /opt/mycopunk-swag-store
git pull
docker compose up -d --build