#MRR-Growth-Analytics-Dashboard
A lightweight MRR and SaaS analytics dashboard built for indie developers and solo founders. MetricMint provides a clean interface for tracking monthly recurring revenue, customer growth, churn, refunds, and other key business metrics without the complexity of enterprise analytics platforms.
##Overview
MRR-Growth-Analytics-Dashboard is a full-stack TypeScript application designed with a monorepo architecture. The frontend and backend are developed independently while sharing common database models and API specifications, making the project easier to maintain and extend.
The application focuses on a single workspace where users can:
Track Monthly Recurring Revenue (MRR) Monitor customer acquisition and churn Visualize revenue trends with interactive charts Configure business growth targets View automatically calculated SaaS KPIs Technology Stack Frontend React 19 Vite TypeScript Tailwind CSS v4 shadcn/ui Framer Motion Recharts
##The frontend is implemented as a responsive single-page application optimized for fast page loads and smooth interactions.
Backend Node.js Express 5 TypeScript PostgreSQL Drizzle ORM Zod v4 drizzle-zod
##The backend exposes a REST API responsible for validation, business logic, KPI calculations, and database access.
Development Environment pnpm Workspaces Shared TypeScript configuration OpenAPI Specification Monorepo architecture Repository Structure metricmint/ ├── artifacts/ │ ├── api-server/ │ └── metricmint/ │ ├── lib/ │ ├── api-spec/ │ └── db/ │ ├── package.json ├── pnpm-workspace.yaml ├── tsconfig.base.json ├── tsconfig.json └── seed.sql artifacts/api-server
##Contains the Express API responsible for:
Business logic KPI calculations Validation Database operations
Runs on:
API base path:
/api artifacts/metricmint
Contains the React frontend served by Vite.
Runs on:
During development, API requests are automatically proxied to the backend, allowing the frontend to communicate using relative /api routes.
lib/api-spec
Shared OpenAPI 3.1 specification used to document backend endpoints and maintain consistency between frontend and backend development.
lib/db
##Shared database package containing:
Drizzle configuration Database client Schema definitions Shared models Prerequisites
##Before running the project, install:
Node.js 18 or newer pnpm PostgreSQL
A hosted PostgreSQL instance such as Railway, Supabase, Neon, or a local installation can be used.
Environment Configuration
Create a .env file in the project root.
##Example:
Do not commit this file to version control.
Local Development
Install project dependencies:
pnpm install
Start only the backend:
pnpm --filter metricmint-api dev
Start only the frontend:
pnpm --filter metricmint-app dev
Run both services simultaneously:
pnpm dev
Once both services are running:
Frontend:
Backend:
http://localhost:8080/api Database Initialization
MRR-Growth-Analytics-Dashboard requires a PostgreSQL database.
After creating the database, execute the provided seed script:
\i seed.sql
The seed script:
Creates the required tables Inserts application settings Generates twelve months of sample business metrics
##This allows the dashboard to display realistic data immediately after setup.
Available Workspace Commands Command Description pnpm dev Start frontend and backend concurrently pnpm dev:api Start the API server pnpm dev:web Start the React application pnpm build Build every workspace package pnpm start Launch the production API REST API
##All endpoints are available under:
/api Health GET /healthz
Returns the application health status.
Metrics GET /metrics POST /metrics PATCH /metrics/:id DELETE /metrics/:id
Supports full CRUD operations for monthly business metrics.
Settings GET /settings PUT /settings
Stores application configuration such as the target MRR goal.
Summary GET /summary
Calculates business KPIs dynamically using stored metric data.
Returned values include:
Net MRR Growth Rate Churn Rate Average Revenue Per User (ARPU) Database Design metrics
Stores monthly SaaS performance metrics.
Column Description id Primary key month YYYY-MM new_mrr Newly generated recurring revenue churned_mrr Lost recurring revenue new_customers Newly acquired customers churned_customers Lost customers refunds Refunded revenue created_at Record creation timestamp settings
Stores application-wide configuration.
Column Description id Primary key mrr_goal Target monthly recurring revenue
A single row is maintained for application settings.
Application Workflow
The frontend communicates with the backend exclusively through REST APIs.
Typical request flow:
React UI │ ▼ Express REST API │ ▼ Business Logic │ ▼ Drizzle ORM │ ▼ PostgreSQL
Summary metrics displayed on the dashboard are computed by the backend rather than stored directly in the database, ensuring calculations remain consistent as data changes.
#Extending the Project
The current implementation is intentionally lightweight, making it a solid foundation for additional functionality.
##Possible enhancements include:
User authentication Multi-tenant workspace support Subscription billing integration CSV import and export Scheduled reporting Email notifications Financial forecasting Dashboard customization Team collaboration Audit logging Production Deployment
##Build the application:
pnpm build
Ensure the production environment provides a valid DATABASE_URL.
Start the API server:
pnpm --filter metricmint-api start
The frontend can be deployed independently using platforms such as Vercel, while the backend can be hosted on Railway, Render, Fly.io, or any Node.js-compatible infrastructure.
Released under the MIT License.