Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/juescoryisus/QualityDocD/llms.txt

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

QualityDocD ships as a set of Docker Compose files that bring up seven containers — three databases and four application services — with a single command. This guide walks you from a fresh clone to a running stack with seeded test users, a working browser UI, and a verified API call. The entire process takes under five minutes on a machine with Docker Desktop already installed.

Prerequisites

Before you begin, make sure you have the following installed and running:
  • Docker Desktop (Windows or macOS) or Docker Engine + Docker Compose v2 (Linux). All containers run on Docker’s bridge network, so no other local database installs are needed.
  • PowerShell 7+ on Windows if you want to use the setup.ps1 convenience script. On Linux and macOS you can use the Docker CLI directly.
  • Git to clone the repository.
  • At least 4 GB of free RAM for Docker — SQL Server 2022 Express requires a minimum of 2 GB on its own.
The setup script (setup.ps1) is Windows-only. Linux and macOS users should follow the manual Docker CLI commands shown in each step below.

Setup Steps

1

Clone the repository and create your environment file

Clone the QualityDocD repository and copy the example environment file to .env. The .env file contains database passwords and secrets used by all compose files.
git clone https://github.com/juescoryisus/QualityDocD.git
cd QualityDocD
cp .env.example .env
The default .env.example values are safe for local development. Before deploying to any shared environment, open .env and change the passwords and the SESSION_SECRET / API_JWT_SECRET values to strong, unique strings.
The key values to review in .env before going to production: SQLSERVER_SA_PASSWORD, PG_PASSWORD, MONGO_PASSWORD, SESSION_SECRET, and API_JWT_SECRET. All default values are intentionally visible in the example file and must be rotated for production use.
2

Start all services

QualityDocD uses three compose files: docker-compose.infra.yml (databases), docker-compose.apps.yml (.NET app, Node.js API, search service), and docker-compose.portal.yml (PHP portal). The setup.ps1 script runs all three in the correct order.
.\setup.ps1 -Mode All
The script also accepts targeted modes if you only need part of the stack:
.\setup.ps1 -Mode Infra    # Databases only
.\setup.ps1 -Mode Apps     # .NET + Node.js API + Search Service only
.\setup.ps1 -Mode Portal   # PHP Portal only
To wipe all data volumes and start fresh, add the -ResetData flag:
.\setup.ps1 -Mode All -ResetData
3

Wait for health checks to pass

The databases take 20–60 seconds to initialize. The setup script polls each container’s health status and prints a checkmark when each database is ready. If you started the stack manually, you can check container health yourself:
docker compose -f docker-compose.infra.yml ps
Wait until qualitydoc_sqlserver, qualitydoc_postgres, and qualitydoc_mongodb all show a healthy status before proceeding. The application containers will restart automatically once the databases are ready.The three compose files and what they manage:
Compose FileContainers Started
docker-compose.infra.ymlSQL Server 2022, PostgreSQL 16, MongoDB 7
docker-compose.apps.yml.NET MVC app, Node.js API, Search Microservice
docker-compose.portal.ymlPHP Portal
All containers attach to the qualitydoc_net bridge network, which is created by docker-compose.infra.yml and declared as external in the other two files.
4

Open the .NET application and log in

Once the stack is running, open your browser and navigate to the .NET application:http://localhost:5001Log in with the seeded administrator account:
UsernamePassword
adminAdmin123!
You will land on the document management dashboard. The .NET app seeds the following test users on first startup if the Users table is empty:
UsernamePasswordRoleDepartment
adminAdmin123!AdminTI
gerenteGerente123!ManagerCalidad
revisor1Revisor123!ReviewerProducción
revisor2Revisor123!ReviewerCalidad
editorEditor123!EditorOperaciones
These users are seeded into SQL Server by the .NET application at startup. They are separate from any users you create in the Node.js API, which stores its own user table in PostgreSQL.
5

Get a JWT from the Node.js API

The Node.js API uses JWT authentication. To call any protected endpoint, first obtain a token by posting to POST /api/auth/login with a company slug, email, and password. You’ll need to create a company and user in the Node.js API first (it has its own user store in PostgreSQL, separate from the .NET app’s SQL Server users).Create a company, register a user, then log in:
# 1. Create a company
curl -s -X POST http://localhost:5000/api/companies \
  -H "Content-Type: application/json" \
  -d '{"name":"My Company","slug":"my-company"}'

# 2. Create an admin user (replace companyId with the id returned above)
curl -s -X POST http://localhost:5000/api/users \
  -H "Content-Type: application/json" \
  -d '{"companyId":1,"name":"Admin","email":"admin@my-company.com","password":"Admin123!","role":"COMPANY_ADMIN"}'

# 3. Log in to get a JWT
curl -s -X POST http://localhost:5000/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"admin@my-company.com","password":"Admin123!","companySlug":"my-company"}'
The login response includes a token field. Copy that value — you’ll use it as a Bearer token in subsequent requests.
6

Make your first API call

With a JWT in hand, list your company’s documents:
curl -s http://localhost:5000/api/documents \
  -H "Authorization: Bearer <your-token>"
The response will be an array of document objects scoped to your company. Create a document to populate it:
curl -s -X POST http://localhost:5000/api/documents \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-token>" \
  -d '{"title":"Quality Manual ISO 9001","format":"pdf","contentText":"Quality policy of the organization"}'

Service URLs at a Glance

ServiceURLDescription
.NET MVC Apphttp://localhost:5001Main document management UI
Node.js REST APIhttp://localhost:5000Programmatic API (JWT auth)
Search Microservicehttp://localhost:3001Full-text search and indexing
PHP Portalhttp://localhost:8080Read-only audit dashboard
SQL Serverlocalhost:1433Primary document database
PostgreSQLlocalhost:5432Audit log and Node.js API data
MongoDBlocalhost:27017Document metadata and full-text index

Useful Management Commands

Check the status and logs of each layer of the stack at any time:
# Check container status per compose file
docker compose -f docker-compose.infra.yml  ps
docker compose -f docker-compose.apps.yml   ps
docker compose -f docker-compose.portal.yml ps

# Tail logs
docker compose -f docker-compose.infra.yml  logs -f
docker compose -f docker-compose.apps.yml   logs -f
docker compose -f docker-compose.portal.yml logs -f
The .env file is your single control point for all passwords, database names, and secrets. When moving from local development to a staging or production environment, copy .env to the target machine, update every credential, and re-run setup.ps1 -Mode All (or the equivalent Docker CLI commands). No source code changes are required.

Build docs developers (and LLMs) love