chitfund/README.md

180 lines
4.0 KiB
Markdown

# 🚀 LuckyChit - Digital Chit Fund Management
Complete production-ready chit fund management system with Flutter frontend and Node.js backend.
---
## 📚 Documentation
| Document | Purpose | Audience |
|----------|---------|----------|
| **[QUICK_START.md](QUICK_START.md)** | Get started in 5 minutes | Everyone |
| **[DEPLOYMENT.md](DEPLOYMENT.md)** | Complete deployment guide | DevOps/Developers |
| **[TROUBLESHOOTING.md](TROUBLESHOOTING.md)** | Fix common issues | Everyone |
| **[QUICK_REFERENCE.md](QUICK_REFERENCE.md)** | Command cheat sheet | DevOps |
---
## ⚡ Quick Commands
### 🚀 Deploy to Production
```bash
ssh luckychit@192.168.8.148
cd /home/luckychit/apps/chitfund
./scripts/deploy.sh
```
### 📊 Check Status
```bash
pm2 status
pm2 logs --lines 50
```
### 🔧 Fix Issues
```bash
./scripts/diagnose.sh # What's wrong?
./scripts/fix-502.sh # Fix 502 errors
```
---
## 🏗️ Architecture
```
Internet
Cloudflare (SSL, CDN, DDoS Protection)
Nginx Proxy (Reverse Proxy)
Application Server (192.168.8.148)
├── PM2: luckychit-api (Backend - Port 3000)
├── PM2: luckychit-frontend (Frontend - Port 8080)
└── PostgreSQL Database (Port 5432)
```
**Production URL**: https://chitfund.deepteklabs.com
---
## 📁 Project Structure
```
chitfund/
├── README.md # This file
├── QUICK_START.md # Getting started
├── DEPLOYMENT.md # Deployment guide
├── TROUBLESHOOTING.md # Issue fixes
├── scripts/ # All deployment scripts
│ ├── deploy.sh # Main deployment
│ ├── diagnose.sh # System diagnostics
│ ├── backup-db.sh # Database backup
│ ├── restore-db.sh # Database restore
│ └── fix-502.sh # Fix 502 errors
├── backend/ # Node.js Express API
│ ├── src/ # Source code
│ ├── README.md # Backend docs
│ └── API_DOCUMENTATION.md
└── luckychit/ # Flutter Web App
├── lib/ # Dart source code
├── web/ # Web assets
└── README.md # Frontend docs
```
---
## 🚀 Getting Started
### For Users
Just visit: **https://chitfund.deepteklabs.com**
### For Developers (Local)
```bash
# Backend
cd backend
npm install
npm start # http://localhost:3000
# Frontend
cd luckychit
flutter pub get
flutter run -d chrome # Opens in browser
```
### For DevOps (Production)
See **[DEPLOYMENT.md](DEPLOYMENT.md)**
---
## 📊 Tech Stack
**Frontend**
- Flutter Web
- GetX (State Management)
- Dio (HTTP Client)
**Backend**
- Node.js + Express
- PostgreSQL
- JWT Authentication
- Sequelize ORM
**Infrastructure**
- PM2 (Process Manager)
- Nginx (Reverse Proxy)
- Cloudflare (CDN + SSL)
- LXC Containers (Isolation)
---
## 🆘 Need Help?
**Something not working?**
1. Check [TROUBLESHOOTING.md](TROUBLESHOOTING.md)
2. Run `./scripts/diagnose.sh`
3. Check PM2 logs: `pm2 logs`
**Want to deploy?**
- See [DEPLOYMENT.md](DEPLOYMENT.md)
- Quick: `./scripts/deploy.sh`
**Learning the system?**
- Start with [QUICK_START.md](QUICK_START.md)
- Reference [QUICK_REFERENCE.md](QUICK_REFERENCE.md)
---
## 📝 Recent Updates
- ✅ Removed demo credentials from login
- ✅ Fixed all caching issues (browser, service worker, nginx)
- ✅ Added signup navigation to dashboard
- ✅ Consolidated documentation and scripts
- ✅ Created unified deployment system
---
## 🎯 Quick Links
- **Production**: https://chitfund.deepteklabs.com
- **Backend API**: http://192.168.8.148:3000
- **Frontend**: http://192.168.8.148:8080
- **API Docs**: [backend/API_DOCUMENTATION.md](backend/API_DOCUMENTATION.md)
---
**Version**: 1.0.0
**Last Updated**: November 6, 2025
**Status**: ✅ Production Ready
---
## 📄 License & Documentation
For complete feature documentation, see individual README files in `backend/` and `luckychit/` directories.
**Questions?** Check [TROUBLESHOOTING.md](TROUBLESHOOTING.md) first!