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:
composer install
npm install2. Setup Python Virtual Environment
Set up the isolated python virtual environment (.venv) and install the MLX and inference dependencies:
# Create the virtual environment
python3 -m venv .venv
# Activate the environment
source .venv/bin/activate
# Install the Python requirements
pip install -r python/requirements.txt3. 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:
source .venv/bin/activate
python3 python/slm_forge.pyNote: 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):
{"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:
# 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 train5. 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:
# 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:
# Discharge Summary
**Patient**: James Whitfield
**Age**: 65
**Diagnosis**: Acute Decompensated Heart Failure
**Condition**: Stable
## Medications
- Carvedilol 6.25 mg BID
- Lisinopril 5 mg dailyB. Add Node in the UI
- Launch the app (see below).
- Click Create Node and select your prepared directory.
- Define your Extraction Schema (e.g.
['Vendor', 'Amount Due']or['Patient', 'Diagnosis']). - 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:
php artisan native:migrate:fresh --seedB. Run NativePHP Electron App
Start the desktop application served locally:
php artisan native:serveC. Run Pest Tests
Run the feature test suite to verify code correctness:
vendor/bin/pest tests/FeatureDebugging
- 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