Requirements
| Requirement | Minimum version | Notes |
|---|---|---|
| PHP | 8.2+ | Extensions: pgsql, mbstring, openssl, tokenizer, xml, ctype, json, bcmath |
| Composer | 2.x | PHP dependency manager |
| Node.js | 18+ | Frontend asset build (Vite) |
| PostgreSQL | 14+ | Primary database (native UUID support) |
| Redis | 6+ | 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 platformOpen
http://localhost:8080in 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:generateEdit.envand 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 serveAccesshttp://localhost:8000
Essential environment variables
| Variable | Description | Example |
|---|---|---|
APP_NAME | Application name | TAINUX Assessment |
APP_URL | Base URL | https://tainux.yourcompany.com |
APP_ENV | Environment (local/production) | production |
APP_KEY | Encryption key | Generated via artisan key:generate |
DB_CONNECTION | Database driver | pgsql |
DB_HOST | PostgreSQL host | 127.0.0.1 |
DB_DATABASE | Database name | tainux |
OPENAI_API_KEY | OpenAI API key (optional) | sk-... |
OPENAI_MODEL | OpenAI model | gpt-4o |
SESSION_DRIVER | Session driver | database |
QUEUE_CONNECTION | Queue driver | database |
First login
After seeding, the system creates a default administrator account:
| Field | Default value |
|---|---|
admin@tainux.io | |
| Password | TainuxAdmin@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.