Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Zapiony/PUCE_UZDI_2026/llms.txt

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

UZDI is a full-stack web platform built with Vue 3 (Vite) on the frontend and NestJS on the backend, backed by a PostgreSQL database. This page walks you through every step needed to get both applications running on your local machine so you can develop and test changes against a real database.

Prerequisites

Before you begin, make sure the following tools are installed and available on your PATH:
ToolMinimum versionNotes
Node.js18.xLTS recommended; required by both projects
npm9.xBundled with Node.js 18
PostgreSQL14.xMust be running and accessible locally
GitAny recentFor cloning the repository

Step-by-step Setup

1

Clone the repository

git clone <repository-url>
cd PUCE_UZDI_2026
The repository contains two application directories at the root level: UZDI_FRONT (Vue 3) and UZDI_BACK (NestJS). Each has its own package.json and must be installed separately.
2

Install frontend dependencies

cd UZDI_FRONT
npm install
This installs Vue 3.5, Vite 8, TypeScript 6, axios, @lucide/vue, and all other frontend dependencies declared in UZDI_FRONT/package.json.
3

Install backend dependencies

cd ../UZDI_BACK
npm install
This installs NestJS 11, TypeORM, pg, bcrypt, class-validator, dompurify, and all other backend dependencies declared in UZDI_BACK/package.json.
4

Initialize the PostgreSQL database

Create the database and apply the full schema using the DDL script included in the repository root. See the Database page for detailed instructions and a schema reference.
# Quick reference — full details on the Database page
psql -U postgres -c "CREATE DATABASE uzdi_db;"
psql -U postgres -d uzdi_db -f DDL_UZDI_FINAL.sql
5

Create UZDI_BACK/.env

Create a .env file inside the UZDI_BACK directory. This file is loaded by @nestjs/config at startup.
DATABASE_URL=postgresql://postgres:yourpassword@localhost:5432/uzdi_db
PORT=3000
PORT is optional and defaults to 3000 if omitted. See the Environment Variables page for the full reference.
6

Create UZDI_FRONT/.env (or .env.local)

Create a .env or .env.local file inside the UZDI_FRONT directory. Vite only exposes variables prefixed with VITE_ to client-side code.
VITE_API_BASE_URL=http://localhost:3000
The api.ts service reads this value to construct the base URL for all axios requests: ${import.meta.env.VITE_API_BASE_URL}/api/v1.
7

Start the backend

From UZDI_BACK, run the development server with watch mode enabled:
cd UZDI_BACK
npm run start:dev
NestJS will compile and start on http://localhost:3000. The --watch flag restarts automatically on file changes. You should see:
[NestFactory] Starting Nest application...
[InstanceLoader] AppModule dependencies initialized
[NestApplication] Nest application successfully started
Listening on port 3000
8

Start the frontend

From UZDI_FRONT, in a separate terminal tab, start the Vite dev server:
cd UZDI_FRONT
npm run dev
Vite will start the HMR development server on http://localhost:5174. Open that URL in your browser to access the application.
Run both servers simultaneously in two separate terminal tabs — one in UZDI_BACK running npm run start:dev, and one in UZDI_FRONT running npm run dev. Hot-module replacement (Vite) and watch mode (NestJS) will both pick up your file changes automatically without needing restarts.

Backend Scripts (UZDI_BACK)

All scripts are defined in UZDI_BACK/package.json and run via npm run <script>.
ScriptCommandDescription
startnest startCompile and start — no file watching
start:devnest start --watchDevelopment mode — recompiles on file changes (HMR)
start:debugnest start --debug --watchWatch mode with Node.js debugger on default port 9229
start:prodnode dist/mainRun the pre-compiled production build from dist/
buildnest buildCompile TypeScript to dist/ using the NestJS CLI
testjestRun all unit tests (*.spec.ts) via Jest
test:e2ejest --config ./test/jest-e2e.jsonRun end-to-end tests using the dedicated Jest config
linteslint "{src,apps,libs,test}/**/*.ts" --fixLint and auto-fix TypeScript files
formatprettier --write "src/**/*.ts" "test/**/*.ts"Format all TypeScript files with Prettier

Frontend Scripts (UZDI_FRONT)

All scripts are defined in UZDI_FRONT/package.json and run via npm run <script>.
ScriptCommandDescription
devviteStart the Vite HMR dev server on port 5174
buildvue-tsc -b && vite buildType-check with vue-tsc, then bundle for production
previewvite previewServe the production build locally for verification

CORS Configuration

The NestJS bootstrap in main.ts explicitly allows requests from the Vite dev server origin:
app.enableCors({
  origin: 'http://localhost:5174',
  methods: ['GET', 'POST', 'PATCH', 'PUT', 'DELETE', 'OPTIONS'],
  allowedHeaders: ['Content-Type', 'Authorization'],
  credentials: true,
});
If you change the Vite dev server port (via vite.config.ts), you must update the origin value in main.ts to match, otherwise all browser requests will be blocked by CORS policy. For production deployments, the origin must be updated to the deployed frontend domain.

Build docs developers (and LLMs) love