Skip to content

Vyachowski/insights

Repository files navigation

Insights

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

Stack

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

Repository layout

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.

Requirements

  • Node.js (LTS) and npm
  • Docker for local PostgreSQL (Compose)

Local development

1. Install dependencies

npm install

2. Environment variables

See 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.

3. Database

From the repository root:

npm run dev:up --workspace @insights/backend

Run Prisma migrations (and seeds if needed) using the backend workspace — see apps/backend/README.md.

4. Run backend and frontend

npm run dev

Or separately:

npm run backend:dev
npm run frontend:dev

Build

npm run backend:build
npm run frontend:build

Deployment (Railway)

Production 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.

License

UNLICENSED (private).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors