Rebrand from Casera/MyCrib to honeyDue

Total rebrand across all Go API source files:
- Go module path: casera-api -> honeydue-api
- All imports updated (130+ files)
- Docker: containers, images, networks renamed
- Email templates: support email, noreply, icon URL
- Domains: casera.app/mycrib.treytartt.com -> honeyDue.treytartt.com
- Bundle IDs: com.tt.casera -> com.tt.honeyDue
- IAP product IDs updated
- Landing page, admin panel, config defaults
- Seeds, CI workflows, Makefile, docs
- Database table names preserved (no migration needed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-03-07 06:33:38 -06:00
parent 793e50ce52
commit 4976eafc6c
189 changed files with 831 additions and 831 deletions

View File

@@ -1,6 +1,6 @@
# Dokku Deployment Guide for Casera API
# Dokku Deployment Guide for honeyDue API
This guide provides step-by-step instructions for deploying the Casera Go API to a remote server using Dokku.
This guide provides step-by-step instructions for deploying the honeyDue Go API to a remote server using Dokku.
## Table of Contents
@@ -90,7 +90,7 @@ sudo DOKKU_TAG=v0.34.4 bash bootstrap.sh
```bash
# Set your domain (replace with your actual domain)
dokku domains:set-global casera.treytartt.com
dokku domains:set-global honeyDue.treytartt.com
# Add your SSH public key for deployments
# Run this from your LOCAL machine:
@@ -117,13 +117,13 @@ dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
### 1. Create the Dokku App
```bash
dokku apps:create casera-api
dokku apps:create honeydue-api
```
### 2. Set the Domain
```bash
dokku domains:add casera-api api.casera.treytartt.com
dokku domains:add honeydue-api api.honeyDue.treytartt.com
```
### 3. Configure Buildpack (if needed)
@@ -131,8 +131,8 @@ dokku domains:add casera-api api.casera.treytartt.com
The app uses a Dockerfile, so Dokku will auto-detect it. If you need to force Docker builds:
```bash
dokku builder:set casera-api build-dir .
dokku builder-dockerfile:set casera-api dockerfile-path Dockerfile
dokku builder:set honeydue-api build-dir .
dokku builder-dockerfile:set honeydue-api dockerfile-path Dockerfile
```
---
@@ -143,20 +143,20 @@ dokku builder-dockerfile:set casera-api dockerfile-path Dockerfile
```bash
# Create the database service
dokku postgres:create casera-db
dokku postgres:create honeydue-db
# Link to the app (automatically sets DATABASE_URL)
dokku postgres:link casera-db casera-api
dokku postgres:link honeydue-db honeydue-api
```
### 2. Verify Connection
```bash
# Check the connection info
dokku postgres:info casera-db
dokku postgres:info honeydue-db
# Connect to the database
dokku postgres:connect casera-db
dokku postgres:connect honeydue-db
```
### 3. Set Individual Database Variables
@@ -165,13 +165,13 @@ Dokku sets `DATABASE_URL` automatically, but the app expects individual variable
```bash
# Get the database credentials
dokku postgres:info casera-db
dokku postgres:info honeydue-db
# Set individual variables (replace with actual values from info command)
dokku config:set casera-api \
DB_HOST=dokku-postgres-casera-db \
dokku config:set honeydue-api \
DB_HOST=dokku-postgres-honeydue-db \
DB_PORT=5432 \
POSTGRES_DB=casera_db \
POSTGRES_DB=honeydue_db \
POSTGRES_USER=postgres \
POSTGRES_PASSWORD=1mJPfu6rzG9r6xukcGbUOU5NoCg0jKfa
```
@@ -184,16 +184,16 @@ dokku config:set casera-api \
```bash
# Create the Redis service
dokku redis:create casera-redis
dokku redis:create honeydue-redis
# Link to the app (automatically sets REDIS_URL)
dokku redis:link casera-redis casera-api
dokku redis:link honeydue-redis honeydue-api
```
### 2. Verify Connection
```bash
dokku redis:info casera-redis
dokku redis:info honeydue-redis
```
---
@@ -203,10 +203,10 @@ dokku redis:info casera-redis
### 1. Required Variables
```bash
dokku config:set casera-api \
dokku config:set honeydue-api \
PORT=5000 \
DEBUG=false \
ALLOWED_HOSTS=api.casera.treytartt.com,localhost \
ALLOWED_HOSTS=api.honeyDue.treytartt.com,localhost \
TIMEZONE=UTC \
SECRET_KEY=8553813eda361017a02677ed504abdd331537cfe6f7cc407345f037cc22c75fc
```
@@ -214,20 +214,20 @@ dokku config:set casera-api \
### 2. Email Configuration
```bash
dokku config:set casera-api \
dokku config:set honeydue-api \
EMAIL_HOST=smtp.fastmail.com \
EMAIL_PORT=587 \
EMAIL_USE_TLS=true \
EMAIL_HOST_USER=treytartt@fastmail.com \
EMAIL_HOST_PASSWORD=2t9y4n4t497z5863 \
DEFAULT_FROM_EMAIL="Casera <treytartt@fastmail.com>"
DEFAULT_FROM_EMAIL="honeyDue <treytartt@fastmail.com>"
```
### 3. Apple Sign In (Optional)
```bash
dokku config:set casera-api \
APPLE_CLIENT_ID=com.tt.casera.CaseraDev \
dokku config:set honeydue-api \
APPLE_CLIENT_ID=com.tt.honeyDue.honeyDueDev \
APPLE_TEAM_ID=V3PF3M6B6U
```
@@ -236,11 +236,11 @@ dokku config:set casera-api \
The API uses direct APNs/FCM connections (no external push server needed):
```bash
dokku config:set casera-api \
dokku config:set honeydue-api \
APNS_AUTH_KEY_PATH=/push_certs/AuthKey_R9N3SM2WD5.p8 \
APNS_AUTH_KEY_ID=R9N3SM2WD5 \
APNS_TEAM_ID=V3PF3M6B6U \
APNS_TOPIC=com.tt.casera.CaseraDev \
APNS_TOPIC=com.tt.honeyDue.honeyDueDev \
APNS_PRODUCTION=true \
FCM_SERVER_KEY=your-firebase-server-key
```
@@ -248,14 +248,14 @@ dokku config:set casera-api \
### 5. Admin Panel URL
```bash
dokku config:set casera-api \
NEXT_PUBLIC_API_URL=https://api.casera.treytartt.com
dokku config:set honeydue-api \
NEXT_PUBLIC_API_URL=https://api.honeyDue.treytartt.com
```
### 6. View All Configuration
```bash
dokku config:show casera-api
dokku config:show honeydue-api
```
---
@@ -266,16 +266,16 @@ dokku config:show casera-api
```bash
# Create storage directory on host
mkdir -p /var/lib/dokku/data/storage/casera-api/uploads
mkdir -p /var/lib/dokku/data/storage/honeydue-api/uploads
# Set permissions
chown -R 32767:32767 /var/lib/dokku/data/storage/casera-api
chown -R 32767:32767 /var/lib/dokku/data/storage/honeydue-api
```
### 2. Mount Storage to App
```bash
dokku storage:mount casera-api /var/lib/dokku/data/storage/casera-api/uploads:/app/uploads
dokku storage:mount honeydue-api /var/lib/dokku/data/storage/honeydue-api/uploads:/app/uploads
```
---
@@ -285,8 +285,8 @@ dokku storage:mount casera-api /var/lib/dokku/data/storage/casera-api/uploads:/a
### 1. Add Dokku Remote (Local Machine)
```bash
cd /path/to/myCribAPI-go
git remote add dokku dokku@your-server-ip:casera-api
cd /path/to/honeyDueAPI-go
git remote add dokku dokku@your-server-ip:honeydue-api
```
### 2. Deploy
@@ -301,17 +301,17 @@ git push dokku main
```bash
# On server
dokku logs casera-api -t
dokku logs honeydue-api -t
```
### 4. Verify Deployment
```bash
# Check app status
dokku ps:report casera-api
dokku ps:report honeydue-api
# Check app is running
curl https://api.casera.treytartt.com/api/health/
curl https://api.honeyDue.treytartt.com/api/health/
```
---
@@ -321,13 +321,13 @@ curl https://api.casera.treytartt.com/api/health/
### 1. Set Let's Encrypt Email
```bash
dokku letsencrypt:set casera-api email admin@treytartt.com
dokku letsencrypt:set honeydue-api email admin@treytartt.com
```
### 2. Enable Let's Encrypt
```bash
dokku letsencrypt:enable casera-api
dokku letsencrypt:enable honeydue-api
```
### 3. Set Up Auto-Renewal
@@ -345,7 +345,7 @@ The worker process handles background jobs (task reminders, overdue alerts, dail
### 1. Configure Worker Environment Variables
```bash
dokku config:set casera-api \
dokku config:set honeydue-api \
TASK_REMINDER_HOUR=20 \
TASK_REMINDER_MINUTE=0 \
OVERDUE_REMINDER_HOUR=9 \
@@ -364,17 +364,17 @@ dokku config:set casera-api \
```bash
# Scale to 1 worker
dokku ps:scale casera-api worker=1
dokku ps:scale honeydue-api worker=1
# Verify processes
dokku ps:report casera-api
dokku ps:report honeydue-api
```
### 3. Verify Worker is Running
```bash
# Check worker logs
dokku logs casera-api -p worker
dokku logs honeydue-api -p worker
# Should see:
# "Registered task reminder job"
@@ -391,33 +391,33 @@ dokku logs casera-api -p worker
```bash
# Real-time logs
dokku logs casera-api -t
dokku logs honeydue-api -t
# Last 100 lines
dokku logs casera-api -n 100
dokku logs honeydue-api -n 100
# Worker logs
dokku logs casera-api -p worker
dokku logs honeydue-api -p worker
```
### Database Operations
```bash
# Connect to database
dokku postgres:connect casera-db
dokku postgres:connect honeydue-db
# Export database backup
dokku postgres:export casera-db > backup.sql
dokku postgres:export honeydue-db > backup.sql
# Import database backup
dokku postgres:import casera-db < backup.sql
dokku postgres:import honeydue-db < backup.sql
```
### Run Migrations Manually
```bash
# Enter the app container
dokku enter casera-api web
dokku enter honeydue-api web
# Migrations run automatically on startup, but if needed:
/app/api migrate
@@ -426,24 +426,24 @@ dokku enter casera-api web
### Restart App
```bash
dokku ps:restart casera-api
dokku ps:restart honeydue-api
```
### Scale App
```bash
# Scale web process
dokku ps:scale casera-api web=2 worker=1
dokku ps:scale honeydue-api web=2 worker=1
# View current scale
dokku ps:report casera-api
dokku ps:report honeydue-api
```
### Stop/Start App
```bash
dokku ps:stop casera-api
dokku ps:start casera-api
dokku ps:stop honeydue-api
dokku ps:start honeydue-api
```
---
@@ -453,8 +453,8 @@ dokku ps:start casera-api
### Check App Status
```bash
dokku ps:report casera-api
dokku logs casera-api -n 200
dokku ps:report honeydue-api
dokku logs honeydue-api -n 200
```
### Common Issues
@@ -463,47 +463,47 @@ dokku logs casera-api -n 200
```bash
# Check logs for errors
dokku logs casera-api -n 500
dokku logs honeydue-api -n 500
# Verify environment variables
dokku config:show casera-api
dokku config:show honeydue-api
# Check if ports are available
dokku proxy:ports casera-api
dokku proxy:ports honeydue-api
```
#### 2. Database Connection Failed
```bash
# Verify link
dokku postgres:linked casera-api casera-db
dokku postgres:linked honeydue-api honeydue-db
# Check database is running
dokku postgres:info casera-db
dokku postgres:info honeydue-db
# Re-link if needed
dokku postgres:unlink casera-db casera-api
dokku postgres:link casera-db casera-api
dokku postgres:unlink honeydue-db honeydue-api
dokku postgres:link honeydue-db honeydue-api
```
#### 3. Redis Connection Failed
```bash
# Verify link
dokku redis:linked casera-api casera-redis
dokku redis:linked honeydue-api honeydue-redis
# Check Redis is running
dokku redis:info casera-redis
dokku redis:info honeydue-redis
```
#### 4. Storage/Upload Issues
```bash
# Check mounts
dokku storage:report casera-api
dokku storage:report honeydue-api
# Verify permissions
ls -la /var/lib/dokku/data/storage/casera-api/
ls -la /var/lib/dokku/data/storage/honeydue-api/
```
#### 5. SSL Certificate Issues
@@ -513,7 +513,7 @@ ls -la /var/lib/dokku/data/storage/casera-api/
dokku letsencrypt:list
# Renew manually
dokku letsencrypt:enable casera-api
dokku letsencrypt:enable honeydue-api
```
### View Resource Usage
@@ -523,7 +523,7 @@ dokku letsencrypt:enable casera-api
docker stats
# Disk usage
dokku storage:report casera-api
dokku storage:report honeydue-api
df -h
```
@@ -534,12 +534,12 @@ df -h
| Command | Description |
|---------|-------------|
| `dokku apps:list` | List all apps |
| `dokku logs casera-api -t` | Tail logs |
| `dokku ps:restart casera-api` | Restart app |
| `dokku config:show casera-api` | Show env vars |
| `dokku postgres:connect casera-db` | Connect to DB |
| `dokku enter casera-api web` | Shell into container |
| `dokku ps:scale casera-api web=2` | Scale processes |
| `dokku logs honeydue-api -t` | Tail logs |
| `dokku ps:restart honeydue-api` | Restart app |
| `dokku config:show honeydue-api` | Show env vars |
| `dokku postgres:connect honeydue-db` | Connect to DB |
| `dokku enter honeydue-api web` | Shell into container |
| `dokku ps:scale honeydue-api web=2` | Scale processes |
---