mycopunk-swag-store/README.md

2.3 KiB

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