- Add auth handlers (signup, login, logout, account management) with bcrypt - Add client, customer, service, scheduling, payment, question, answer handlers - Add dashboard, monthly report, and lead pipeline pages - Add UTF-8 middleware to force charset on HTML responses - Add config package with env-based overrides for DB path, secrets, endpoints - Add parser package for WhatsApp message ingestion - Add clean-arch layers: pkg/domain, pkg/repo, pkg/usecase for leads - Add cmd/migrate utility for DB migrations - Add Makefile, README, run-tests.sh, and dev scripts - Update docker-compose.yml with memory limits - Update .air.toml to exclude DB files and stop on errors - Update whatsapp-sync dependencies and add src/index.js entrypoint - Add whatsme standalone WhatsApp reader app (source only) - Untrack .opencode-sandbox/data/go-crm.db from git history - Expand root .gitignore: ngrok, tmp dirs, sandbox DBs, compiled binaries
22 lines
695 B
Bash
Executable File
22 lines
695 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Simple local development runner for go-crm
|
|
# For junior-friendly setup: no Docker, no file watchers, just plain Go.
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
APP_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
DEV_DATA_DIR="${DEV_DATA_DIR:-$APP_ROOT/.dev-data}"
|
|
|
|
mkdir -p "$DEV_DATA_DIR"
|
|
|
|
export CRM_DATABASE_PATH="${CRM_DATABASE_PATH:-$DEV_DATA_DIR/go-crm.db}"
|
|
export CRM_WHATSAPP_STORE_PATH="${CRM_WHATSAPP_STORE_PATH:-$DEV_DATA_DIR/whatsapp.db}"
|
|
export CRM_HTTP_ENDPOINT="${CRM_HTTP_ENDPOINT:-http://localhost:8080}"
|
|
export CRM_INTERNAL_SECRET="${CRM_INTERNAL_SECRET:-internal-secret}"
|
|
|
|
cd "$APP_ROOT"
|
|
|
|
echo "Starting go-crm..."
|
|
go run main.go
|