Skip to content

Installation Guide

This guide walks you through the process of installing AIDDDMAP in various environments.

Prerequisites

System Requirements

  • CPU: 4+ cores recommended
  • RAM: 8GB minimum, 16GB recommended
  • Storage: 20GB minimum
  • OS: Ubuntu 20.04+, macOS 10.15+, or Windows 10/11

Required Software

  1. Node.js

  2. Version 18.0.0 or higher

  3. Install via official website

  4. Python

  5. Version 3.8 or higher

  6. Install via python.org

  7. PostgreSQL

  8. Version 13.0 or higher

  9. Install via postgresql.org

  10. Redis

  11. Version 6.0 or higher

  12. Install via redis.io

  13. Git

  14. Latest version recommended
  15. Install via git-scm.com

Installation Steps

1. Clone Repository

git clone https://github.com/yourusername/aidddmap.git
cd aidddmap

2. Install Dependencies

# Install Node.js dependencies
npm install

# Install Python dependencies
pip install -r requirements.txt

3. Database Setup

# Create database
createdb aidddmap

# Run migrations
npm run migrate

4. Environment Configuration

# Copy example environment file
cp .env.example .env

# Edit environment variables
nano .env

Required environment variables:

DATABASE_URL=postgresql://user:password@localhost:5432/aidddmap
REDIS_URL=redis://localhost:6379
JWT_SECRET=your-secret-key
ENCRYPTION_KEY=your-encryption-key

5. Build Application

# Build frontend assets
npm run build

# Build backend services
npm run build:server

6. Start Services

# Start all services
npm run start

# Or start services individually
npm run start:api
npm run start:worker
npm run start:scheduler

Docker Installation

1. Using Docker Compose

# Build and start services
docker-compose up -d

# View logs
docker-compose logs -f

2. Manual Docker Setup

# Build image
docker build -t aidddmap .

# Run container
docker run -d \
  -p 3000:3000 \
  -e DATABASE_URL=postgresql://user:password@host:5432/aidddmap \
  -e REDIS_URL=redis://host:6379 \
  aidddmap

Post-Installation

1. Verify Installation

# Check service status
npm run status

# Run tests
npm test

2. Create Admin User

npm run create-admin

3. Configure SSL/TLS

Follow our Security Hardening guide for SSL setup.

Development Setup

1. Additional Dev Dependencies

npm install --save-dev typescript @types/node

2. Development Server

# Start development server
npm run dev

# Watch for changes
npm run watch

3. Testing Environment

# Run tests with coverage
npm run test:coverage

# Run specific tests
npm test -- --grep "test-name"

Troubleshooting

Common Issues

  1. Database Connection Errors
# Check database status
pg_isready -h localhost -p 5432

# Verify connection string
psql $DATABASE_URL
  1. Redis Connection Issues
# Check Redis status
redis-cli ping

# Monitor Redis
redis-cli monitor
  1. Build Failures
# Clear build cache
npm run clean

# Rebuild
npm run build

Security Considerations

  1. File Permissions
# Set proper permissions
chmod 600 .env
chmod -R 755 public/
  1. Service Account
# Create service user
sudo useradd -r -s /bin/false aidddmap

# Set ownership
sudo chown -R aidddmap:aidddmap /path/to/app

Updating

1. Update Code

# Pull latest changes
git pull origin main

# Install dependencies
npm install

2. Database Updates

# Run migrations
npm run migrate

3. Restart Services

# Restart all services
npm run restart

Next Steps

  1. Configure your environment
  2. Set up monitoring
  3. Implement security measures
  4. Plan for scaling
  5. Review maintenance procedures

Support

Need help with installation?