Monorepo for a business analytics dashboard: goals, centralized data ingestion, and recurring metric reviews for owners and analysts.
Product areas:
- Goal tracking
- Financial health
- SEO performance
- Data import and refresh
| Layer | Technologies |
|---|---|
| API | NestJS, Prisma, PostgreSQL |
| Client | React, Vite, Tailwind CSS, Redux Toolkit, React Router |
| Shared | packages/contracts |
| Production | Railway for API and database; frontend static hosting as you prefer |
insights/
├── apps/
│ ├── backend/ # NestJS, Prisma, REST API (/api/v1/...)
│ └── frontend/ # SPA (Vite + React)
├── packages/
│ └── contracts/ # Shared types and contracts
├── package.json # npm workspaces, root scripts
└── README.md
Server-specific notes: apps/backend/README.md.
API contracts: shared TypeScript types for the HTTP layer (including ApiResponse<T> and ApiErrorResponse) and domain payloads live in packages/contracts. Both apps depend on the workspace package @insights/contracts.
- Node.js (LTS) and npm
- Docker for local PostgreSQL (Compose)
npm installSee apps/backend/.env.example for backend and Docker Compose variables. Copy it to apps/backend/.env.dev.
See apps/frontend/.env.example for the SPA. Copy it to apps/frontend/.env.
From the repository root:
npm run dev:up --workspace @insights/backendRun Prisma migrations (and seeds if needed) using the backend workspace — see apps/backend/README.md.
npm run devOr separately:
npm run backend:dev
npm run frontend:devnpm run backend:build
npm run frontend:buildProduction target is Railway: managed PostgreSQL, a Node service for Nest (build, prisma migrate deploy on start, env vars from Railway). A separate step-by-step guide can be added later.
UNLICENSED (private).