Step-by-step instructions to deploy this Language Learning App to Railway.
- GitHub account
- Railway account (sign up at https://railway.app)
- Git installed locally
- API keys for:
- Anthropic Claude (https://console.anthropic.com/)
- Cartesia (https://cartesia.ai/)
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"# Install GitHub CLI if needed: brew install gh
# Login to GitHub
gh auth login
# Create repository and push
gh repo create language-learning-app --public --source=. --push- Go to https://github.com/new
- Repository name:
language-learning-app - Make it Public (or Private if you prefer)
- Do NOT initialize with README (you already have one)
- Click "Create repository"
Then push your code:
git remote add origin https://github.com/YOUR_USERNAME/language-learning-app.git
git branch -M main
git push -u origin main- Go to https://railway.app
- Click "Start a New Project"
- Select "Deploy from GitHub repo"
- Authorize Railway to access your GitHub
- Select the
language-learning-apprepository
Railway will start building immediately, but it will fail without API keys.
- In your Railway project dashboard, click on your service
- Go to the "Variables" tab
- Add these environment variables:
ANTHROPIC_API_KEY=your-actual-anthropic-key
CARTESIA_API_KEY=your-actual-cartesia-key
Click "Add" for each one.
After adding environment variables:
- Go to the "Deployments" tab
- Click "Redeploy" on the latest deployment OR Just push a new commit to GitHub (Railway auto-deploys)
- In Railway dashboard, click "Settings"
- Scroll to "Networking"
- Click "Generate Domain"
- Railway will give you a URL like:
https://your-app-name.up.railway.app - Open that URL in your browser!
Test that everything works:
- App loads in browser
- Language selector appears (Telugu, Tamil, Kannada)
- Mode selector appears (Guided, Conversational)
- Can start a scenario
- Audio plays (TTS)
- Microphone works (STT)
- Complexity badge updates
Once set up, Railway automatically deploys on every push to main:
# Make changes to your code
git add .
git commit -m "Add new feature"
git push origin main
# Railway automatically detects the push and deploys!To run locally while developing:
# Set environment variables
export ANTHROPIC_API_KEY="your-key"
export CARTESIA_API_KEY="your-key"
export FLASK_ENV="development" # Enables debug mode
# Run the app
python app.py
# Open browser to http://localhost:5000- Check Railway build logs for errors
- Verify
requirements.txthas all dependencies - Make sure
Procfileexists and is correct
- Check Railway deployment logs
- Verify environment variables are set (ANTHROPIC_API_KEY, CARTESIA_API_KEY)
- Check that port binding is correct (should use PORT from environment)
- App might be crashing - check logs
- Verify gunicorn is installed (should be in requirements.txt)
- Check that app.py runs without errors
- Verify API keys are correct
- Check that you have credits/quota on Anthropic and Cartesia
- Look at Railway logs for specific error messages
- Railway has ephemeral filesystem - vocabulary data resets on redeploy
- For production, consider using Railway's PostgreSQL or persistent volume
- Current setup is fine for demo/personal use
- Railway: Free tier includes 500 hours/month (enough for hobby projects)
- Anthropic: Pay per API call (~$0.003 per conversation turn)
- Cartesia: Check their pricing for TTS/STT usage
- Never commit API keys to git (they're in .gitignore)
- Only set API keys in Railway environment variables
- Consider making GitHub repo private if you want to keep code private
- Railway automatically uses HTTPS
- Railway docs: https://docs.railway.app
- Railway Discord: https://discord.gg/railway
- This app's issues: https://github.com/YOUR_USERNAME/language-learning-app/issues
# Initial setup
git init
git add .
git commit -m "Initial commit"
gh repo create language-learning-app --public --source=. --push
# Make changes and deploy
git add .
git commit -m "Your change description"
git push origin main
# Run locally
export ANTHROPIC_API_KEY="your-key"
export CARTESIA_API_KEY="your-key"
python app.pyThat's it! Your research-backed language learning app is now live on the internet! 🚀