Rebrand from MyCrib to Casera

- Update Go module from mycrib-api to casera-api
- Update all import statements across 69 Go files
- Update admin panel branding (title, sidebar, login form)
- Update email templates (subjects, bodies, signatures)
- Update PDF report generation branding
- Update Docker container names and network
- Update config defaults (database name, email sender, APNS topic)
- Update README and documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-11-28 21:10:48 -06:00
parent 99465a590d
commit c7dc56e2d2
84 changed files with 287 additions and 287 deletions

View File

@@ -6,7 +6,7 @@ TIMEZONE=UTC
SECRET_KEY=your-secret-key-here-change-this-in-production SECRET_KEY=your-secret-key-here-change-this-in-production
# Database Settings (PostgreSQL) # Database Settings (PostgreSQL)
POSTGRES_DB=mycrib POSTGRES_DB=casera
POSTGRES_USER=postgres POSTGRES_USER=postgres
POSTGRES_PASSWORD=change-this-secure-password POSTGRES_PASSWORD=change-this-secure-password
DB_HOST=localhost DB_HOST=localhost
@@ -26,13 +26,13 @@ EMAIL_PORT=587
EMAIL_USE_TLS=true EMAIL_USE_TLS=true
EMAIL_HOST_USER=your-email@gmail.com EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password EMAIL_HOST_PASSWORD=your-app-password
DEFAULT_FROM_EMAIL=MyCrib <noreply@mycrib.com> DEFAULT_FROM_EMAIL=Casera <noreply@casera.com>
# APNs Settings (iOS Push Notifications) # APNs Settings (iOS Push Notifications)
APNS_AUTH_KEY_PATH=/path/to/AuthKey_XXXXXX.p8 APNS_AUTH_KEY_PATH=/path/to/AuthKey_XXXXXX.p8
APNS_AUTH_KEY_ID=XXXXXXXXXX APNS_AUTH_KEY_ID=XXXXXXXXXX
APNS_TEAM_ID=XXXXXXXXXX APNS_TEAM_ID=XXXXXXXXXX
APNS_TOPIC=com.example.mycrib APNS_TOPIC=com.example.casera
APNS_USE_SANDBOX=true APNS_USE_SANDBOX=true
# FCM Settings (Android Push Notifications) # FCM Settings (Android Push Notifications)

View File

@@ -1,9 +1,9 @@
.PHONY: build run test clean deps lint docker-build docker-up docker-down migrate .PHONY: build run test clean deps lint docker-build docker-up docker-down migrate
# Binary names # Binary names
API_BINARY=mycrib-api API_BINARY=casera-api
WORKER_BINARY=mycrib-worker WORKER_BINARY=casera-worker
ADMIN_BINARY=mycrib-admin ADMIN_BINARY=casera-admin
# Build flags # Build flags
LDFLAGS=-ldflags "-s -w" LDFLAGS=-ldflags "-s -w"
@@ -107,7 +107,7 @@ swagger:
# Help # Help
help: help:
@echo "MyCrib API Go - Available targets:" @echo "Casera API Go - Available targets:"
@echo "" @echo ""
@echo "Build:" @echo "Build:"
@echo " deps - Install dependencies" @echo " deps - Install dependencies"

View File

