This repository contains a small game that lets you imaginatively "fuse" James Divin with anything you can think of.
The game is split into two parts:
- Frontend – a tiny single-page web-app that lives on Netlify.
- Backend – a Python FastAPI micro-service that talks to the OpenAI API.
The frontend is completely static and therefore a perfect fit for Netlify. All files are inside the frontend/
folder.
frontend/
├── index.html
├── script.js
└── style.css
cd frontend
npx serve .
The page will prompt you for the backend URL (see next section).
- Push this repo to a Git provider (GitHub, GitLab, Bitbucket).
- In Netlify, Create a new site from Git and pick the repo.
- In the build settings set:
- Build command: (leave empty – static site)
- Publish directory:
frontend
- Click Deploy site.
Netlify will assign a public URL (e.g. https://james-fusion.netlify.app
).
Because Netlify Functions don't support Python at runtime, the backend runs on any service that can host a Python web-server (Render, Railway, Fly.io, etc.).
backend/
├── main.py # FastAPI application
├── requirements.txt # Python deps
└── .env.example # Environment variables template
Copy backend/env.template
→ .env
and fill in:
OPENAI_API_KEY=sk-************************
JAMES_BIO="<Paste James' bio here>"
cd backend
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8000
- Render.com – Blueprint deploy: connect repo, pick
./backend
as root, start commanduvicorn main:app --host 0.0.0.0 --port 10000
, and add env vars. - Railway.app – create a new Python service from Git.
- Fly.io –
fly launch
insidebackend/
.
Make note of the public HTTPS URL – you will enter it on the frontend.
When the frontend loads it asks for the backend endpoint (https://your-backend-host.xyz
). It then sends a POST /combine
request whenever the player presses Enter.
The backend calls ChatGPT 4o to get:
text_description
– 2-3 fun sentences describing the fusion.image_description
– a short prompt for DALL·E.image_url
– a freshly generated DALL·E image URL.
All three are returned to the frontend, which updates the page.
Happy fusing! 🚀