Skip to content

Latest commit

 

History

History
177 lines (141 loc) · 4.9 KB

File metadata and controls

177 lines (141 loc) · 4.9 KB

✅ Deployment Files Created - Next Steps

All deployment files have been created in ~/language-learning-app/

What Was Created

Deployment Files

  • Procfile - Tells Railway how to run the app (using gunicorn)
  • requirements.txt - Python dependencies for Railway
  • runtime.txt - Specifies Python 3.11.6
  • railway.json - Optional Railway-specific configuration
  • .gitignore - Excludes sensitive files from git
  • .env.example - Shows required environment variables

Updated Files

  • app.py - Updated to use Railway's PORT environment variable
  • README.md - Added deployment quick start section

Documentation

  • DEPLOYMENT.md - Complete step-by-step Railway deployment guide

File Structure

~/language-learning-app/
├── app.py                      ✅ Main Flask app (production ready)
├── requirements.txt            ✅ Dependencies
├── Procfile                    ✅ Railway start command
├── runtime.txt                 ✅ Python version
├── railway.json                ✅ Railway config
├── .gitignore                  ✅ Git exclusions
├── .env.example                ✅ Environment variable template
├── templates/
│   └── index.html             ✅ V2 frontend
├── static/
│   ├── css/style.css          ✅ Styles
│   └── js/app.js              ✅ V2 JavaScript
├── docs/
│   ├── LANGUAGE_LEARNING_RESEARCH.md
│   └── FEATURE_DESIGN.md
├── README.md                   ✅ Main documentation
├── DEPLOYMENT.md              ✅ Deployment guide
└── NEXT_STEPS.md              📄 This file

Your Next Steps

1. Initialize Git Repository (5 minutes)

cd ~/language-learning-app

# Initialize git
git init

# Add all files
git add .

# Make first commit
git commit -m "Initial commit: Language Learning App v2"

2. Create GitHub Repository (2 minutes)

Option A - Using GitHub CLI (easiest):

# Install if needed: brew install gh
gh auth login
gh repo create language-learning-app --public --source=. --push

Option B - Using GitHub website:

  1. Go to https://github.com/new
  2. Name: language-learning-app
  3. Make it Public
  4. Don't initialize with README
  5. Create repository

Then:

git remote add origin https://github.com/YOUR_USERNAME/language-learning-app.git
git branch -M main
git push -u origin main

3. Deploy to Railway (5 minutes)

  1. Go to https://railway.app
  2. Click "Start a New Project"
  3. Select "Deploy from GitHub repo"
  4. Choose language-learning-app
  5. Go to "Variables" tab
  6. Add:
    • ANTHROPIC_API_KEY = your Anthropic API key
    • CARTESIA_API_KEY = your Cartesia API key
  7. Go to "Settings" → "Networking" → "Generate Domain"
  8. Visit your app at the generated URL!

4. Test Your Deployment

Once deployed, test:

  • App loads
  • Language selector works (Telugu, Tamil, Kannada)
  • Mode selector works (Guided, Conversational)
  • Can start a conversation
  • Audio plays (TTS)
  • Microphone works (STT)
  • Complexity level adjusts

Important Notes

API Keys

Data Persistence

  • telugu_srs.json (vocabulary data) is NOT persisted on Railway
  • It's stored in ephemeral filesystem
  • Resets on every redeploy
  • For production persistence, consider Railway's PostgreSQL addon

Continuous Deployment

Once connected to GitHub, Railway auto-deploys on every push to main:

git add .
git commit -m "Add feature"
git push origin main
# Railway automatically deploys!

Resources

Quick Command Reference

# Create and push to GitHub
cd ~/language-learning-app
git init
git add .
git commit -m "Initial commit"
gh repo create language-learning-app --public --source=. --push

# After making changes
git add .
git commit -m "Description of changes"
git push origin main

# Run locally for development
export ANTHROPIC_API_KEY="your-key"
export CARTESIA_API_KEY="your-key"
export FLASK_ENV="development"
python app.py
# Visit http://localhost:5000

Support

If you run into issues:

  1. Check DEPLOYMENT.md troubleshooting section
  2. Check Railway deployment logs
  3. Verify environment variables are set
  4. Check that API keys are valid and have quota

You're ready to deploy! 🚀

Follow the 3 steps above and your language learning app will be live on the internet in about 15 minutes!