Getting Started

This guide walks you through setting up the Tarasol development environment from scratch.

Prerequisites

RequirementVersionPurpose
Node.js18+Runtime for NestJS services
Python3.8+File Service
.NET SDK6.0+Syncfusion Service (F#)
Docker20+Infrastructure services
Git2.xSource code management

Infrastructure Setup

Start the infrastructure services first using Docker:

# Start Redis
docker run -d --name redis -p 6379:6379 redis:7-alpine

# Start RabbitMQ
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management

# Start SQL Server
docker run -d --name mssql -p 1433:1433 \
  -e ACCEPT_EULA=Y \
  -e SA_PASSWORD=YourStrong!Pass \
  mcr.microsoft.com/mssql/server:2022-latest

# Start MongoDB
docker run -d --name mongodb -p 27017:27017 mongo:6

# Start Elasticsearch
docker run -d --name elasticsearch -p 9200:9200 \
  -e discovery.type=single-node \
  -e xpack.security.enabled=false \
  elasticsearch:8.12.0

Service Startup Order

Service Startup Order

Loading diagram...
Warning

Services must be started in this order. The Identity and Tenant services must be running before any other service can start, as they provide authentication and tenant resolution.

Starting a Service

Each NestJS service follows the same pattern:

cd <service-directory>
npm install
cp .env.example .env  # Configure environment variables
npm run start:dev

Environment Variables

All services share common environment variables:

NameTypeDefaultDescription
NODE_ENVstringdevelopmentEnvironment mode
DB_HOSTstringlocalhostSQL Server host
DB_USERNAMEstringsaDatabase username
DB_PASSWORDstring-Database password
REDIS_HOSTstringlocalhostRedis host
REDIS_PORTnumber6379Redis port
RABBITMQ_URISstringamqp://guest:guest@localhost:5672RabbitMQ connection URI

Verifying Setup

After all services are running:

  1. Check Gateway health: GET http://localhost/health
  2. Access RabbitMQ Management: http://localhost:15672
  3. Test login: POST http://localhost/api/identity/login