Makayla C — Render Deploy Guide

Project: CLP Curator
Repo: final-project-makaylacarnahan
Goal: Put Victor Paladin's CLP recommendation app online for Demo Day.

This guide is tailored to your current repo. Your app has app.py, clps.py, ai.py, data/clp_events.csv, templates, static files, pyproject.toml, and uv.lock. The deploy needs gunicorn, one OpenAI environment variable, and a render.yaml file.

Before You Start

Make sure the app works locally:

uv sync
uv run flask --app app run --debug

Open the preview, enter a sentence like I like music and social justice, and confirm the results page shows Victor's message and event cards.

Step 1 — Add the Production Server

Render should run your Flask app with gunicorn.

uv add gunicorn

This updates pyproject.toml and uv.lock.

Step 2 — Add .env.example

Your app reads the OpenAI key in ai.py:

OPENAI_API_KEY

Create .env.example at the project root:

OPENAI_API_KEY=

Keep your real .env file private. Do not commit the actual key.

Step 3 — Create render.yaml

Create a new file at the project root named render.yaml:

services:
  - type: web
    name: clp-curator
    env: python
    plan: free
    buildCommand: uv sync --frozen && uv cache prune --ci
    startCommand: uv run gunicorn app:app
    autoDeploy: true
    envVars:
      - key: OPENAI_API_KEY
        sync: false

Your data/clp_events.csv file is committed in the repo, so Render will have the same CLP data your local app uses.

Step 4 — Commit and Push

In Source Control, stage and commit:

  • pyproject.toml
  • uv.lock
  • .env.example
  • render.yaml

Use a message like:

add render deploy config

Then click Sync Changes.

Step 5 — Create the Render Service

  1. Go to render.com and sign in with GitHub.
  2. Click New +Web Service.
  3. Connect final-project-makaylacarnahan.
  4. Confirm these settings:
    • Environment: Python
    • Build Command: uv sync --frozen && uv cache prune --ci
    • Start Command: uv run gunicorn app:app
    • Plan: Free
  5. In Environment Variables, add your real OPENAI_API_KEY.
  6. Click Create Web Service.

Step 6 — Test the Live Site

When Render finishes, open the live URL and test the core flow:

  1. Enter an interest sentence.
  2. Wait for the loading page to redirect.
  3. Confirm Victor gives a short message.
  4. Confirm 1–3 CLP event cards appear with dates, topics, and commentary.

If the page errors after submit, check that OPENAI_API_KEY is set in Render and that data/clp_events.csv is committed.

Demo Day Notes

CLP Curator reads from a committed CSV and does not save user data. Render's free tier may sleep after idle time, so open the live URL 1–2 minutes before presenting.