Requirements

RequirementMinimum versionNotes
PHP8.2+Extensions: pgsql, mbstring, openssl, tokenizer, xml, ctype, json, bcmath
Composer2.xPHP dependency manager
Node.js18+Frontend asset build (Vite)
PostgreSQL14+Primary database (native UUID support)
Redis6+Optional — cache, session and queue in production

Docker installation (recommended)

The fastest way to bring up the full environment (web, worker, database, redis) is using Docker Compose.

  • Clone the repository
    git clone https://github.com/tainux/tainux-assessment.git
    cd tainux-assessment/tainux-core
  • Configure the Docker environment
    cp .env.docker.example .env.docker
    # Edit .env.docker and set the required variables
  • Start the stack
    docker compose --env-file .env.docker up --build -d postgres redis web worker
  • Run migrations and seeds
    docker compose --env-file .env.docker run --rm artisan migrate --force
    docker compose --env-file .env.docker run --rm artisan db:seed
  • Access the platform
    Open http://localhost:8080 in your browser.

Manual installation (without Docker)

  • Install PHP dependencies
    cd tainux-core
    composer install --no-dev --optimize-autoloader
  • Configure the .env file
    cp .env.example .env
    php artisan key:generate
    Edit .env and configure database and application variables.
  • Configure PostgreSQL
    DB_CONNECTION=pgsql
    DB_HOST=127.0.0.1
    DB_PORT=5432
    DB_DATABASE=tainux
    DB_USERNAME=your_user
    DB_PASSWORD=your_password
  • Run migrations and seed
    php artisan migrate --force
    php artisan db:seed
  • Build frontend assets
    npm install
    npm run build
  • Start the development server
    php artisan serve
    Access http://localhost:8000

Essential environment variables

VariableDescriptionExample
APP_NAMEApplication nameTAINUX Assessment
APP_URLBase URLhttps://tainux.yourcompany.com
APP_ENVEnvironment (local/production)production
APP_KEYEncryption keyGenerated via artisan key:generate
DB_CONNECTIONDatabase driverpgsql
DB_HOSTPostgreSQL host127.0.0.1
DB_DATABASEDatabase nametainux
OPENAI_API_KEYOpenAI API key (optional)sk-...
OPENAI_MODELOpenAI modelgpt-4o
SESSION_DRIVERSession driverdatabase
QUEUE_CONNECTIONQueue driverdatabase

First login

After seeding, the system creates a default administrator account:

FieldDefault value
E-mailadmin@tainux.io
PasswordTainuxAdmin@2024!
Security Change the administrator password immediately after first login. The system will force a password change on the first access.

Health probes (Kubernetes)

TAINUX Assessment exposes Kubernetes-compatible endpoints for liveness and readiness probes:

GET /healthz   → liveness probe
GET /readyz    → readiness probe
GET /metrics   → metrics (requires authentication)

Queue worker (production)

For background report generation, the queue worker must be running:

# Start worker
php artisan queue:work --sleep=3 --tries=3

# With Supervisor (recommended in production)
[program:tainux-worker]
command=php /var/www/tainux-core/artisan queue:work --sleep=3 --tries=3
autostart=true
autorestart=true
user=www-data
Tip In Docker environments, the worker service in docker-compose handles queue processing automatically.