Merch store for the rSpace ecosystem
Go to file
Jeff Emmett 3a02c84b94 fix: handle non-JSON error responses in design pipeline
Frontend was crashing with "Unexpected token 'I'" when the backend
returned plain text errors (e.g. "Internal Server Error" from proxy).
Now safely falls back to response.text() when JSON parsing fails.
Also prevents backend from swallowing HTTPException in catch-all.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 17:16:31 -08:00
backend fix: handle non-JSON error responses in design pipeline 2026-02-25 17:16:31 -08:00
backlog chore: update task-6 notes and create task-11 for SMTP migration 2026-02-25 00:26:41 -08:00
config Initial commit: rSwag - merch store for the rSpace ecosystem 2026-02-18 03:24:22 -07:00
designs feat: standardize AppSwitcher and EcosystemFooter across all rApps 2026-02-24 22:48:11 -08:00
frontend fix: handle non-JSON error responses in design pipeline 2026-02-25 17:16:31 -08:00
landing feat: replace Next.js app with static landing page, add demo CTA 2026-02-25 16:15:48 -08:00
rswag@90b48e9eb9 feat: standardize header, categories, cross-app spaces 2026-02-25 14:21:30 -08:00
spaces feat: dark mode, community revenue messaging, design catalog update 2026-02-24 21:38:56 -08:00
.env.example feat: update Printful client to v2 mockup-tasks API format 2026-02-24 16:57:04 -08:00
.gitignore Initial commit: rSwag - merch store for the rSpace ecosystem 2026-02-18 03:24:22 -07:00
README.md feat: replace Stripe with Mollie payments + TBFF revenue split to bonding curve 2026-02-18 13:16:39 -07:00
docker-compose.dev.yml feat: add Prodigi POD client + server-side product mockup previews 2026-02-18 13:29:47 -07:00
docker-compose.prod.yml feat: add multi-tenant spaces with Fungi Flows storefront 2026-02-18 12:20:19 -07:00
docker-compose.yml feat: replace Next.js app with static landing page, add demo CTA 2026-02-25 16:15:48 -08:00

README.md

rSwag

Merchandise store for the rSpace ecosystem at rswag.online

Stack

  • Frontend: Next.js 15 + shadcn/ui + Tailwind CSS + Geist font
  • Backend: FastAPI + SQLAlchemy + Alembic
  • Database: PostgreSQL
  • Payments: Mollie (EU data residency)
  • Fulfillment: Printful (apparel) + Prodigi (stickers/prints)
  • AI Design: Gemini API for on-demand design generation

Architecture

rswag.online
        │
        ▼
  Cloudflare Tunnel → Traefik
        │                │
        ▼                ▼
   Next.js (3000)   FastAPI (8000)
                         │
         ┌───────────────┼───────────────┐
         ▼               ▼               ▼
    PostgreSQL       Mollie          POD APIs

Development

Quick Start

cp .env.example .env
# Edit .env with your API keys

docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d

# Backend: http://localhost:8000
# Frontend: 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

rswag/
├── 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
├── designs/              # Design assets (in-repo)
│   ├── stickers/
│   ├── shirts/
│   └── misc/
└── config/               # POD provider config

Deployment

Deployed on Netcup RS 8000 via Docker Compose with Traefik reverse proxy.

ssh netcup "cd /opt/apps/rswag && git pull && docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build"