✨ New Features: - AI-powered habit creation with natural language processing - HuggingFace transformers integration for sentiment analysis (tracked via Git LFS) - Advanced predictive analytics and behavioral insights - Voice & image input capabilities for hands-free habit tracking - Real-time notifications and community features - Plugin system with extensible architecture 🔧 Technical Improvements: - Comprehensive FastAPI backend with 30+ endpoints - React frontend with PWA capabilities - Advanced authentication with 2FA support - RBAC authorization system - Comprehensive security features (CSRF, rate limiting, audit logging) - Database migrations and health monitoring - Docker containerization support - Git LFS configured for large AI model files (2+ GB) 📚 Documentation & DevOps: - Complete deployment guides for multiple platforms - Professional README with feature highlights - GitHub Actions CI/CD workflows - Comprehensive API documentation - Security audit roadmap and compliance framework - Setup scripts for development environment 🧪 Testing & Quality: - Comprehensive test suite with 20+ test modules - Setup verification scripts - Working development environment with both backend and frontend - Health checks and monitoring systems 🌟 Ready for: - Portfolio showcasing - Community contributions - Production deployment - Professional presentation
419 lines
9.9 KiB
Markdown
419 lines
9.9 KiB
Markdown
# 🎓 **FREE & CHEAP HOSTING GUIDE FOR COLLEGE STUDENTS**
|
|
|
|
## 🌟 **Overview**
|
|
|
|
As a college student, you can host LifeRPG for **FREE or under $5/month** using various platforms and student discounts. Here's your complete guide to getting LifeRPG online without breaking the bank!
|
|
|
|
---
|
|
|
|
## 🎯 **Best Free Hosting Options (Recommended)**
|
|
|
|
### **1. Vercel (Frontend) + Railway (Backend) - 100% FREE**
|
|
|
|
#### **✅ Why This Combo:**
|
|
|
|
- **Cost**: $0/month forever
|
|
- **Performance**: Production-grade performance
|
|
- **Ease**: Simple deployments with Git integration
|
|
- **Scalability**: Handles thousands of users
|
|
- **Student-Friendly**: No credit card required
|
|
|
|
#### **Vercel Setup (Frontend):**
|
|
|
|
```bash
|
|
# 1. Install Vercel CLI
|
|
npm i -g vercel
|
|
|
|
# 2. Build your frontend
|
|
cd modern/frontend
|
|
npm run build
|
|
|
|
# 3. Deploy
|
|
vercel --prod
|
|
```
|
|
|
|
**Features:**
|
|
|
|
- ✅ Automatic HTTPS
|
|
- ✅ Global CDN
|
|
- ✅ Git integration
|
|
- ✅ Custom domains
|
|
- ✅ 100GB bandwidth/month
|
|
|
|
#### **Railway Setup (Backend + Database):**
|
|
|
|
```bash
|
|
# 1. Create railway.json in modern/backend/
|
|
{
|
|
"build": {
|
|
"builder": "NIXPACKS"
|
|
},
|
|
"deploy": {
|
|
"startCommand": "uvicorn app:app --host 0.0.0.0 --port $PORT",
|
|
"healthcheckPath": "/health"
|
|
}
|
|
}
|
|
|
|
# 2. Connect to Railway via GitHub
|
|
# 3. Set environment variables in Railway dashboard
|
|
```
|
|
|
|
**Railway Free Tier:**
|
|
|
|
- ✅ $5 credit/month (covers small apps)
|
|
- ✅ PostgreSQL database included
|
|
- ✅ Automatic deployments
|
|
- ✅ Built-in monitoring
|
|
|
|
### **2. Render (All-in-One) - FREE**
|
|
|
|
#### **✅ Why Choose Render:**
|
|
|
|
- **Cost**: $0/month for basic tier
|
|
- **Simplicity**: Single platform for everything
|
|
- **Features**: Database + web service + static sites
|
|
|
|
#### **Setup Process:**
|
|
|
|
1. **Fork your GitHub repo**
|
|
2. **Connect Render to GitHub**
|
|
3. **Create Web Service** (Backend):
|
|
- Build Command: `pip install -r requirements.txt && python setup_ai.py`
|
|
- Start Command: `uvicorn app:app --host 0.0.0.0 --port $PORT`
|
|
4. **Create Static Site** (Frontend):
|
|
- Build Command: `npm install && npm run build`
|
|
- Publish Directory: `build`
|
|
5. **Create PostgreSQL Database** (Free tier available)
|
|
|
|
**Render Free Tier:**
|
|
|
|
- ✅ Web services sleep after 15min inactivity
|
|
- ✅ 750 hours/month (enough for personal use)
|
|
- ✅ Custom domains
|
|
- ✅ Automatic SSL
|
|
|
|
---
|
|
|
|
## 🎓 **Student Discount Options**
|
|
|
|
### **1. GitHub Student Developer Pack**
|
|
|
|
**Get $200+ in credits across multiple platforms!**
|
|
|
|
#### **Included Credits:**
|
|
|
|
- **DigitalOcean**: $200 credit (1 year)
|
|
- **Heroku**: Free Dyno hours upgrade
|
|
- **Microsoft Azure**: $100 credit
|
|
- **AWS**: Various credits through AWS Educate
|
|
|
|
#### **How to Apply:**
|
|
|
|
1. Go to [GitHub Student Pack](https://education.github.com/pack)
|
|
2. Verify your student status (.edu email)
|
|
3. Get access to all benefits
|
|
|
|
### **2. DigitalOcean ($200 Free Credit)**
|
|
|
|
**Perfect for learning cloud deployment!**
|
|
|
|
#### **Setup with Student Pack:**
|
|
|
|
```bash
|
|
# 1. Create DigitalOcean account with student pack
|
|
# 2. Create App Platform deployment
|
|
# 3. Connect your GitHub repo
|
|
# 4. Configure build settings
|
|
|
|
# App Spec (app.yaml):
|
|
name: liferpg
|
|
services:
|
|
- name: backend
|
|
source_dir: /modern/backend
|
|
github:
|
|
repo: TLimoges33/LifeRPG
|
|
branch: main
|
|
build_command: pip install -r requirements.txt && python setup_ai.py
|
|
run_command: uvicorn app:app --host 0.0.0.0 --port $PORT
|
|
environment_slug: python
|
|
instance_count: 1
|
|
instance_size_slug: basic-xxs
|
|
- name: frontend
|
|
source_dir: /modern/frontend
|
|
github:
|
|
repo: TLimoges33/LifeRPG
|
|
branch: main
|
|
build_command: npm install && npm run build
|
|
run_command: serve -s build -l $PORT
|
|
environment_slug: node-js
|
|
instance_count: 1
|
|
instance_size_slug: basic-xxs
|
|
databases:
|
|
- name: postgres
|
|
engine: PG
|
|
version: "13"
|
|
size: basic
|
|
```
|
|
|
|
**Cost**: $0 for 4+ months with student credit!
|
|
|
|
---
|
|
|
|
## 💡 **Ultra-Cheap Options ($3-5/month)**
|
|
|
|
### **1. Hetzner Cloud (Germany) - $3.79/month**
|
|
|
|
**Best value for money in Europe!**
|
|
|
|
#### **Setup:**
|
|
|
|
```bash
|
|
# 1. Create Hetzner account
|
|
# 2. Create CX11 server (1 vCPU, 4GB RAM, 20GB SSD)
|
|
# 3. Install Docker
|
|
curl -fsSL https://get.docker.com -o get-docker.sh
|
|
sudo sh get-docker.sh
|
|
|
|
# 4. Deploy with Docker Compose
|
|
version: '3.8'
|
|
services:
|
|
backend:
|
|
build: ./modern/backend
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- DATABASE_URL=postgresql://user:pass@postgres:5432/liferpg
|
|
|
|
frontend:
|
|
build: ./modern/frontend
|
|
ports:
|
|
- "3000:3000"
|
|
|
|
postgres:
|
|
image: postgres:13
|
|
environment:
|
|
- POSTGRES_DB=liferpg
|
|
- POSTGRES_USER=user
|
|
- POSTGRES_PASSWORD=pass
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
volumes:
|
|
postgres_data:
|
|
```
|
|
|
|
### **2. Oracle Cloud Free Tier - $0 FOREVER**
|
|
|
|
**Most generous free tier available!**
|
|
|
|
#### **What You Get:**
|
|
|
|
- 4 ARM-based compute instances
|
|
- 24GB RAM total
|
|
- 200GB storage
|
|
- **Never expires** (as long as you use it monthly)
|
|
|
|
#### **Setup Process:**
|
|
|
|
1. Sign up for Oracle Cloud (requires credit card for verification)
|
|
2. Create Always Free compute instance
|
|
3. Install Docker and deploy LifeRPG
|
|
4. Configure firewall rules
|
|
|
|
### **3. AWS EC2 (with Student Credits) - Variable**
|
|
|
|
**Great for learning AWS!**
|
|
|
|
#### **Free Tier + Student Credits:**
|
|
|
|
- t2.micro instance (1 year free)
|
|
- Additional credits through AWS Educate
|
|
- RDS PostgreSQL free tier
|
|
- S3 for static hosting
|
|
|
|
---
|
|
|
|
## 🛠️ **Production-Ready Budget Setup ($5-10/month)**
|
|
|
|
### **Recommended Stack:**
|
|
|
|
- **Server**: Hetzner CX21 ($7.56/month) - 2 vCPU, 8GB RAM
|
|
- **Database**: Built-in PostgreSQL
|
|
- **CDN**: Cloudflare (Free)
|
|
- **Domain**: Namecheap (.com for $8.98/year)
|
|
- **SSL**: Let's Encrypt (Free)
|
|
|
|
### **Total Monthly Cost**: ~$8-10/month
|
|
|
|
#### **Why This Setup:**
|
|
|
|
- ✅ Handles 10,000+ users
|
|
- ✅ AI models run smoothly with 8GB RAM
|
|
- ✅ Professional custom domain
|
|
- ✅ Global CDN performance
|
|
- ✅ Automatic backups
|
|
|
|
---
|
|
|
|
## 🎯 **My Top Recommendation for Students**
|
|
|
|
### **🥇 Best Overall: Vercel + Railway (FREE)**
|
|
|
|
#### **Why I Recommend This:**
|
|
|
|
1. **Zero Cost**: Completely free for personal projects
|
|
2. **Professional**: Same stack used by companies
|
|
3. **Easy**: Git-based deployments
|
|
4. **Scalable**: Grows with your project
|
|
5. **Learning**: Great resume experience
|
|
|
|
#### **Setup Steps:**
|
|
|
|
```bash
|
|
# 1. Prepare your code
|
|
git add -A
|
|
git commit -m "Prepare for deployment"
|
|
git push origin main
|
|
|
|
# 2. Deploy Frontend to Vercel
|
|
cd modern/frontend
|
|
npm i -g vercel
|
|
vercel --prod
|
|
|
|
# 3. Deploy Backend to Railway
|
|
# - Go to railway.app
|
|
# - Connect GitHub repo
|
|
# - Deploy from modern/backend folder
|
|
# - Add PostgreSQL database
|
|
|
|
# 4. Update environment variables
|
|
# Frontend: REACT_APP_API_URL=https://your-railway-app.railway.app
|
|
# Backend: DATABASE_URL=your-railway-postgres-url
|
|
```
|
|
|
|
### **🥈 Best for Learning: DigitalOcean + Student Pack**
|
|
|
|
#### **Advantages:**
|
|
|
|
- Real VPS experience
|
|
- Docker deployment practice
|
|
- $200 credit lasts 6+ months
|
|
- Industry-standard tools
|
|
|
|
---
|
|
|
|
## 📊 **Cost Comparison Table**
|
|
|
|
| Platform | Monthly Cost | RAM | Database | SSL | Custom Domain | Best For |
|
|
| ---------------- | ------------ | ----- | ------------- | --- | ------------- | ------------ |
|
|
| Vercel + Railway | $0 | 512MB | ✅ PostgreSQL | ✅ | ✅ | Students |
|
|
| Render | $0 | 512MB | ✅ PostgreSQL | ✅ | ✅ | Simplicity |
|
|
| Oracle Free | $0 | 24GB | Self-hosted | ✅ | ✅ | Learning |
|
|
| Hetzner CX11 | $3.79 | 4GB | Self-hosted | ✅ | Extra cost | Budget |
|
|
| DigitalOcean | $6 | 1GB | Extra $15 | ✅ | ✅ | Professional |
|
|
|
|
---
|
|
|
|
## 🔧 **Deployment Configuration**
|
|
|
|
### **Environment Variables You'll Need:**
|
|
|
|
```bash
|
|
# Backend (.env)
|
|
DATABASE_URL=postgresql://user:pass@host:5432/liferpg
|
|
JWT_SECRET_KEY=your-secret-key-here
|
|
AI_MODELS_CACHE_DIR=/tmp/models
|
|
AI_ENABLE_GPU=false
|
|
ENVIRONMENT=production
|
|
|
|
# Frontend (.env)
|
|
REACT_APP_API_URL=https://your-backend-url.com
|
|
REACT_APP_ENVIRONMENT=production
|
|
```
|
|
|
|
### **Build Commands:**
|
|
|
|
```bash
|
|
# Backend
|
|
pip install -r requirements.txt -r requirements_ai.txt
|
|
python setup_ai.py
|
|
alembic upgrade head
|
|
|
|
# Frontend
|
|
npm install
|
|
npm run build
|
|
```
|
|
|
|
### **Health Checks:**
|
|
|
|
- Backend: `GET /health`
|
|
- Frontend: Check if React app loads
|
|
- AI: `GET /api/v1/ai/health`
|
|
|
|
---
|
|
|
|
## 🚀 **Going Live Checklist**
|
|
|
|
### **Pre-Launch:**
|
|
|
|
- [ ] Environment variables configured
|
|
- [ ] Database migrations applied
|
|
- [ ] AI models downloaded and cached
|
|
- [ ] SSL certificates active
|
|
- [ ] Custom domain configured (if applicable)
|
|
- [ ] Health checks passing
|
|
|
|
### **Post-Launch:**
|
|
|
|
- [ ] Monitor performance and errors
|
|
- [ ] Set up backup strategy
|
|
- [ ] Configure monitoring (UptimeRobot free)
|
|
- [ ] Share with friends for testing
|
|
- [ ] Document your deployment process
|
|
|
|
### **Marketing Your Project:**
|
|
|
|
- [ ] Create awesome GitHub README
|
|
- [ ] Post on Reddit (r/SideProject, r/AI)
|
|
- [ ] Share on Twitter/LinkedIn
|
|
- [ ] Submit to Product Hunt
|
|
- [ ] Add to your portfolio
|
|
|
|
---
|
|
|
|
## 🎓 **Student Success Tips**
|
|
|
|
### **1. Start with Free Tiers**
|
|
|
|
Don't spend money until you need to scale. Free tiers teach you deployment without risk.
|
|
|
|
### **2. Document Everything**
|
|
|
|
Keep notes of your deployment process. This becomes valuable experience for job interviews.
|
|
|
|
### **3. Monitor Usage**
|
|
|
|
Set up alerts to avoid surprise bills if you choose paid tiers.
|
|
|
|
### **4. Learn as You Go**
|
|
|
|
Each deployment teaches you valuable DevOps skills. Don't just copy-paste—understand what each step does.
|
|
|
|
### **5. Build Your Portfolio**
|
|
|
|
A deployed AI application is impressive on resumes. Document the architecture, challenges, and solutions.
|
|
|
|
---
|
|
|
|
## 🎯 **Next Steps**
|
|
|
|
1. **Choose your platform** (I recommend Vercel + Railway)
|
|
2. **Set up your deployment** following the guides above
|
|
3. **Configure your domain** (optional but professional)
|
|
4. **Test everything thoroughly**
|
|
5. **Share your success** 🎉
|
|
|
|
**Remember**: The goal isn't just to host your app—it's to learn valuable skills that will help in your career. Every deployment challenge you overcome makes you a better developer!
|
|
|
|
**You've got this! 🚀**
|