Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/J0S3-LEON/pf_pruebasAseguramientoCalid_SDD/llms.txt

Use this file to discover all available pages before exploring further.

Running MindFlow locally without Docker gives you the fastest iteration cycle — hot-reload works for both the NestJS backend and the Next.js frontend, and you can attach a debugger directly to either process. This guide walks you through cloning the monorepo, installing dependencies, configuring environment variables, and starting each application in development mode.

Prerequisites

Before you begin, make sure the following are available on your machine:
  • Node.js 20 or later — the monorepo tooling and both applications require it
  • npm 9 or later — workspace hoisting relies on features added in npm 9
  • A running PostgreSQL instance — local (e.g. via Homebrew, pg_ctl, or a Docker container running separately) or a hosted service such as Neon or Supabase

Getting started

1

Clone the repository

Clone the repository from GitHub and change into the project directory:
git clone https://github.com/J0S3-LEON/pf_pruebasAseguramientoCalid_SDD.git
cd pf_pruebasAseguramientoCalid_SDD
2

Install dependencies

Install all workspace dependencies from the lock file. Running npm ci ensures a clean, reproducible install that matches exactly what is committed:
npm ci
3

Copy and configure environment files

Copy the root-level example file to create your local environment file, then open .env and fill in the required values:
cp .env.example .env
At a minimum you must set the following variables:
VariablePurpose
DATABASE_URLFull PostgreSQL connection string (e.g. postgresql://user:pass@localhost:5432/mindflow)
JWT_SECRETRandom string of at least 32 characters for signing JWTs
FRONTEND_URLCORS origin allowed by the backend — http://localhost:3000 for local development
AI_SERVICE_API_KEYAPI key for the LLM provider if the Task Decomposer feature is enabled
DATABASE_URL must point to a PostgreSQL instance that is already running and reachable before you start the backend.
4

Build the shared package

The @mindflow/shared package contains types and utilities consumed by both the backend and frontend. It must be compiled before either application can start:
npm run build --workspace @mindflow/shared
5

Generate the Prisma client

Generate the type-safe Prisma client from the database schema. This step is required on first setup and any time the Prisma schema changes:
npm run prisma:generate --workspace @mindflow/backend
6

Run database migrations

Apply all pending Prisma migrations to your PostgreSQL instance to create or update the schema:
npm run prisma:migrate:deploy --workspace @mindflow/backend
7

Start the backend (terminal 1)

Start the NestJS development server with hot-reload. Leave this terminal open:
npm run dev --workspace @mindflow/backend
The API will be available at http://localhost:3001/api/v1 (or the port set in PORT).
8

Start the frontend (terminal 2)

In a second terminal, start the Next.js development server:
npm run dev --workspace @mindflow/frontend
The application will be available at http://localhost:3000.

Development scripts

The following scripts are available from the repository root and apply across all workspaces:
CommandDescription
npm run lintRun ESLint across all workspaces
npm run formatApply Prettier formatting across all workspaces
npm testRun the full Jest test suite
npm run test:coverageRun tests and generate a coverage report
npm run prisma:generate --workspace @mindflow/backendRegenerate the Prisma client after any schema change
If you want to populate the database with realistic test data, run the seed script after migrations have been applied:
npm run seed --workspace @mindflow/backend
This is useful for exploring the UI or writing integration tests against a non-empty dataset.

Build docs developers (and LLMs) love