Overview
Crittr is a full-stack pet health application designed to help users track day-to-day care, surface patterns over time, and better understand their pets' health.
The product combines a Next.js and TypeScript frontend with a FastAPI backend backed by PostgreSQL. It supports multiple authentication flows, including Google OAuth and passwordless email login, and integrates AI-powered insights through server-side OpenAI APIs.
The system is intentionally split into separate frontend and backend repositories, with a containerized API (Docker) deployed to Railway and a frontend deployed to Vercel.
Problem
Pet health information is often scattered across notes, spreadsheets, or multiple apps, making it difficult to track trends or share meaningful insights with vets or caregivers.
Crittr was built to provide a single, structured system for tracking daily care, surfacing patterns, and optionally leveraging AI for summaries without sacrificing clarity or trust.
Key challenges included:
- Modeling users, pets, journal entries, quick logs, reminders, and related entities in a relational database while keeping reads and writes predictable
- Supporting multiple authentication flows (OAuth on the frontend, JWT and magic-link email auth on the backend) without duplicating or fragmenting user state
- Integrating AI in a safe and controlled way (handling latency, errors, and keeping API keys server-side)
- Running the backend consistently across local development and production using Docker, environment variables, and deployment scripts
Goals
The project focused on a few concrete outcomes:
- Support multiple pets per account with clear profiles and navigation
- Make daily logging lightweight so the habit is easy to maintain
- Build a backend that reflects the domain (pets, journals, logs, reminders), not just a thin prototype
- Run in a production environment with real authentication, a relational database, and deployed frontend and backend services
Approach
The system was designed with a clear separation between frontend and backend, connected through an explicit API contract.
On the frontend, Redux Toolkit was used to manage complex UI state across features like journaling, logging, and chat. On the backend, FastAPI handlers were kept lightweight, with SQLAlchemy models handling persistence and Pydantic schemas handling validation and data transfer.
The backend follows a Docker-first workflow to keep local, staging, and production environments as consistent as possible.
Key decisions included:
- Using Next.js (App Router) and TypeScript for structure, scalability, and performance on the frontend
- Using FastAPI, PostgreSQL, and SQLAlchemy to model relational data clearly and support future growth
- Splitting authentication responsibilities: Google OAuth on the frontend and JWT + magic-link flows handled securely on the backend
- Keeping all AI interactions server-side to protect secrets and allow for better error handling and control
- Structuring the backend to be deployable via Docker with environment-driven configuration
Implementation
The frontend handles routing, forms, charts, and chat interactions, while the backend exposes REST-style APIs for users, pets, journal entries, quick logs, reminders, and health checks.
OpenAI-powered features are implemented on the server, ensuring that API keys and model interactions are never exposed to the client.
Highlights:
- Responsive UI designed for both desktop and mobile usage
- Clear separation between frontend (Prisma usage) and backend (SQLAlchemy + migrations) for data handling
- Auth system combining OAuth, JWT sessions, and passwordless email login
- Containerized backend with Docker for consistent development and deployment
- Deployments: Vercel for the frontend and Railway for the backend
Challenges and tradeoffs
Splitting the system into a frontend and backend introduced coordination challenges, particularly around authentication, CORS, and environment configuration across Vercel, Railway, and local Docker setups.
- Balancing feature breadth with the need to ship a stable, maintainable core system
- Managing multiple authentication flows without introducing inconsistent user state
- Handling AI-related tradeoffs, including latency, cost, and failure scenarios
- Ensuring reliable email delivery for magic-link authentication via SMTP
- Keeping the growing data model (pets, journals, logs, reminders) cohesive as the API surface expanded
Outcome
Crittr is a live, production-ready application with authenticated users, persistent relational data, and deployed frontend and backend services.
- A cohesive product experience for journaling, quick logging, reminders, and AI-assisted insights
- A clear separation of frontend and backend systems, each deployable and maintainable independently
- Two public repositories reflecting real-world full-stack architecture and deployment practices
The project provides a strong foundation for further iteration, including deeper testing, analytics, and additional client platforms.
My role
I owned the project end-to-end across both repositories, including system design, API and database modeling, frontend architecture, authentication flows, AI integration, and deployment setup.
This included designing the schema, implementing backend services, configuring Docker environments, integrating OAuth and email-based authentication, and building the frontend user experience.
What I would improve next
If continuing to invest in Crittr, I would prioritize:
- Expanding automated testing (pytest for backend services and end-to-end tests for critical flows like authentication and journaling)
- Improving observability with user-facing metrics and alerting around API errors and AI failures
- Further accessibility and performance optimizations, especially for data-heavy views
- Exploring offline-first or mobile-native experiences to support logging on the go
