Miranda M — Render Deploy Guide
Project: PlainText Pal
Repo: final-project-MirandaMireles
Goal: Put your Flask + Anthropic app online for Demo Day.
This guide is tailored to your current repo. Your app already has app.py, pyproject.toml, uv.lock, templates, static files, and .env.example. The main deploy work is adding the production server, fixing the secret name, and creating render.yaml.
Before You Start
Make sure the app still runs locally:
uv sync
uv run flask --app app run --debug
Open the preview, paste text into PlainText Pal, choose an audience, and confirm the results page loads.
Step 1 — Add the Production Server
Render should run your Flask app with gunicorn, not Flask's local debug server.
uv add gunicorn
This updates pyproject.toml and uv.lock. Commit both files later.
Step 2 — Fix Your Example Secret File
Your code reads this exact environment variable:
ANTHROPIC_API_KEY
Open .env.example and make sure it says:
ANTHROPIC_API_KEY=
Keep your real .env file private. Do not commit your actual Anthropic key.
Step 3 — Create render.yaml
Create a new file at the project root named render.yaml:
services:
- type: web
name: plaintext-pal
env: python
plan: free
buildCommand: uv sync --frozen && uv cache prune --ci
startCommand: uv run gunicorn app:app
autoDeploy: true
envVars:
- key: ANTHROPIC_API_KEY
sync: false
The first app in app:app is your file name (app.py). The second app is the Flask variable inside that file.
Step 4 — Commit and Push
In Source Control, stage and commit:
pyproject.tomluv.lock.env.examplerender.yaml
Use a message like:
add render deploy config
Then click Sync Changes.
Step 5 — Create the Render Service
- Go to render.com and sign in with GitHub.
- Click New + → Web Service.
- Connect
final-project-MirandaMireles. - Confirm these settings:
- Environment:
Python - Build Command:
uv sync --frozen && uv cache prune --ci - Start Command:
uv run gunicorn app:app - Plan:
Free
- Environment:
- In Environment Variables, add your real
ANTHROPIC_API_KEY. - Click Create Web Service.
Step 6 — Test the Live Site
When Render finishes, open the live URL and test the core flow:
- Paste a paragraph into the text box.
- Choose a target audience.
- Submit the form.
- Confirm the readability stats, suggestions, and rewrite appear.
If the suggestions say ANTHROPIC_API_KEY is not set, the app deployed but the Render environment variable is missing or misspelled.
Demo Day Notes
PlainText Pal does not rely on a database, so you do not need to worry about saved rows disappearing. The important demo prep is making sure the Anthropic key is set in Render and testing with one short sample paragraph before you present.