Overview

7 Our minimum viable product

This chapter moves from research spikes to a cohesive Minimum Viable Product that demonstrates real value while enabling validated learning. It clarifies MVP versus adjacent “minimums,” then focuses on integrating prior work into a usable ACH dashboard that lets users upload a file, parse and store it, and visualize results. The emphasis is on assembling, not expanding, functionality—balancing speed with quality, avoiding scope creep, and using the MVP to solicit early feedback that will guide the next iterations.

On the implementation side, the team aligns the FastAPI backend, Postgres schema, and Next.js UI: refining the /files endpoint, enforcing numeric types in the database, and introducing Pydantic response models and better documentation. They add an API for batches using a test-first approach, reconcile snake_case and camelCase across services, and transform raw responses into UI-friendly structures. The dashboard gains a direct file upload flow, while the deployment is hardened with Docker-based configs (CORS tuning, split dev/prod requirements and TypeScript configs, environment variables), basic authentication via NextAuth, optional token checks on the API, and TLS offload through an Nginx reverse proxy. The team also builds a BDD-driven ACH file generator to create targeted, safe test data.

Testing spans unit, BDD-style integration, and end-to-end coverage with Playwright, using accessible selectors and explicit waits for reliable automation. The chapter closes with pragmatic troubleshooting across the stack—CORS misroutes, Pydantic validation mismatches, SQL join pitfalls, selector ambiguity, missing Docker files, exposed ports, and dependency conflicts—cementing practices that keep the MVP stable. With APIs, UI, security, packaging, and tests in place, the MVP is ready to demo, ship for feedback, and evolve quickly in subsequent sprints.

The pieces and parts feeding into the MVP
The sample POST request
Data being returned but displayed incorrectly.
Our API now has documented fields and examples.
Updated component for Recent ACH Uploads
OpenAPI documentation for retrieving ACH batches.
Docker Setup for ACH Dashboard MVP
Our list of defined APIs
Process of adding functionality to our MVP
Login Sample Page
Showing the Authorize Button and Popup
Screen not completely rendered when we do not wait.

Summary

  • Over previous sprints, we explored using Generative AI and technologies like Python/FastAPI, Postgres, Docker, and Next.js to expedite software development for our ACH Dashboard MVP.
  • The MVP focuses on allowing users to upload and parse ACH files, store them in a database, and visualize the results on a dashboard.
  • Different minimum concepts include MVP, MLP, MMP, and MMF, each serving unique purposes from testing assumptions to delivering features.
  • Preparing for an MVP involves integrating components like the ACH parser, APIs, database design, and UI to function cohesively.
  • Developing the /files APIs ensures alignment between the backend and UI, focusing on data accuracy and seamless functionality.
  • BDD and TDD approaches help integrate APIs with the UI, ensuring accurate data responses and interactions.
  • Refactoring interfaces and schemas improves code maintainability, readability, and flexibility when consuming APIs.
  • Supporting ACH Batches API integration into the dashboard requires updating data structures and transforming responses to match UI needs.
  • Upload functionality from the dashboard simplifies user interaction, but highlights development considerations, like code duplication and user feedback upon file upload.
  • Deployment in Docker involves cleaning up configurations for production readiness, ensuring seamless communication between containers, and addressing common troubleshooting issues.

FAQ

What is an MVP and how does it differ from MLP, MMP, and MMF?An MVP (Minimum Viable Product) is the smallest version of a product that lets the team collect maximum validated learning about customers with the least effort. MLP (Minimum Lovable Product) emphasizes delight and emotional connection; MMP (Minimum Marketable Product) focuses on the smallest sellable product; MMF (Minimum Marketable Feature) is a single valuable feature that can be marketed. MVP prioritizes testing assumptions, evidence-based learning, and short-term achievability.
What functionality is included in the ACH Dashboard MVP?The MVP enables users to upload an ACH file, parse and store it in Postgres, and visualize results in the dashboard. It focuses on integrating previously built components rather than adding many new features, so “nice-to-have” items are intentionally deferred to avoid scope creep.
How are the major components integrated for the MVP?The stack combines a Python ACH parser, FastAPI backend (with OpenAPI docs), a Postgres database, and a Next.js UI. Everything is orchestrated in Docker for local runs. CloudBeaver is included for DB exploration during development, but not required for the product itself.
How were NaN values in the dashboard resolved?NaNs surfaced due to API/UI field mismatches and types. Fixes included: returning credit/debit totals in the /files API; changing amount columns to NUMERIC in Postgres; parsing currency safely with Python’s Decimal; defining Pydantic response models (with constraints/docs); and mapping snake_case fields (API) to camelCase in the Next.js UI via a transform step.
How were the /files and /files/{id}/batches APIs built and documented?/files returns file metadata and totals using a SQL query joining file and control records; response is modeled with a Pydantic AchFilesResponse (with field titles, descriptions, examples). /files/{file_id}/batches returns batch data (AchBatchesResponse) aligned to ACH batch control fields (e.g., entry_addenda_count, credit/debit totals). OpenAPI auto-docs show fields, examples, and enable manual testing.
How does the dashboard consume APIs and handle file uploads?The UI defines separate interfaces for API responses and internal models, then transforms responses (snake_case to camelCase) and uses Decimal.js for precise math. Batches are grouped per company with a small transformation utility. Uploads are handled centrally (FormData + axios POST to /files), supporting drag-and-drop and a button-triggered file chooser, with simple loading state and a redirect back to the dashboard.
How is testing done (API BDD, synthetic ACH files, and end-to-end)?API behavior is specified with pytest-bdd Given/When/Then scenarios that parse files and validate the /files results. Synthetic ACH files are generated via BDD-style steps (e.g., number of batches/entries, service class, amounts), enabling flexible test data. End-to-end UI flows use Playwright: get_by_role selectors (ARIA-friendly), explicit waits (e.g., wait_for_selector), screenshots for debugging, and headless or interactive modes.
How is authentication added, and how could the API be protected?The UI uses NextAuth.js with a credentials provider to gate the uploads page (/uploads) and redirect unauthenticated users to /login. To protect the backend, include an Authorization header (e.g., Bearer token) in UI requests and validate it in FastAPI (dependency that verifies the token). OpenAPI’s “Authorize” button can be used to test secured endpoints during development.
How is the MVP run in Docker, and how are CORS and TLS handled?Docker Compose builds API, DB, and dashboard containers; the dashboard is configured with NEXT_PUBLIC_API_URL. CORS in FastAPI allows only expected origins and methods (e.g., GET/POST from http://localhost:4000). For TLS, an Nginx container terminates HTTPS with a self-signed cert, proxies traffic to the dashboard, and redirects HTTP (80) to HTTPS (443).
What common issues were encountered and how were they troubleshot?- CORS failures: ensure origin and methods match, and that the correct container is serving requests. - Pydantic errors: field name/type mismatches (e.g., missing fields, Decimal vs string). - Numeric conversions: ensure cents parsing; prefer Decimal and NUMERIC. - SQL joins: use LEFT JOIN where rows should be kept without child records. - Playwright selectors: add stable names/ids or use get_by_role. - Docker: expose needed ports (e.g., 443), avoid stale files, align Next.js dynamic paths, and resolve dependency version conflicts (e.g., starlette vs fastapi).

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Build Financial Software with Generative AI (From Scratch) ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Build Financial Software with Generative AI (From Scratch) ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Build Financial Software with Generative AI (From Scratch) ebook for free