Align with project-template docs/writing-docs.md: plain openings, no emoji decoration, archive scratch plans where they cluttered live docs.
264 lines
4.9 KiB
Markdown
264 lines
4.9 KiB
Markdown
# POTE Quick Setup Card
|
|
|
|
## Your Configuration
|
|
|
|
**Email Server:** `mail.levkin.ca`
|
|
**Email Account:** `test@levkin.ca`
|
|
**Database:** PostgreSQL (configured)
|
|
**Status:** Ready for deployment
|
|
|
|
---
|
|
|
|
## 3-Step Setup
|
|
|
|
### Step 1: Add Your Password (30 seconds)
|
|
|
|
```bash
|
|
nano .env
|
|
# Find: SMTP_PASSWORD=YOUR_MAILBOX_PASSWORD_HERE
|
|
# Replace with your actual mailbox password
|
|
# Save: Ctrl+X, Y, Enter
|
|
```
|
|
|
|
### Step 2: Test Email (1 minute)
|
|
|
|
```bash
|
|
source venv/bin/activate
|
|
python scripts/send_daily_report.py --to test@levkin.ca --test-smtp
|
|
```
|
|
|
|
**Check test@levkin.ca inbox** - you should receive a test email!
|
|
|
|
### Step 3: Automate (2 minutes)
|
|
|
|
```bash
|
|
./scripts/setup_cron.sh
|
|
# Follow prompts, confirm email: test@levkin.ca
|
|
# Choose time: 6 AM (recommended)
|
|
```
|
|
|
|
**Done!** You'll now receive:
|
|
- Daily reports at 6 AM
|
|
- Weekly reports on Sundays
|
|
|
|
---
|
|
|
|
## Deployment to Proxmox (5 minutes)
|
|
|
|
### On Proxmox Host:
|
|
|
|
```bash
|
|
# Create LXC container (Debian 12)
|
|
# Name: pote
|
|
# IP: 10.0.10.95 (or your choice)
|
|
# Resources: 2 CPU, 4GB RAM, 20GB disk
|
|
```
|
|
|
|
### Inside LXC Container:
|
|
|
|
```bash
|
|
# Run automated setup
|
|
curl -o setup.sh https://raw.githubusercontent.com/YOUR_REPO/pote/main/scripts/proxmox_setup.sh
|
|
bash setup.sh
|
|
```
|
|
|
|
Or manually:
|
|
|
|
```bash
|
|
# Clone repo
|
|
git clone YOUR_REPO_URL pote
|
|
cd pote
|
|
|
|
# Copy and configure .env
|
|
cp .env.example .env
|
|
nano .env # Add password
|
|
|
|
# Run setup
|
|
bash scripts/proxmox_setup.sh
|
|
```
|
|
|
|
---
|
|
|
|
## Quick Commands
|
|
|
|
### On Deployed Server (SSH)
|
|
|
|
```bash
|
|
ssh poteapp@10.0.10.95 # or your IP
|
|
cd ~/pote
|
|
source venv/bin/activate
|
|
|
|
# Check health
|
|
python scripts/health_check.py
|
|
|
|
# Manual data fetch
|
|
python scripts/fetch_congressional_trades.py
|
|
python scripts/monitor_market.py --scan
|
|
|
|
# Manual report (test)
|
|
python scripts/send_daily_report.py --to test@levkin.ca
|
|
|
|
# View logs
|
|
tail -f ~/logs/daily_run.log
|
|
ls -lh ~/logs/*.txt
|
|
```
|
|
|
|
---
|
|
|
|
## Email Configuration (.env)
|
|
|
|
```env
|
|
SMTP_HOST=mail.levkin.ca
|
|
SMTP_PORT=587
|
|
SMTP_USER=test@levkin.ca
|
|
SMTP_PASSWORD=your_password_here
|
|
FROM_EMAIL=test@levkin.ca
|
|
REPORT_RECIPIENTS=test@levkin.ca
|
|
```
|
|
|
|
**Multiple recipients:**
|
|
```env
|
|
REPORT_RECIPIENTS=test@levkin.ca,user2@example.com,user3@example.com
|
|
```
|
|
|
|
---
|
|
|
|
## What You'll Receive
|
|
|
|
### Daily Report (6 AM)
|
|
```
|
|
New congressional trades
|
|
Market alerts (unusual activity)
|
|
Suspicious timing detections
|
|
Summary statistics
|
|
```
|
|
|
|
### Weekly Report (Sunday 8 AM)
|
|
```
|
|
Most active officials
|
|
Most traded securities
|
|
Repeat offenders
|
|
Pattern analysis
|
|
```
|
|
|
|
---
|
|
|
|
## Troubleshooting
|
|
|
|
### Email Not Working?
|
|
|
|
1. **Check password in .env**
|
|
```bash
|
|
nano .env # Verify SMTP_PASSWORD is correct
|
|
```
|
|
|
|
2. **Test connection**
|
|
```bash
|
|
python scripts/send_daily_report.py --to test@levkin.ca --test-smtp
|
|
```
|
|
|
|
3. **Check spam folder** in test@levkin.ca
|
|
|
|
4. **Verify port 587 is open**
|
|
```bash
|
|
telnet mail.levkin.ca 587
|
|
```
|
|
|
|
### No Data?
|
|
|
|
```bash
|
|
# Manually fetch data
|
|
python scripts/fetch_congressional_trades.py
|
|
python scripts/enrich_securities.py
|
|
python scripts/monitor_market.py --scan
|
|
|
|
# Check health
|
|
python scripts/health_check.py
|
|
```
|
|
|
|
### Cron Not Running?
|
|
|
|
```bash
|
|
# Check cron is installed
|
|
crontab -l
|
|
|
|
# View logs
|
|
tail -50 ~/logs/daily_run.log
|
|
|
|
# Test manually
|
|
./scripts/automated_daily_run.sh
|
|
```
|
|
|
|
---
|
|
|
|
## Documentation
|
|
|
|
| Document | Purpose |
|
|
|----------|---------|
|
|
| **[EMAIL_SETUP.md](EMAIL_SETUP.md)** | Your levkin.ca setup guide |
|
|
| **[DEPLOYMENT_AND_AUTOMATION.md](DEPLOYMENT_AND_AUTOMATION.md)** | Answers all questions |
|
|
| **[AUTOMATION_QUICKSTART.md](AUTOMATION_QUICKSTART.md)** | Quick automation guide |
|
|
| **[PROXMOX_QUICKSTART.md](PROXMOX_QUICKSTART.md)** | Proxmox deployment |
|
|
| **[QUICKSTART.md](QUICKSTART.md)** | Usage guide |
|
|
|
|
---
|
|
|
|
## Checklist
|
|
|
|
**Local Development:**
|
|
- [ ] `.env` file created with password
|
|
- [ ] `make install` completed
|
|
- [ ] Email test successful
|
|
- [ ] Tests passing (`make test`)
|
|
|
|
**Proxmox Deployment:**
|
|
- [ ] LXC container created
|
|
- [ ] POTE deployed (via `proxmox_setup.sh`)
|
|
- [ ] `.env` copied with password
|
|
- [ ] Email test successful on server
|
|
- [ ] Automation setup (`./scripts/setup_cron.sh`)
|
|
- [ ] First report received
|
|
|
|
**Verification:**
|
|
- [ ] Daily report received at 6 AM
|
|
- [ ] Weekly report received Sunday
|
|
- [ ] Reports also in `~/logs/`
|
|
- [ ] Health check passing
|
|
|
|
---
|
|
|
|
## Your Current Status
|
|
|
|
**Code:** Complete (93 tests passing)
|
|
**Monitoring:** 3-phase system operational
|
|
**CI/CD:** Pipeline ready (.github/workflows/ci.yml)
|
|
**Email:** Configured for test@levkin.ca
|
|
⏳ **Deployment:** Ready to deploy to Proxmox
|
|
⏳ **Automation:** Ready to set up with `setup_cron.sh`
|
|
|
|
---
|
|
|
|
## Next Action
|
|
|
|
**Right now (local testing):**
|
|
```bash
|
|
cd /home/user/Documents/code/pote
|
|
nano .env # Add your password
|
|
source venv/bin/activate
|
|
python scripts/send_daily_report.py --to test@levkin.ca --test-smtp
|
|
```
|
|
|
|
**After deployment (on Proxmox):**
|
|
```bash
|
|
ssh poteapp@your-proxmox-ip
|
|
cd ~/pote
|
|
./scripts/setup_cron.sh
|
|
```
|
|
|
|
**That's it! **
|
|
|
|
---
|
|
|
|
**Everything is ready - just add your password and test!**
|
|
|