Serves a self-contained JavaScript widget at /embed/pets.js that renders available pets in a Shadow DOM grid. Supports data attributes for limit, species, columns, and theme. CORS-enabled for embedding on partner sites.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Seeds a complete, realistic demo tenant for Sunny Paws Rescue with 28 pets, 6 foster users, medical records, applications, donations, events, happy tails, content blocks, and more. Run with DATABASE_URL=... npx tsx scripts/seed-demo.ts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace serial() with int().autoincrement() for MariaDB compatibility
- Expose DB port 3306 in docker-compose for local dev tooling
- Remove drizzle/ COPY from Dockerfile (using push, not migrations)
- Fix StatsCounter props mismatch on home page
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Full rescue management platform with public site, admin dashboard,
foster portal, setup wizard, CSV import, Docker deployment, and
config-driven theming with i18n-ready architecture.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove scaffolded +page.svelte that conflicted with (public) route group
- Change PET_FIELDS from export to local const (SvelteKit disallows)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- GET /api/health — liveness probe returning status + timestamp
- POST /api/newsletter — subscribe with onDuplicateKeyUpdate
- POST /api/stripe-webhook — handles checkout.session.completed for
adoption fees and donations; verifies signature via constructWebhookEvent
- GET /api/worker/jobs — fetch next pending AI job (Bearer token auth)
- POST /api/worker/jobs/[id] — report job completion or failure
- GET /robots.txt — disallows admin/foster/api/login/setup paths
- GET /sitemap.xml — static pages + all published available pet pages
- +error.svelte — friendly error page with status-appropriate messaging
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two-step flow: upload CSV, auto-detect and map columns, preview first 5
rows, then import. Auto-detects common column names (name, species,
breed, age, sex, etc.). Generates unique slugs from pet names, handles
duplicates within the batch and against existing records. Reports
imported count, skipped rows, and per-row errors. Requires 'import'
permission.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Accessible only by sysadmin when setupComplete is false. Steps cover
org info, branding (color pickers + logo upload), application form
toggles, Stripe integration keys, and a link to CSV import. Each step
saves to org_config via upsert and calls invalidateConfigCache().
Completing the wizard sets setup_complete = true and redirects to /admin.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fosters can view their current animals (with photos), submit updates
(note/photo/update types with optional photo upload), and request
supplies with urgency levels. Staff is notified via email on each
submission. Layout uses orgConfig branding and CSS custom properties.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces PawPrint branding with FosterFlow throughout. Adds Docker quick start (docker compose up + seed commands), manual quick start, and a self-hosted vs FosterFlow Cloud comparison table. Removes emoji from feature list for cleaner rendering.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds playwright.config.ts pointing at tests/e2e/ with a 15s timeout and dev server reuse. Stubs two test files: public-pages (home, pets, login load checks) and admin-guard (unauthenticated /admin and /foster redirect to /login). Installs @playwright/test as a dev dependency.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Multi-stage Dockerfile builds SvelteKit then runs a lean production image. docker-compose.yml wires up MariaDB with health checks, the app, and Caddy for TLS termination. Caddyfile uses SITE_DOMAIN env var with localhost fallback.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds scripts/seed.ts for fresh self-hosted installs, scripts/seed-tenant.ts for cloud provisioner use, and scripts/ai-worker.ts adapted from AHCR with improved theme prompts, name filtering, and WORKER_API_KEY guard. Installs tsx as a dev dependency.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Key metrics dashboard, page view traffic analysis, foster submission moderation,
foster assignment management, active foster dashboard with supply requests, and
system settings/org config editor with full audit log.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Full CRUD for vets, sponsors, mentors, volunteer applications, and users.
Includes approve/deny flows for pending users, role management, and password reset.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pet layout: tabbed nav with counts for photos/medical/fosters, status
badge in header. Detail overview: summary cards and compatibility grid.
Profile: full edit form including adoption info conditional on status,
audit logged. Photos: upload, set primary (star toggle), delete, reorder
with prev/next arrows. Medical: add/delete records grouped by date,
cost stored as cents. Fosters: assign by user account (linked to
foster-role users), set current, delete, audit logged throughout.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pet list: search by name/breed/microchip, filter by status/species,
sort columns, pagination, delete with confirm modal. New pet form:
full fields including photos with drag-and-drop preview. Quick intake:
mobile-optimized form with camera/gallery photo capture, toggles for
species/sex, sets intake date to today.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sidebar with permission-filtered nav, mobile hamburger, org name from
config, logout button. Dashboard loads pet/application/foster/donation
stats and recent audit log activity.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All pages use config-driven org info via data.orgConfig — no hardcoded
org names, emails, or external URLs. Stripe donate page gracefully falls
back to a contact CTA when STRIPE_SECRET_KEY is not configured.
RateLimiter applied to contact form and happy tails submission.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Client-side generator page with species (dog/cat) and theme selectors
submits a job to /api/pet-names POST, then polls GET until completed.
API uses nameGeneratorLimiter for rate limiting and delegates to
queueNameGenerationJob/getJobStatus from lib/server/ai.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each form checks orgConfig.applications to verify the type is enabled,
validates required fields, inserts into the applications table, and
sends email notification via sendApplicationNotification. Adoption form
supports optional pet pre-selection via ?pet=slug query param. Surrender
form auto-creates a pet record from submitted data.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- About, adoption process, become a foster, how to help, volunteer, why adopt pages
- All org name/email/contact info driven by data.orgConfig
- Foster resources page with optional FOSTER_RESOURCES_PASSWORD password gate
- Content blocks loaded from DB with sensible generic fallback text
- Application links conditionally shown based on orgConfig.applications flags
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Home page loads featured pets, upcoming events, content blocks, and stats
- Pets listing page with search/filter by species and sex, infinite scroll
- Pet detail page with photo gallery/lightbox, compatibility badges, and related pets
- /api/pets GET endpoint for infinite scroll pagination
- All schema adapted for pawprint (url, startDate, published, etc.)
- All org name references driven by data.orgConfig.orgInfo.name
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Initializes SvelteKit 2 + Svelte 5 project with adapter-node, Tailwind CSS 4,
Drizzle ORM (MySQL), Stripe, Nodemailer, and argon2 dependencies. Configures
app.html with PWA meta tags, app.css with brand color tokens, and manifest.json.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
45 tasks across 9 phases covering foundation, server modules, UI,
public routes, admin dashboard, foster portal, setup wizard, API,
deployment, and testing. Full TDD approach with AHCR as reference.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comprehensive design for the multi-tenant rescue management SaaS,
covering architecture, data model, tenant lifecycle, roles, features,
tech details, testing, and deployment. Clean room rebuild from AHCR.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
README, multi-tenant SaaS architecture (database-per-tenant),
automated onboarding flow (signup → 60 seconds → live site),
and template extraction plan from AHCR codebase.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>