Skip to content

Development Setup

Follow these steps to set up the ANDARTIS development environment, download the core models, import baseline training datasets, and launch the application.


Prerequisites

  • PHP 8.3+
  • Composer
  • Node.js & NPM
  • Python 3.9+ (Apple Silicon Mac is required for Apple MLX performance)

1. Initial Dependency Installation

Install the PHP and Node dependencies:

bash
composer install
npm install

2. Setup Python Virtual Environment

Set up the isolated python virtual environment (.venv) and install the MLX and inference dependencies:

bash
# Create the virtual environment
python3 -m venv .venv

# Activate the environment
source .venv/bin/activate

# Install the Python requirements
pip install -r python/requirements.txt

3. Acquire the Global SLM (Mistral-7B)

ANDARTIS uses a local Mistral-7B-Instruct-v0.3-4bit model as its "Senior Analyst" for layout blueprint compilation, self-healing metadata extraction, and intent parsing.

Run the SLM Forge downloader to fetch the quantized weights (~4.5GB) from Hugging Face:

bash
source .venv/bin/activate
python3 python/slm_forge.py

Note: This downloads the model directly to storage/models/global_slm/Mistral-7B-Instruct-v0.3-4bit.


4. Forge the Wisdom Store (Bring Your Own Dataset - BYOD)

For privacy, intellectual property, and strict compliance reasons (e.g., HIPAA for medical records, GDPR/CCPA for personal data, and attorney-client privilege for legal files), ANDARTIS does not ship proprietary datasets in the repository.

All intelligence must be forged locally. If you are working as an independent practitioner or rebel researcher (e.g., a private clinic with clinical records or a sovereign defense office), you can import your private datasets directly.

A. Dataset Formatting Requirements

Prepare your private dataset as a JSONL (JSON Lines) or CSV file.

JSONL Format (private_dataset.jsonl):

json
{"input": "Raw document text or clinical note snippet...", "output": {"key1": "Value1", "key2": "Value2"}}

B. Importing Your Local Dataset

Run the import command targeting your local files:

bash
# Import your private medical data
php artisan andartis:forge import --source=path/to/your/private_medical_records.jsonl --domain=medical

# Import your private legal data
php artisan andartis:forge import --source=path/to/your/private_briefs.jsonl --domain=legal

# Index/Crystallize the imported wisdom
php artisan andartis:forge train

5. Adding and Testing Your First Node

At this stage, the best way to verify the extraction pipeline and capability modules is to initialize a node with a folder of structured Markdown (.md) documents. This provides a clean baseline to test symbolic extraction and RAG before introducing messy OCR outputs or binary PDFs.

A. Prepare a Test Directory

Create a directory locally with a few .md files conforming to standard patterns. For example:

invoice_01.md:

markdown
# Invoice INV-2026-001
**Vendor**: Titan Corp
**Client**: Aris Lab
**Amount Due**: $1,500.00
**Date**: 2026-06-07

## Details
- Services rendered: Quantum computing consulting.

patient_chart.md:

markdown
# Discharge Summary
**Patient**: James Whitfield
**Age**: 65
**Diagnosis**: Acute Decompensated Heart Failure
**Condition**: Stable

## Medications
- Carvedilol 6.25 mg BID
- Lisinopril 5 mg daily

B. Add Node in the UI

  1. Launch the app (see below).
  2. Click Create Node and select your prepared directory.
  3. Define your Extraction Schema (e.g. ['Vendor', 'Amount Due'] or ['Patient', 'Diagnosis']).
  4. Click Ingest. The system will scan the folder, compile layout blueprints, and run the self-healing SLM loop to extract schema metadata.

6. Initializing and Running the App

A. Migrate Database

Initialize the NativePHP testing and local database tables:

bash
php artisan native:migrate:fresh --seed

B. Run NativePHP Electron App

Start the desktop application served locally:

bash
php artisan native:serve

C. Run Pest Tests

Run the feature test suite to verify code correctness:

bash
vendor/bin/pest tests/Feature

Debugging

  • Python RPC Log: Monitor real-time Python execution, model loading, and training progress:
    bash
    tail -f storage/logs/python.log
  • Laravel Logs: Check for PHP-side bridge and event errors:
    bash
    tail -f storage/logs/laravel.log

Released in Alpha