# Quick Start Guide

Welcome to **AINexLayer**! This guide will walk you through the essential steps to get up and running in minutes.

**Get AINexLayer up and running in minutes using Docker!**

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* **Docker**: Version 20.10 or higher
* **Docker Compose**: Version 2.0 or higher

### Quick Setup (3 steps) <a href="#quick-setup-3-steps" id="quick-setup-3-steps"></a>

#### 1. Create Project Directory <a href="#id-1-create-project-directory" id="id-1-create-project-directory"></a>

```bash
mkdir ainexlayer && cd ainexlayer
```

#### 2. Create Configuration Files <a href="#id-2-create-configuration-files" id="id-2-create-configuration-files"></a>

```bash
# Create docker-compose.yml
cat > docker-compose.yml << 'EOF'
name: ainexlayer

services:
  ainexlayer:
    container_name: ainexlayer
    image: alakinfotech/ainexlayer:latest
    ports:
      - "3000:3001"
    volumes:
      - "./storage:/app/server/storage"
    environment:
      - NODE_ENV=production
      - STORAGE_DIR=/app/server/storage
      - JWT_SECRET=${JWT_SECRET:-your-super-secret-jwt-key}
      - LLM_PROVIDER=${LLM_PROVIDER:-openai}
      - OPEN_AI_KEY=${OPEN_AI_KEY:-your-openai-api-key}
      - VECTOR_DB=${VECTOR_DB:-lancedb}
      - MULTI_USER_MODE=${MULTI_USER_MODE:-false}
    restart: unless-stopped
EOF

# Create .env file
cat > .env << 'EOF'
# Required: Your OpenAI API key
OPEN_AI_KEY=your-openai-api-key-here

# JWT Secret (change this in production)
JWT_SECRET=your-super-secret-jwt-key-change-this

# LLM Provider
LLM_PROVIDER=openai

# Vector Database
VECTOR_DB=lancedb

# Multi-user mode
MULTI_USER_MODE=false
EOF
```

#### 3. Start AINexLayer <a href="#id-3-start-ainexlayer" id="id-3-start-ainexlayer"></a>

```bash
docker-compose up -d
```

### Access Your Instance <a href="#access-your-instance" id="access-your-instance"></a>

Open your browser and navigate to: [**http://localhost:3000**](http://localhost:3000/)

### Getting Started <a href="#getting-started" id="getting-started"></a>

#### 1. Create Your First Workspace <a href="#id-1-create-your-first-workspace" id="id-1-create-your-first-workspace"></a>

* Click "Create Workspace" on the dashboard
* Give it a name (e.g., "My Documents")
* Choose your preferred AI model

#### 2. Upload Documents <a href="#id-2-upload-documents" id="id-2-upload-documents"></a>

* Click "Upload" in your workspace
* Drag and drop PDF, TXT, DOCX, or other supported files
* Wait for processing to complete

#### 3. Start Chatting <a href="#id-3-start-chatting" id="id-3-start-chatting"></a>

* Click "Chat" in your workspace
* Ask questions about your uploaded documents
* The AI will provide contextual answers based on your content

### Essential Commands <a href="#essential-commands" id="essential-commands"></a>

#### View Logs <a href="#view-logs" id="view-logs"></a>

```bash
docker-compose logs -f
```

#### Stop Services <a href="#stop-services" id="stop-services"></a>

```bash
docker-compose down
```

#### Update to Latest Version <a href="#update-to-latest-version" id="update-to-latest-version"></a>

```bash
docker-compose down
docker pull alakinfotech/ainexlayer:latest
docker-compose up -d
```

***

## Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

#### Common Issues <a href="#common-issues" id="common-issues"></a>

**Port Already in Use**

```bash
docker-compose down && docker-compose up -d
```

**Permission Errors**

```bash
sudo chown -R $USER:$USER storage/
```

**Check Status**

```bash
docker-compose ps
```

### Configuration Options <a href="#configuration-options" id="configuration-options"></a>

#### Environment Variables <a href="#environment-variables" id="environment-variables"></a>

Edit `.env` file to customize:

```env
# AI Provider (required)
OPEN_AI_KEY=your-openai-api-key

# Multi-user mode
MULTI_USER_MODE=true

# Vector Database
VECTOR_DB=pinecone
PINECONE_API_KEY=your-pinecone-key
```

#### Production Settings <a href="#production-settings" id="production-settings"></a>

```env
NODE_ENV=production
MULTI_USER_MODE=true
JWT_SECRET=your-very-secure-jwt-secret
```

***

**🎉 You're ready to start building intelligent document solutions with AINexLayer!**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.ainexlayer.com/documentation/getting-started/quickstart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
