FreightFolio (Logistics SaaS)
Modular logistics SaaS backend for small carriers - AR/AP modules with per-service migrations, AWS Cognito authentication, and Dockerized PostgreSQL.
Overview
Private, in-development SaaS backend designed for small freight carriers. It provides a modular system to streamline logistics operations through FastAPI services, focusing on load management, invoicing, and secure user authentication via AWS Cognito. Multi-tenant data isolation is designed and planned for an upcoming milestone. Not yet deployed; the source is private, with a public overview repo.
Tech Stack
View more →Challenges & Solutions
Integrating AWS Cognito with tenant-aware RBAC
Needed authentication/authorization with roles and tenant context; JWTs had to carry role + tenant_id and be verified per route.
Solution: Provisioned Cognito user pool & app client; normalized users/roles/tenants in Postgres; added JWT verification middleware and route-level role checks; mapped claims → request context for downstream queries.
Impact: Secure authentication in place: route-level guards, least-privilege access, and auditable user/role changes.
Untangling migration conflicts across services
Shared migrations caused version collisions and broken upgrades when services evolved independently.
Solution: Split into per-service Alembic trees with service-specific version tables; enforced naming/versioning conventions; added CI checks to run forward/backward migrations per service before merge.
Impact: Zero migration conflicts since split; reproducible up/down across services and safer deploys.
Consistent local env across Windows and macOS
Onboarding and troubleshooting differed by OS (paths, shells, env vars, Docker behavior).
Solution: Created OS-aware setup scripts (Windows/mac), `.env` templates, Make/NPM tasks, and Docker Compose profiles; documented one-command boot and added preflight checks.
Impact: Reduced setup time to minutes with identical local parity; fewer ‘works on my machine’ issues.