Put your Prompt Vault on the internet so anyone can use it — or don't. Both are valid choices.
Day 38 of 80
A tool that runs on your laptop and saves you an hour a week is a real, valuable tool. You do not need to deploy it for it to matter.
Deployment makes sense when:
If none of those apply yet — skip today, move to Day 39, and come back to deployment when the motivation is there. Forced deployment with an unprepared app causes more frustration than learning.
Run through this checklist before you open any deployment platform. A missing item now will cause a confusing failure later.
| Item | What to check | Why it matters |
|---|---|---|
requirements.txt |
Run pip freeze > requirements.txt and verify it includes flask, anthropic, python-dotenv |
The server installs packages from this file — missing entries mean import errors |
.gitignore |
Contains .env and (optionally) prompts.json |
Your API key must never be in a public repo |
debug=False |
In app.run(), ensure debug is off or set via environment variable |
Debug mode in production exposes your code to anyone who triggers an error |
| Stable file paths | prompts.json path is relative or uses Path(__file__).parent |
Absolute paths from your laptop won't exist on the server |
PythonAnywhere is the gentlest introduction to deployment. Free tier is sufficient. No credit card required.
# Step 1: Create a free account at pythonanywhere.com
# Step 2: Upload your project files
# In the PythonAnywhere dashboard: Files tab → Upload
# Upload vault.py, helpers.py, templates/, static/, requirements.txt
# Step 3: Open a Bash console (Consoles tab → Bash)
pip3.10 install --user -r requirements.txt
# Step 4: Set up a Web App
# Web tab → Add a new web app → Manual configuration → Python 3.10
# Set Source code: /home/yourusername/prompt-vault
# Set Working directory: /home/yourusername/prompt-vault
# Step 5: Edit the WSGI config file (link in Web tab)
# Replace the file contents with:
import sys
import os
sys.path.insert(0, '/home/yourusername/prompt-vault')
os.environ['ANTHROPIC_API_KEY'] = 'sk-ant-...' # See warning below!
from vault import app as application
# Step 6: Reload the web app — click the green Reload button in the Web tab
WSGI (Web Server Gateway Interface) is how the PythonAnywhere server talks to your Flask app. The WSGI file is the handshake between the server and your code.
Limitation of the free tier: Apps go to sleep after inactivity and wake slowly. This is fine for personal tools and demos — not for production traffic.
Render is closer to how professional deployment works: code lives in GitHub, deploy happens automatically on every push. More setup upfront, but the workflow is cleaner.
# Step 1: Push your project to a GitHub repo
git init
git add vault.py helpers.py templates/ static/ requirements.txt
git commit -m "Initial commit — Prompt Vault"
git remote add origin https://github.com/yourusername/prompt-vault.git
git push -u origin main
# Step 2: Add a start command in a Procfile (create this file)
# Procfile (no extension):
web: gunicorn vault:app
# Step 3: Add gunicorn to requirements.txt
flask
anthropic
python-dotenv
gunicorn
# Step 4: On render.com
# New → Web Service → Connect your GitHub repo
# Build Command: pip install -r requirements.txt
# Start Command: gunicorn vault:app
# Step 5: Add environment variable
# Environment tab → Add Environment Variable
# Key: ANTHROPIC_API_KEY Value: sk-ant-...
# Step 6: Deploy — Render builds and deploys automatically
Gunicorn is a production-grade WSGI server. Flask's built-in server (app.run()) is fine for development but not designed for real traffic. Gunicorn handles concurrent requests properly.
Auto-deploy on push means that after setup, deploying a change is just a git push. This is the standard workflow at most software companies.
The free tier on Render also has sleep behavior. Paid plans ($7/mo) keep the app always-on.
Your Anthropic API key must never appear in a public GitHub repository. Anyone who finds it can run API calls billed to your account.
Protect it two ways:
.env to your .gitignore file before the first commit. Once a secret is in git history, it's very hard to fully remove.In your Flask app, read the key like this:
client = anthropic.Anthropic(api_key=os.environ.get("ANTHROPIC_API_KEY"))
Never: api_key="sk-ant-abc123..." directly in source code.
Most professional internal tools start as local tools. If it's saving you time and working reliably, the value is already there. Deploy when you have a reason — not because you feel like you "should."
requirements.txt is accurate and includes all dependencies.env is listed in .gitignore and not tracked by gitdebug=False (or controlled via environment variable) in productionprompts.json path uses a relative reference or Path(__file__).parentDay 39 is about stretch goals — optional features you can add to the Prompt Vault now that the core is solid. Prompt tags, favorites, bulk export, an edit flow. Pick one and build it.