Role
Engineering exercise
Architecture, testing, refactoring
A full-stack invoice and customer management application built to explore the technical concerns tutorials skip: ORM migration, robust testing, architectural refactoring, accessibility, and modern React 19 patterns.
Role
Engineering exercise
Architecture, testing, refactoring
Type
Live case-study demo
Full-stack invoice/customer app
Status
Live, source available
External app, public source
Stack
Next.js + Drizzle
React 19, TypeScript, Auth.js
Evidence
75 tests, ORM migration
Server Actions, React 19 patterns
License
MIT
Open-source exercise project
Demo Route Map
The application features essential business flows, built with accessibility, type-safety, and validation at every boundary.
Credential-based authentication using Auth.js. Edge middleware protects dashboard routes.
Route: /loginOverview with revenue chart, summary cards, and latest invoices fetched via Drizzle ORM.
Route: /dashboardFull CRUD for invoices with search, pagination, and server-side validation using Zod.
Route: /dashboard/invoicesCustomer management workflow, replacing the original tutorial read-only view with full CRUD.
Route: /dashboard/customersEngineering Focus
Beyond the tutorial foundation, this repository represents independent work to solve architectural, testing, and structural challenges in modern web apps.
# Compile-time schema enforcement
Expect> // Ensures types stay in sync with DB Replaced raw SQL with Drizzle ORM. Schema and types are co-derived and verified at compile time.
75 tests validating form interaction, async submission, pending UI states, and accessibility.
Utilized useActionState for form state, useFormStatus for pending UI, and Server Actions for mutations.
25+ reusable components and 3 custom hooks consumed by both invoices and customers workflows.
Cookie-based flash notification system ensuring exactly one toast per mutation.
ARIA live regions, keyboard-navigable dialogs, screen-reader labels, and semantic navigation.
Architecture
Data fetches are performed directly on the server via Drizzle. Mutations flow exclusively through Zod-validated Server Actions, leveraging React 19 features to manage pending states and form lifecycle without third-party state managers.
Authentication leverages Next.js middleware at the edge to protect routes, only spinning up the Node.js runtime when checking credentials against the database.
Browser
-> Middleware (Edge Auth)
-> Server Components (Read)
-> Drizzle ORM (PostgreSQL)
Form Submit
-> Server Actions (Mutation)
-> Zod Validation
-> DB Write + Flash Cookies
-> Redirect to View Source Evidence
The repository provides concrete examples of how to test asynchronous UI, implement cookie-based flash notifications, and ensure type safety across the stack.
Architecture
Source
app/lib/actions/*
export async function createInvoice(
prevState: State,
formData: FormData
) {
// Validate with Zod before DB access
// Write to DB via Drizzle
// Set flash cookies for notifications
// Redirect on success
} Takeaway
Shows a resilient mutation pattern replacing manual fetch calls with React 19 Server Actions.
Testing
Source
tests/components/*
// Test suite execution
pnpm test
pnpm test:coverage
75 tests across 10 files
Coverage: ~85% across metrics Takeaway
Demonstrates ability to test complex interactive UI including toasts, dialogs, and pending states.
Security
Source
auth.config.ts, auth.ts
auth.config.ts (Edge):
// Gates every request
// Redirects unauthenticated
auth.ts (Node):
// Validates credentials
// Queries DB via bcrypt Takeaway
Edge middleware ensures the database stays out of the request path for unauthenticated visitors.
Boundaries
AcmeDashboard exists to demonstrate engineering practices, testing strategies, and modern architecture. It is not intended as a production application.
Demo status
Live public demo with demo credentials. The app is intended for inspection, walkthroughs, teaching, and portfolio review.
Not for production
This is a technical demonstration and should not be used to process real invoices or handle sensitive business data.
I'm always open to interesting work. Say hello.
Independent software studio. Open source.