@@ -1,6 +1,6 @@
# MyCrib API (Go) # Casera API (Go)
Go implementation of the MyCrib property management API, built with Gin, GORM, Gorush, and GoAdmin. Go implementation of the Casera property management API, built with Gin, GORM, Gorush, and GoAdmin.
## Tech Stack ## Tech Stack
@@ -156,10 +156,10 @@ Seed files are located in `seeds/`:
```bash ```bash
# Seed lookup tables (required) # Seed lookup tables (required)
cat seeds/001_lookups.sql | dokku postgres:connect mycrib-db cat seeds/001_lookups.sql | dokku postgres:connect casera-db
# Seed test data # Seed test data
cat seeds/002_test_data.sql | dokku postgres:connect mycrib-db cat seeds/002_test_data.sql | dokku postgres:connect casera-db
``` ```
### Test Users ### Test Users
@@ -187,4 +187,4 @@ This is a full rewrite that maintains API compatibility. The mobile clients (KMM
## License ## License
Proprietary - MyCrib Proprietary - Casera

View File

@@ -41,9 +41,9 @@ export function UserDetailClient() {
const [showPushDialog, setShowPushDialog] = useState(false); const [showPushDialog, setShowPushDialog] = useState(false);
const [showEmailDialog, setShowEmailDialog] = useState(false); const [showEmailDialog, setShowEmailDialog] = useState(false);
const [pushTitle, setPushTitle] = useState('Test Notification'); const [pushTitle, setPushTitle] = useState('Test Notification');
const [pushBody, setPushBody] = useState('This is a test push notification from MyCrib Admin.'); const [pushBody, setPushBody] = useState('This is a test push notification from Casera Admin.');
const [emailSubject, setEmailSubject] = useState('Test Email from MyCrib'); const [emailSubject, setEmailSubject] = useState('Test Email from Casera');
const [emailBody, setEmailBody] = useState('This is a test email sent from the MyCrib Admin Panel.'); const [emailBody, setEmailBody] = useState('This is a test email sent from the Casera Admin Panel.');
const { data: user, isLoading, error } = useQuery({ const { data: user, isLoading, error } = useQuery({
queryKey: ['user', userId], queryKey: ['user', userId],

View File

@@ -15,8 +15,8 @@ const geistMono = Geist_Mono({
}); });
export const metadata: Metadata = { export const metadata: Metadata = {
title: "MyCrib Admin", title: "Casera Admin",
description: "MyCrib Administration Panel", description: "Casera Administration Panel",
}; };
export default function RootLayout({ export default function RootLayout({

View File

@@ -76,7 +76,7 @@ export function AppSidebar() {
<SidebarHeader className="border-b px-6 py-4"> <SidebarHeader className="border-b px-6 py-4">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<Building2 className="h-6 w-6" /> <Building2 className="h-6 w-6" />
<span className="font-semibold text-lg">MyCrib Admin</span> <span className="font-semibold text-lg">Casera Admin</span>
</div> </div>
</SidebarHeader> </SidebarHeader>

View File

@@ -34,7 +34,7 @@ export function LoginForm() {
<Card className="w-full max-w-md"> <Card className="w-full max-w-md">
<CardHeader className="space-y-1"> <CardHeader className="space-y-1">
<CardTitle className="text-2xl font-bold text-center"> <CardTitle className="text-2xl font-bold text-center">
MyCrib Admin Casera Admin
</CardTitle> </CardTitle>
<CardDescription className="text-center"> <CardDescription className="text-center">
Enter your credentials to access the admin panel Enter your credentials to access the admin panel
@@ -53,7 +53,7 @@ export function LoginForm() {
<Input <Input
id="email" id="email"
type="email" type="email"
placeholder="admin@mycrib.com" placeholder="admin@casera.app"
value={email} value={email}
onChange={(e) => setEmail(e.target.value)} onChange={(e) => setEmail(e.target.value)}
required required

View File

@@ -1,6 +1,6 @@
{ {
"name": "mycrib-api", "name": "casera-api",
"description": "MyCrib API (Go)", "description": "Casera API (Go)",
"scripts": {}, "scripts": {},
"healthchecks": { "healthchecks": {
"web": [ "web": [

View File

@@ -12,11 +12,11 @@ import (
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/database" "github.com/treytartt/casera-api/internal/database"
"github.com/treytartt/mycrib-api/internal/router" "github.com/treytartt/casera-api/internal/router"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
"github.com/treytartt/mycrib-api/pkg/utils" "github.com/treytartt/casera-api/pkg/utils"
) )
func main() { func main() {

View File

@@ -10,12 +10,12 @@ import (
"github.com/hibiken/asynq" "github.com/hibiken/asynq"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/database" "github.com/treytartt/casera-api/internal/database"
"github.com/treytartt/mycrib-api/internal/push" "github.com/treytartt/casera-api/internal/push"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
"github.com/treytartt/mycrib-api/internal/worker/jobs" "github.com/treytartt/casera-api/internal/worker/jobs"
"github.com/treytartt/mycrib-api/pkg/utils" "github.com/treytartt/casera-api/pkg/utils"
) )
func main() { func main() {

View File

@@ -2,28 +2,28 @@ services:
# PostgreSQL Database # PostgreSQL Database
db: db:
image: postgres:16-alpine image: postgres:16-alpine
container_name: mycrib-db container_name: casera-db
restart: unless-stopped restart: unless-stopped
environment: environment:
POSTGRES_USER: ${POSTGRES_USER:-mycrib} POSTGRES_USER: ${POSTGRES_USER:-casera}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mycrib_dev_password} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-casera_dev_password}
POSTGRES_DB: ${POSTGRES_DB:-mycrib} POSTGRES_DB: ${POSTGRES_DB:-casera}
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql/data
ports: ports:
- "${DB_PORT:-5433}:5432" # Use 5433 externally to avoid conflicts - "${DB_PORT:-5433}:5432" # Use 5433 externally to avoid conflicts
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-mycrib} -d ${POSTGRES_DB:-mycrib}"] test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-casera} -d ${POSTGRES_DB:-casera}"]
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
networks: networks:
- mycrib-network - casera-network
# Redis Cache # Redis Cache
redis: redis:
image: redis:7-alpine image: redis:7-alpine
container_name: mycrib-redis container_name: casera-redis
restart: unless-stopped restart: unless-stopped
command: redis-server --appendonly yes command: redis-server --appendonly yes
volumes: volumes:
@@ -36,13 +36,13 @@ services:
timeout: 5s timeout: 5s
retries: 5 retries: 5
networks: networks:
- mycrib-network - casera-network
# Gorush Push Notification Server # Gorush Push Notification Server
# Note: Disabled by default. Start with: docker-compose --profile push up # Note: Disabled by default. Start with: docker-compose --profile push up
gorush: gorush:
image: appleboy/gorush:latest image: appleboy/gorush:latest
container_name: mycrib-gorush container_name: casera-gorush
restart: unless-stopped restart: unless-stopped
profiles: profiles:
- push # Only start when push profile is enabled - push # Only start when push profile is enabled
@@ -57,7 +57,7 @@ services:
GORUSH_IOS_KEY_PATH: "/certs/apns_key.p8" GORUSH_IOS_KEY_PATH: "/certs/apns_key.p8"
GORUSH_IOS_KEY_ID: "${APNS_AUTH_KEY_ID}" GORUSH_IOS_KEY_ID: "${APNS_AUTH_KEY_ID}"
GORUSH_IOS_TEAM_ID: "${APNS_TEAM_ID}" GORUSH_IOS_TEAM_ID: "${APNS_TEAM_ID}"
GORUSH_IOS_TOPIC: "${APNS_TOPIC:-com.example.mycrib}" GORUSH_IOS_TOPIC: "${APNS_TOPIC:-com.example.casera}"
GORUSH_IOS_PRODUCTION: "${APNS_PRODUCTION:-false}" GORUSH_IOS_PRODUCTION: "${APNS_PRODUCTION:-false}"
GORUSH_ANDROID_ENABLED: "${GORUSH_ANDROID_ENABLED:-true}" GORUSH_ANDROID_ENABLED: "${GORUSH_ANDROID_ENABLED:-true}"
GORUSH_ANDROID_APIKEY: "${FCM_SERVER_KEY}" GORUSH_ANDROID_APIKEY: "${FCM_SERVER_KEY}"
@@ -67,14 +67,14 @@ services:
timeout: 10s timeout: 10s
retries: 3 retries: 3
networks: networks:
- mycrib-network - casera-network
# MyCrib API # Casera API
api: api:
build: build:
context: . context: .
target: api target: api
container_name: mycrib-api container_name: casera-api
restart: unless-stopped restart: unless-stopped
ports: ports:
- "${PORT:-8000}:8000" - "${PORT:-8000}:8000"
@@ -88,9 +88,9 @@ services:
# Database # Database
DB_HOST: db DB_HOST: db
DB_PORT: "5432" DB_PORT: "5432"
POSTGRES_USER: ${POSTGRES_USER:-mycrib} POSTGRES_USER: ${POSTGRES_USER:-casera}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mycrib_dev_password} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-casera_dev_password}
POSTGRES_DB: ${POSTGRES_DB:-mycrib} POSTGRES_DB: ${POSTGRES_DB:-casera}
DB_SSLMODE: "${DB_SSLMODE:-disable}" DB_SSLMODE: "${DB_SSLMODE:-disable}"
# Redis # Redis
@@ -104,7 +104,7 @@ services:
EMAIL_PORT: ${EMAIL_PORT:-587} EMAIL_PORT: ${EMAIL_PORT:-587}
EMAIL_HOST_USER: ${EMAIL_HOST_USER} EMAIL_HOST_USER: ${EMAIL_HOST_USER}
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD} EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
DEFAULT_FROM_EMAIL: ${DEFAULT_FROM_EMAIL:-MyCrib <noreply@mycrib.com>} DEFAULT_FROM_EMAIL: ${DEFAULT_FROM_EMAIL:-Casera <noreply@casera.com>}
EMAIL_USE_TLS: "${EMAIL_USE_TLS:-true}" EMAIL_USE_TLS: "${EMAIL_USE_TLS:-true}"
# Push Notifications # Push Notifications
@@ -112,7 +112,7 @@ services:
APNS_AUTH_KEY_PATH: "/certs/apns_key.p8" APNS_AUTH_KEY_PATH: "/certs/apns_key.p8"
APNS_AUTH_KEY_ID: ${APNS_AUTH_KEY_ID} APNS_AUTH_KEY_ID: ${APNS_AUTH_KEY_ID}
APNS_TEAM_ID: ${APNS_TEAM_ID} APNS_TEAM_ID: ${APNS_TEAM_ID}
APNS_TOPIC: ${APNS_TOPIC:-com.example.mycrib} APNS_TOPIC: ${APNS_TOPIC:-com.example.casera}
APNS_USE_SANDBOX: "${APNS_USE_SANDBOX:-true}" APNS_USE_SANDBOX: "${APNS_USE_SANDBOX:-true}"
FCM_SERVER_KEY: ${FCM_SERVER_KEY} FCM_SERVER_KEY: ${FCM_SERVER_KEY}
volumes: volumes:
@@ -131,14 +131,14 @@ services:
timeout: 10s timeout: 10s
retries: 3 retries: 3
networks: networks:
- mycrib-network - casera-network
# MyCrib Admin Panel (Next.js) # Casera Admin Panel (Next.js)
admin: admin:
build: build:
context: . context: .
target: admin target: admin
container_name: mycrib-admin container_name: casera-admin
restart: unless-stopped restart: unless-stopped
ports: ports:
- "${ADMIN_PORT:-3000}:3000" - "${ADMIN_PORT:-3000}:3000"
@@ -155,22 +155,22 @@ services:
timeout: 10s timeout: 10s
retries: 3 retries: 3
networks: networks:
- mycrib-network - casera-network
# MyCrib Worker (Background Jobs) # Casera Worker (Background Jobs)
worker: worker:
build: build:
context: . context: .
target: worker target: worker
container_name: mycrib-worker container_name: casera-worker
restart: unless-stopped restart: unless-stopped
environment: environment:
# Database # Database
DB_HOST: db DB_HOST: db
DB_PORT: "5432" DB_PORT: "5432"
POSTGRES_USER: ${POSTGRES_USER:-mycrib} POSTGRES_USER: ${POSTGRES_USER:-casera}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mycrib_dev_password} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-casera_dev_password}
POSTGRES_DB: ${POSTGRES_DB:-mycrib} POSTGRES_DB: ${POSTGRES_DB:-casera}
DB_SSLMODE: "${DB_SSLMODE:-disable}" DB_SSLMODE: "${DB_SSLMODE:-disable}"
# Redis # Redis
@@ -187,7 +187,7 @@ services:
EMAIL_PORT: ${EMAIL_PORT:-587} EMAIL_PORT: ${EMAIL_PORT:-587}
EMAIL_HOST_USER: ${EMAIL_HOST_USER} EMAIL_HOST_USER: ${EMAIL_HOST_USER}
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD} EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
DEFAULT_FROM_EMAIL: ${DEFAULT_FROM_EMAIL:-MyCrib <noreply@mycrib.com>} DEFAULT_FROM_EMAIL: ${DEFAULT_FROM_EMAIL:-Casera <noreply@casera.com>}
EMAIL_USE_TLS: "${EMAIL_USE_TLS:-true}" EMAIL_USE_TLS: "${EMAIL_USE_TLS:-true}"
# Worker settings # Worker settings
@@ -201,12 +201,12 @@ services:
redis: redis:
condition: service_healthy condition: service_healthy
networks: networks:
- mycrib-network - casera-network
volumes: volumes:
postgres_data: postgres_data:
redis_data: redis_data:
networks: networks:
mycrib-network: casera-network:
driver: bridge driver: bridge

View File

@@ -11,7 +11,7 @@ services:
- PORT=8000 - PORT=8000
- DEBUG=true - DEBUG=true
- SECRET_KEY=${SECRET_KEY:-development-secret-key} - SECRET_KEY=${SECRET_KEY:-development-secret-key}
- POSTGRES_DB=${POSTGRES_DB:-mycrib} - POSTGRES_DB=${POSTGRES_DB:-casera}
- POSTGRES_USER=${POSTGRES_USER:-postgres} - POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- DB_HOST=db - DB_HOST=db
@@ -28,17 +28,17 @@ services:
condition: service_healthy condition: service_healthy
restart: unless-stopped restart: unless-stopped
networks: networks:
- mycrib-network - casera-network
worker: worker:
build: build:
context: .. context: ..
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile
command: ["./mycrib-worker"] command: ["./casera-worker"]
environment: environment:
- DEBUG=true - DEBUG=true
- SECRET_KEY=${SECRET_KEY:-development-secret-key} - SECRET_KEY=${SECRET_KEY:-development-secret-key}
- POSTGRES_DB=${POSTGRES_DB:-mycrib} - POSTGRES_DB=${POSTGRES_DB:-casera}
- POSTGRES_USER=${POSTGRES_USER:-postgres} - POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- DB_HOST=db - DB_HOST=db
@@ -51,12 +51,12 @@ services:
condition: service_healthy condition: service_healthy
restart: unless-stopped restart: unless-stopped
networks: networks:
- mycrib-network - casera-network
db: db:
image: postgres:15-alpine image: postgres:15-alpine
environment: environment:
- POSTGRES_DB=${POSTGRES_DB:-mycrib} - POSTGRES_DB=${POSTGRES_DB:-casera}
- POSTGRES_USER=${POSTGRES_USER:-postgres} - POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
volumes: volumes:
@@ -64,13 +64,13 @@ services:
ports: ports:
- "5432:5432" - "5432:5432"
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-mycrib}"] test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-casera}"]
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 5 retries: 5
restart: unless-stopped restart: unless-stopped
networks: networks:
- mycrib-network - casera-network
redis: redis:
image: redis:7-alpine image: redis:7-alpine
@@ -85,12 +85,12 @@ services:
retries: 5 retries: 5
restart: unless-stopped restart: unless-stopped
networks: networks:
- mycrib-network - casera-network
volumes: volumes:
postgres_data: postgres_data:
redis_data: redis_data:
networks: networks:
mycrib-network: casera-network:
driver: bridge driver: bridge

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/treytartt/mycrib-api module github.com/treytartt/casera-api
go 1.23.0 go 1.23.0

View File

@@ -7,9 +7,9 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin/dto" "github.com/treytartt/casera-api/internal/admin/dto"
"github.com/treytartt/mycrib-api/internal/middleware" "github.com/treytartt/casera-api/internal/middleware"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminUserManagementHandler handles admin user management endpoints // AdminUserManagementHandler handles admin user management endpoints

View File

@@ -5,10 +5,10 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/middleware" "github.com/treytartt/casera-api/internal/middleware"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
) )
// AdminAuthHandler handles admin authentication endpoints // AdminAuthHandler handles admin authentication endpoints

View File

@@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin/dto" "github.com/treytartt/casera-api/internal/admin/dto"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminAuthTokenHandler handles admin auth token management endpoints // AdminAuthTokenHandler handles admin auth token management endpoints

View File

@@ -8,8 +8,8 @@ import (
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin/dto" "github.com/treytartt/casera-api/internal/admin/dto"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminCompletionHandler handles admin task completion management endpoints // AdminCompletionHandler handles admin task completion management endpoints

View File

@@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin/dto" "github.com/treytartt/casera-api/internal/admin/dto"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminContractorHandler handles admin contractor management endpoints // AdminContractorHandler handles admin contractor management endpoints

View File

@@ -7,7 +7,7 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminDashboardHandler handles admin dashboard endpoints // AdminDashboardHandler handles admin dashboard endpoints

View File

@@ -9,8 +9,8 @@ import (
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin/dto" "github.com/treytartt/casera-api/internal/admin/dto"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminDocumentHandler handles admin document management endpoints // AdminDocumentHandler handles admin document management endpoints

View File

@@ -7,7 +7,7 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminLimitationsHandler handles subscription limitations management // AdminLimitationsHandler handles subscription limitations management

View File

@@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin/dto" "github.com/treytartt/casera-api/internal/admin/dto"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminLookupHandler handles admin lookup table management endpoints // AdminLookupHandler handles admin lookup table management endpoints

View File

@@ -9,10 +9,10 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin/dto" "github.com/treytartt/casera-api/internal/admin/dto"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/push" "github.com/treytartt/casera-api/internal/push"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
// AdminNotificationHandler handles admin notification management endpoints // AdminNotificationHandler handles admin notification management endpoints

View File

@@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin/dto" "github.com/treytartt/casera-api/internal/admin/dto"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminNotificationPrefsHandler handles notification preference management // AdminNotificationPrefsHandler handles notification preference management

View File

@@ -9,8 +9,8 @@ import (
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin/dto" "github.com/treytartt/casera-api/internal/admin/dto"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminResidenceHandler handles admin residence management endpoints // AdminResidenceHandler handles admin residence management endpoints

View File

@@ -10,7 +10,7 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminSettingsHandler handles system settings management // AdminSettingsHandler handles system settings management

View File

@@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin/dto" "github.com/treytartt/casera-api/internal/admin/dto"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminSubscriptionHandler handles admin subscription management endpoints // AdminSubscriptionHandler handles admin subscription management endpoints

View File

@@ -9,8 +9,8 @@ import (
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin/dto" "github.com/treytartt/casera-api/internal/admin/dto"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminTaskHandler handles admin task management endpoints // AdminTaskHandler handles admin task management endpoints

View File

@@ -7,8 +7,8 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin/dto" "github.com/treytartt/casera-api/internal/admin/dto"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// AdminUserHandler handles admin user management endpoints // AdminUserHandler handles admin user management endpoints

View File

@@ -9,12 +9,12 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin/handlers" "github.com/treytartt/casera-api/internal/admin/handlers"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/middleware" "github.com/treytartt/casera-api/internal/middleware"
"github.com/treytartt/mycrib-api/internal/push" "github.com/treytartt/casera-api/internal/push"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
// Dependencies holds optional services for admin routes // Dependencies holds optional services for admin routes

View File

@@ -210,7 +210,7 @@ func setDefaults() {
viper.SetDefault("DB_HOST", "localhost") viper.SetDefault("DB_HOST", "localhost")
viper.SetDefault("DB_PORT", 5432) viper.SetDefault("DB_PORT", 5432)
viper.SetDefault("POSTGRES_USER", "postgres") viper.SetDefault("POSTGRES_USER", "postgres")
viper.SetDefault("POSTGRES_DB", "mycrib") viper.SetDefault("POSTGRES_DB", "casera")
viper.SetDefault("DB_SSLMODE", "disable") viper.SetDefault("DB_SSLMODE", "disable")
viper.SetDefault("DB_MAX_OPEN_CONNS", 25) viper.SetDefault("DB_MAX_OPEN_CONNS", 25)
viper.SetDefault("DB_MAX_IDLE_CONNS", 10) viper.SetDefault("DB_MAX_IDLE_CONNS", 10)
@@ -226,11 +226,11 @@ func setDefaults() {
viper.SetDefault("EMAIL_USE_TLS", true) viper.SetDefault("EMAIL_USE_TLS", true)
viper.SetDefault("EMAIL_HOST_USER", "") viper.SetDefault("EMAIL_HOST_USER", "")
viper.SetDefault("EMAIL_HOST_PASSWORD", "") viper.SetDefault("EMAIL_HOST_PASSWORD", "")
viper.SetDefault("DEFAULT_FROM_EMAIL", "MyCrib <noreply@mycrib.com>") viper.SetDefault("DEFAULT_FROM_EMAIL", "Casera <noreply@casera.com>")
// Push notification defaults // Push notification defaults
viper.SetDefault("GORUSH_URL", "http://localhost:8088") viper.SetDefault("GORUSH_URL", "http://localhost:8088")
viper.SetDefault("APNS_TOPIC", "com.example.mycrib") viper.SetDefault("APNS_TOPIC", "com.example.casera")
viper.SetDefault("APNS_USE_SANDBOX", true) viper.SetDefault("APNS_USE_SANDBOX", true)
// Worker defaults (all times in UTC) // Worker defaults (all times in UTC)

View File

@@ -9,8 +9,8 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"gorm.io/gorm/logger" "gorm.io/gorm/logger"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
var db *gorm.DB var db *gorm.DB

View File

@@ -5,7 +5,7 @@ import (
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// CreateDocumentRequest represents the request to create a document // CreateDocumentRequest represents the request to create a document

View File

@@ -3,7 +3,7 @@ package responses
import ( import (
"time" "time"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// UserResponse represents a user in API responses // UserResponse represents a user in API responses

View File

@@ -3,7 +3,7 @@ package responses
import ( import (
"time" "time"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// ContractorSpecialtyResponse represents a contractor specialty // ContractorSpecialtyResponse represents a contractor specialty

View File

@@ -5,7 +5,7 @@ import (
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// DocumentUserResponse represents a user in document context // DocumentUserResponse represents a user in document context

View File

@@ -5,7 +5,7 @@ import (
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// ResidenceTypeResponse represents a residence type in the API response // ResidenceTypeResponse represents a residence type in the API response

View File

@@ -6,7 +6,7 @@ import (
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// TaskCategoryResponse represents a task category // TaskCategoryResponse represents a task category

View File

@@ -7,10 +7,10 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/dto/responses" "github.com/treytartt/casera-api/internal/dto/responses"
"github.com/treytartt/mycrib-api/internal/middleware" "github.com/treytartt/casera-api/internal/middleware"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
// AuthHandler handles authentication endpoints // AuthHandler handles authentication endpoints

View File

@@ -10,11 +10,11 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
"github.com/treytartt/mycrib-api/internal/testutil" "github.com/treytartt/casera-api/internal/testutil"
) )
func setupAuthHandler(t *testing.T) (*AuthHandler, *gin.Engine, *repositories.UserRepository) { func setupAuthHandler(t *testing.T) (*AuthHandler, *gin.Engine, *repositories.UserRepository) {

View File

@@ -7,10 +7,10 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/middleware" "github.com/treytartt/casera-api/internal/middleware"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
// ContractorHandler handles contractor-related HTTP requests // ContractorHandler handles contractor-related HTTP requests

View File

@@ -11,10 +11,10 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/middleware" "github.com/treytartt/casera-api/internal/middleware"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
// DocumentHandler handles document-related HTTP requests // DocumentHandler handles document-related HTTP requests

View File

@@ -7,9 +7,9 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/treytartt/mycrib-api/internal/middleware" "github.com/treytartt/casera-api/internal/middleware"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
// NotificationHandler handles notification-related HTTP requests // NotificationHandler handles notification-related HTTP requests

View File

@@ -7,10 +7,10 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/middleware" "github.com/treytartt/casera-api/internal/middleware"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
// ResidenceHandler handles residence-related HTTP requests // ResidenceHandler handles residence-related HTTP requests

View File

@@ -11,11 +11,11 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
"github.com/treytartt/mycrib-api/internal/testutil" "github.com/treytartt/casera-api/internal/testutil"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -5,7 +5,7 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
// StaticDataHandler handles static/lookup data endpoints // StaticDataHandler handles static/lookup data endpoints

View File

@@ -6,9 +6,9 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/treytartt/mycrib-api/internal/middleware" "github.com/treytartt/casera-api/internal/middleware"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
// SubscriptionHandler handles subscription-related HTTP requests // SubscriptionHandler handles subscription-related HTTP requests

View File

@@ -11,10 +11,10 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/shopspring/decimal" "github.com/shopspring/decimal"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/middleware" "github.com/treytartt/casera-api/internal/middleware"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
// TaskHandler handles task-related HTTP requests // TaskHandler handles task-related HTTP requests

View File

@@ -12,11 +12,11 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
"github.com/treytartt/mycrib-api/internal/testutil" "github.com/treytartt/casera-api/internal/testutil"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -5,7 +5,7 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
// UploadHandler handles file upload endpoints // UploadHandler handles file upload endpoints

View File

@@ -6,9 +6,9 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/treytartt/mycrib-api/internal/middleware" "github.com/treytartt/casera-api/internal/middleware"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
// UserHandler handles user-related HTTP requests // UserHandler handles user-related HTTP requests

View File

@@ -13,12 +13,12 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/handlers" "github.com/treytartt/casera-api/internal/handlers"
"github.com/treytartt/mycrib-api/internal/middleware" "github.com/treytartt/casera-api/internal/middleware"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
"github.com/treytartt/mycrib-api/internal/testutil" "github.com/treytartt/casera-api/internal/testutil"
"gorm.io/gorm" "gorm.io/gorm"
) )

View File

@@ -9,9 +9,9 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/golang-jwt/jwt/v5" "github.com/golang-jwt/jwt/v5"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
) )
const ( const (

View File

@@ -12,8 +12,8 @@ import (
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
const ( const (

View File

@@ -10,7 +10,7 @@ import (
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
) )
// Platform constants // Platform constants

View File

@@ -6,7 +6,7 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
var ( var (

View File

@@ -3,7 +3,7 @@ package repositories
import ( import (
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// ContractorRepository handles database operations for contractors // ContractorRepository handles database operations for contractors

View File

@@ -5,7 +5,7 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// DocumentRepository handles database operations for documents // DocumentRepository handles database operations for documents

View File

@@ -5,7 +5,7 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// NotificationRepository handles database operations for notifications // NotificationRepository handles database operations for notifications

View File

@@ -8,7 +8,7 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// ResidenceRepository handles database operations for residences // ResidenceRepository handles database operations for residences

View File

@@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/testutil" "github.com/treytartt/casera-api/internal/testutil"
) )
func TestResidenceRepository_Create(t *testing.T) { func TestResidenceRepository_Create(t *testing.T) {

View File

@@ -5,7 +5,7 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// SubscriptionRepository handles database operations for subscriptions // SubscriptionRepository handles database operations for subscriptions

View File

@@ -5,7 +5,7 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// TaskRepository handles database operations for tasks // TaskRepository handles database operations for tasks

View File

@@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/testutil" "github.com/treytartt/casera-api/internal/testutil"
) )
func TestTaskRepository_Create(t *testing.T) { func TestTaskRepository_Create(t *testing.T) {

View File

@@ -7,7 +7,7 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
var ( var (

View File

@@ -6,8 +6,8 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/testutil" "github.com/treytartt/casera-api/internal/testutil"
) )
func TestUserRepository_Create(t *testing.T) { func TestUserRepository_Create(t *testing.T) {

View File

@@ -8,14 +8,14 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/admin" "github.com/treytartt/casera-api/internal/admin"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/handlers" "github.com/treytartt/casera-api/internal/handlers"
"github.com/treytartt/mycrib-api/internal/middleware" "github.com/treytartt/casera-api/internal/middleware"
"github.com/treytartt/mycrib-api/internal/push" "github.com/treytartt/casera-api/internal/push"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
"github.com/treytartt/mycrib-api/pkg/utils" "github.com/treytartt/casera-api/pkg/utils"
) )
const Version = "2.0.0" const Version = "2.0.0"

View File

@@ -9,11 +9,11 @@ import (
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/dto/responses" "github.com/treytartt/casera-api/internal/dto/responses"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
) )
var ( var (

View File

@@ -9,7 +9,7 @@ import (
"github.com/redis/go-redis/v9" "github.com/redis/go-redis/v9"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
) )
// CacheService provides Redis caching functionality // CacheService provides Redis caching functionality

View File

@@ -5,10 +5,10 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/dto/responses" "github.com/treytartt/casera-api/internal/dto/responses"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
) )
// Contractor-related errors // Contractor-related errors

View File

@@ -5,10 +5,10 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/dto/responses" "github.com/treytartt/casera-api/internal/dto/responses"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
) )
// Document-related errors // Document-related errors

View File

@@ -10,7 +10,7 @@ import (
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gopkg.in/gomail.v2" "gopkg.in/gomail.v2"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
) )
// EmailService handles sending emails // EmailService handles sending emails
@@ -86,7 +86,7 @@ func (s *EmailService) SendEmailWithAttachment(to, subject, htmlBody, textBody s
// SendWelcomeEmail sends a welcome email with verification code // SendWelcomeEmail sends a welcome email with verification code
func (s *EmailService) SendWelcomeEmail(to, firstName, code string) error { func (s *EmailService) SendWelcomeEmail(to, firstName, code string) error {
subject := "Welcome to MyCrib - Verify Your Email" subject := "Welcome to Casera - Verify Your Email"
name := firstName name := firstName
if name == "" { if name == "" {
@@ -109,16 +109,16 @@ func (s *EmailService) SendWelcomeEmail(to, firstName, code string) error {
<body> <body>
<div class="container"> <div class="container">
<div class="header"> <div class="header">
<h1>Welcome to MyCrib!</h1> <h1>Welcome to Casera!</h1>
</div> </div>
<p>Hi %s,</p> <p>Hi %s,</p>
<p>Thank you for creating a MyCrib account. To complete your registration, please verify your email address by entering the following code:</p> <p>Thank you for creating a Casera account. To complete your registration, please verify your email address by entering the following code:</p>
<div class="code">%s</div> <div class="code">%s</div>
<p>This code will expire in 24 hours.</p> <p>This code will expire in 24 hours.</p>
<p>If you didn't create a MyCrib account, you can safely ignore this email.</p> <p>If you didn't create a Casera account, you can safely ignore this email.</p>
<p>Best regards,<br>The MyCrib Team</p> <p>Best regards,<br>The Casera Team</p>
<div class="footer"> <div class="footer">
<p>&copy; %d MyCrib. All rights reserved.</p> <p>&copy; %d Casera. All rights reserved.</p>
</div> </div>
</div> </div>
</body> </body>
@@ -126,20 +126,20 @@ func (s *EmailService) SendWelcomeEmail(to, firstName, code string) error {
`, name, code, time.Now().Year()) `, name, code, time.Now().Year())
textBody := fmt.Sprintf(` textBody := fmt.Sprintf(`
Welcome to MyCrib! Welcome to Casera!
Hi %s, Hi %s,
Thank you for creating a MyCrib account. To complete your registration, please verify your email address by entering the following code: Thank you for creating a Casera account. To complete your registration, please verify your email address by entering the following code:
%s %s
This code will expire in 24 hours. This code will expire in 24 hours.
If you didn't create a MyCrib account, you can safely ignore this email. If you didn't create a Casera account, you can safely ignore this email.
Best regards, Best regards,
The MyCrib Team The Casera Team
`, name, code) `, name, code)
return s.SendEmail(to, subject, htmlBody, textBody) return s.SendEmail(to, subject, htmlBody, textBody)
@@ -147,7 +147,7 @@ The MyCrib Team
// SendVerificationEmail sends an email verification code // SendVerificationEmail sends an email verification code
func (s *EmailService) SendVerificationEmail(to, firstName, code string) error { func (s *EmailService) SendVerificationEmail(to, firstName, code string) error {
subject := "MyCrib - Verify Your Email" subject := "Casera - Verify Your Email"
name := firstName name := firstName
if name == "" { if name == "" {
@@ -174,9 +174,9 @@ func (s *EmailService) SendVerificationEmail(to, firstName, code string) error {
<div class="code">%s</div> <div class="code">%s</div>
<p>This code will expire in 24 hours.</p> <p>This code will expire in 24 hours.</p>
<p>If you didn't request this, you can safely ignore this email.</p> <p>If you didn't request this, you can safely ignore this email.</p>
<p>Best regards,<br>The MyCrib Team</p> <p>Best regards,<br>The Casera Team</p>
<div class="footer"> <div class="footer">
<p>&copy; %d MyCrib. All rights reserved.</p> <p>&copy; %d Casera. All rights reserved.</p>
</div> </div>
</div> </div>
</body> </body>
@@ -197,7 +197,7 @@ This code will expire in 24 hours.
If you didn't request this, you can safely ignore this email. If you didn't request this, you can safely ignore this email.
Best regards, Best regards,
The MyCrib Team The Casera Team
`, name, code) `, name, code)
return s.SendEmail(to, subject, htmlBody, textBody) return s.SendEmail(to, subject, htmlBody, textBody)
@@ -205,7 +205,7 @@ The MyCrib Team
// SendPasswordResetEmail sends a password reset email // SendPasswordResetEmail sends a password reset email
func (s *EmailService) SendPasswordResetEmail(to, firstName, code string) error { func (s *EmailService) SendPasswordResetEmail(to, firstName, code string) error {
subject := "MyCrib - Password Reset Request" subject := "Casera - Password Reset Request"
name := firstName name := firstName
if name == "" { if name == "" {
@@ -235,9 +235,9 @@ func (s *EmailService) SendPasswordResetEmail(to, firstName, code string) error
<div class="warning"> <div class="warning">
<strong>Security Notice:</strong> If you didn't request a password reset, please ignore this email. Your password will remain unchanged. <strong>Security Notice:</strong> If you didn't request a password reset, please ignore this email. Your password will remain unchanged.
</div> </div>
<p>Best regards,<br>The MyCrib Team</p> <p>Best regards,<br>The Casera Team</p>
<div class="footer"> <div class="footer">
<p>&copy; %d MyCrib. All rights reserved.</p> <p>&copy; %d Casera. All rights reserved.</p>
</div> </div>
</div> </div>
</body> </body>
@@ -258,7 +258,7 @@ This code will expire in 15 minutes.
SECURITY NOTICE: If you didn't request a password reset, please ignore this email. Your password will remain unchanged. SECURITY NOTICE: If you didn't request a password reset, please ignore this email. Your password will remain unchanged.
Best regards, Best regards,
The MyCrib Team The Casera Team
`, name, code) `, name, code)
return s.SendEmail(to, subject, htmlBody, textBody) return s.SendEmail(to, subject, htmlBody, textBody)
@@ -266,7 +266,7 @@ The MyCrib Team
// SendPasswordChangedEmail sends a password changed confirmation email // SendPasswordChangedEmail sends a password changed confirmation email
func (s *EmailService) SendPasswordChangedEmail(to, firstName string) error { func (s *EmailService) SendPasswordChangedEmail(to, firstName string) error {
subject := "MyCrib - Your Password Has Been Changed" subject := "Casera - Your Password Has Been Changed"
name := firstName name := firstName
if name == "" { if name == "" {
@@ -289,13 +289,13 @@ func (s *EmailService) SendPasswordChangedEmail(to, firstName string) error {
<div class="container"> <div class="container">
<h1>Password Changed</h1> <h1>Password Changed</h1>
<p>Hi %s,</p> <p>Hi %s,</p>
<p>Your MyCrib password was successfully changed on %s.</p> <p>Your Casera password was successfully changed on %s.</p>
<div class="warning"> <div class="warning">
<strong>Didn't make this change?</strong> If you didn't change your password, please contact us immediately at support@mycrib.com or reset your password. <strong>Didn't make this change?</strong> If you didn't change your password, please contact us immediately at support@casera.app or reset your password.
</div> </div>
<p>Best regards,<br>The MyCrib Team</p> <p>Best regards,<br>The Casera Team</p>
<div class="footer"> <div class="footer">
<p>&copy; %d MyCrib. All rights reserved.</p> <p>&copy; %d Casera. All rights reserved.</p>
</div> </div>
</div> </div>
</body> </body>
@@ -307,12 +307,12 @@ Password Changed
Hi %s, Hi %s,
Your MyCrib password was successfully changed on %s. Your Casera password was successfully changed on %s.
DIDN'T MAKE THIS CHANGE? If you didn't change your password, please contact us immediately at support@mycrib.com or reset your password. DIDN'T MAKE THIS CHANGE? If you didn't change your password, please contact us immediately at support@casera.app or reset your password.
Best regards, Best regards,
The MyCrib Team The Casera Team
`, name, time.Now().UTC().Format("January 2, 2006 at 3:04 PM UTC")) `, name, time.Now().UTC().Format("January 2, 2006 at 3:04 PM UTC"))
return s.SendEmail(to, subject, htmlBody, textBody) return s.SendEmail(to, subject, htmlBody, textBody)
@@ -320,7 +320,7 @@ The MyCrib Team
// SendTaskCompletedEmail sends an email notification when a task is completed // SendTaskCompletedEmail sends an email notification when a task is completed
func (s *EmailService) SendTaskCompletedEmail(to, recipientName, taskTitle, completedByName, residenceName string) error { func (s *EmailService) SendTaskCompletedEmail(to, recipientName, taskTitle, completedByName, residenceName string) error {
subject := fmt.Sprintf("MyCrib - Task Completed: %s", taskTitle) subject := fmt.Sprintf("Casera - Task Completed: %s", taskTitle)
name := recipientName name := recipientName
if name == "" { if name == "" {
@@ -353,9 +353,9 @@ func (s *EmailService) SendTaskCompletedEmail(to, recipientName, taskTitle, comp
<p class="task-title">%s</p> <p class="task-title">%s</p>
<p class="task-meta">Completed by: %s<br>Completed on: %s</p> <p class="task-meta">Completed by: %s<br>Completed on: %s</p>
</div> </div>
<p>Best regards,<br>The MyCrib Team</p> <p>Best regards,<br>The Casera Team</p>
<div class="footer"> <div class="footer">
<p>&copy; %d MyCrib. All rights reserved.</p> <p>&copy; %d Casera. All rights reserved.</p>
</div> </div>
</div> </div>
</body> </body>
@@ -374,7 +374,7 @@ Completed by: %s
Completed on: %s Completed on: %s
Best regards, Best regards,
The MyCrib Team The Casera Team
`, name, residenceName, taskTitle, completedByName, time.Now().UTC().Format("January 2, 2006 at 3:04 PM")) `, name, residenceName, taskTitle, completedByName, time.Now().UTC().Format("January 2, 2006 at 3:04 PM"))
return s.SendEmail(to, subject, htmlBody, textBody) return s.SendEmail(to, subject, htmlBody, textBody)
@@ -382,7 +382,7 @@ The MyCrib Team
// SendTasksReportEmail sends a tasks report email with PDF attachment // SendTasksReportEmail sends a tasks report email with PDF attachment
func (s *EmailService) SendTasksReportEmail(to, recipientName, residenceName string, totalTasks, completed, pending, overdue int, pdfData []byte) error { func (s *EmailService) SendTasksReportEmail(to, recipientName, residenceName string, totalTasks, completed, pending, overdue int, pdfData []byte) error {
subject := fmt.Sprintf("MyCrib - Tasks Report for %s", residenceName) subject := fmt.Sprintf("Casera - Tasks Report for %s", residenceName)
name := recipientName name := recipientName
if name == "" { if name == "" {
@@ -441,9 +441,9 @@ func (s *EmailService) SendTasksReportEmail(to, recipientName, residenceName str
</table> </table>
</div> </div>
<p>Open the attached PDF for the complete list of tasks with details.</p> <p>Open the attached PDF for the complete list of tasks with details.</p>
<p>Best regards,<br>The MyCrib Team</p> <p>Best regards,<br>The Casera Team</p>
<div class="footer"> <div class="footer">
<p>&copy; %d MyCrib. All rights reserved.</p> <p>&copy; %d Casera. All rights reserved.</p>
</div> </div>
</div> </div>
</body> </body>
@@ -466,7 +466,7 @@ Summary:
Open the attached PDF for the complete list of tasks with details. Open the attached PDF for the complete list of tasks with details.
Best regards, Best regards,
The MyCrib Team The Casera Team
`, residenceName, name, residenceName, totalTasks, completed, pending, overdue) `, residenceName, name, residenceName, totalTasks, completed, pending, overdue)
// Create filename with timestamp // Create filename with timestamp

View File

@@ -7,9 +7,9 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/push" "github.com/treytartt/casera-api/internal/push"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
) )
// Notification-related errors // Notification-related errors

View File

@@ -164,7 +164,7 @@ func (s *PDFService) GenerateTasksReportPDF(report *TasksReportResponse) ([]byte
pdf.SetY(-25) pdf.SetY(-25)
pdf.SetFont("Arial", "I", 9) pdf.SetFont("Arial", "I", 9)
pdf.SetTextColor(128, 128, 128) pdf.SetTextColor(128, 128, 128)
pdf.Cell(0, 10, fmt.Sprintf("MyCrib - Tasks Report for %s", report.ResidenceName)) pdf.Cell(0, 10, fmt.Sprintf("Casera - Tasks Report for %s", report.ResidenceName))
pdf.Ln(5) pdf.Ln(5)
pdf.Cell(0, 10, fmt.Sprintf("Generated on %s", time.Now().UTC().Format("2006-01-02 15:04:05 UTC"))) pdf.Cell(0, 10, fmt.Sprintf("Generated on %s", time.Now().UTC().Format("2006-01-02 15:04:05 UTC")))

View File

@@ -6,11 +6,11 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/dto/responses" "github.com/treytartt/casera-api/internal/dto/responses"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
) )
// Common errors // Common errors

View File

@@ -7,10 +7,10 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
"github.com/treytartt/mycrib-api/internal/testutil" "github.com/treytartt/casera-api/internal/testutil"
) )
func setupResidenceService(t *testing.T) (*ResidenceService, *repositories.ResidenceRepository, *repositories.UserRepository) { func setupResidenceService(t *testing.T) (*ResidenceService, *repositories.ResidenceRepository, *repositories.UserRepository) {

View File

@@ -12,7 +12,7 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
) )
// StorageService handles file uploads to local filesystem // StorageService handles file uploads to local filesystem

View File

@@ -6,8 +6,8 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
) )
// Subscription-related errors // Subscription-related errors

View File

@@ -9,10 +9,10 @@ import (
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/dto/responses" "github.com/treytartt/casera-api/internal/dto/responses"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
) )
// Task-related errors // Task-related errors

View File

@@ -8,10 +8,10 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/treytartt/mycrib-api/internal/dto/requests" "github.com/treytartt/casera-api/internal/dto/requests"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
"github.com/treytartt/mycrib-api/internal/testutil" "github.com/treytartt/casera-api/internal/testutil"
) )
func setupTaskService(t *testing.T) (*TaskService, *repositories.TaskRepository, *repositories.ResidenceRepository) { func setupTaskService(t *testing.T) (*TaskService, *repositories.TaskRepository, *repositories.ResidenceRepository) {

View File

@@ -3,8 +3,8 @@ package services
import ( import (
"errors" "errors"
"github.com/treytartt/mycrib-api/internal/dto/responses" "github.com/treytartt/casera-api/internal/dto/responses"
"github.com/treytartt/mycrib-api/internal/repositories" "github.com/treytartt/casera-api/internal/repositories"
) )
var ( var (

View File

@@ -13,7 +13,7 @@ import (
"gorm.io/gorm" "gorm.io/gorm"
"gorm.io/gorm/logger" "gorm.io/gorm/logger"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
) )
// SetupTestDB creates an in-memory SQLite database for testing // SetupTestDB creates an in-memory SQLite database for testing

View File

@@ -8,8 +8,8 @@ import (
"github.com/hibiken/asynq" "github.com/hibiken/asynq"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
"github.com/treytartt/mycrib-api/internal/worker" "github.com/treytartt/casera-api/internal/worker"
) )
// EmailJobHandler handles email-related background jobs // EmailJobHandler handles email-related background jobs

View File

@@ -10,10 +10,10 @@ import (
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gorm.io/gorm" "gorm.io/gorm"
"github.com/treytartt/mycrib-api/internal/config" "github.com/treytartt/casera-api/internal/config"
"github.com/treytartt/mycrib-api/internal/models" "github.com/treytartt/casera-api/internal/models"
"github.com/treytartt/mycrib-api/internal/push" "github.com/treytartt/casera-api/internal/push"
"github.com/treytartt/mycrib-api/internal/services" "github.com/treytartt/casera-api/internal/services"
) )
// Task types // Task types