Installation
This guide will help you install and set up Aida Platform on your system.
Prerequisites
Before installing Aida Platform, ensure you have the following:
System Requirements
- Node.js: Version 18.0 or higher
- npm: Version 8.0 or higher (comes with Node.js)
- PostgreSQL: Version 13 or higher (for local database)
- Git: For cloning the repository
Optional Dependencies
- Docker: For containerized deployment
- Redis: For caching and real-time features
- Cisco Switch Access: For network integration
- Building Automation Systems: For full functionality
Installation Methods
Method 1: Development Setup (Recommended)
-
Clone the Repository
git clone https://github.com/aida-platform/aida-platform.git
cd aida-platform -
Install Dependencies
# Install frontend dependencies
npm install
# Install backend dependencies
cd backend
npm install
cd .. -
Environment Configuration
# Copy environment template
cp env.example .env.development
# Edit configuration
nano .env.development -
Database Setup
# Start PostgreSQL (if not running)
sudo systemctl start postgresql
# Create database
createdb aida_platform
# Run migrations
cd backend
npx prisma migrate dev
npx prisma db seed
cd .. -
Start Development Servers
# Terminal 1: Frontend
npm run dev
# Terminal 2: Backend
cd backend
npm run dev
Method 2: Docker Setup
-
Clone and Navigate
git clone https://github.com/aida-platform/aida-platform.git
cd aida-platform -
Environment Configuration
cp env.example .env
# Edit .env with your configuration -
Start with Docker Compose
docker-compose up -d
Method 3: Production Deployment
For production deployment, see our Production Deployment Guide.
Environment Configuration
Required Environment Variables
Create a .env.development file with the following variables:
# Frontend Configuration
VITE_API_BASE_URL=http://localhost:8000/api
VITE_WS_URL=ws://localhost:8000/ws
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
# Backend Configuration
LOCAL_DATABASE_URL=postgresql://aida_user:aida_password@localhost:5432/aida_platform
JWT_SECRET=your_jwt_secret_key
PORT=8000
# Optional: Supabase Configuration
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
Database Configuration
PostgreSQL Setup
# Install PostgreSQL (Ubuntu/Debian)
sudo apt update
sudo apt install postgresql postgresql-contrib
# Create database and user
sudo -u postgres psql
CREATE DATABASE aida_platform;
CREATE USER aida_user WITH PASSWORD 'aida_password';
GRANT ALL PRIVILEGES ON DATABASE aida_platform TO aida_user;
\q
Prisma Configuration
# Generate Prisma client
cd backend
npx prisma generate
# Run migrations
npx prisma migrate dev
# Seed database
npx prisma db seed
Verification
After installation, verify your setup:
-
Check Frontend
- Open http://localhost:5173
- You should see the Aida Platform login page
-
Check Backend
- Open http://localhost:8000/api-docs
- You should see the Swagger API documentation
-
Check Database
cd backend
npx prisma studio
# Should open Prisma Studio at http://localhost:5555
Default Credentials
After seeding, you'll have access to:
- Local Admin Account:
- Username:
admin - Email:
admin@aida-platform.local - Password:
admin123
- Username:
⚠️ Important: Change the default admin password after first login!
Troubleshooting
Common Issues
-
Port Already in Use
# Check what's using the port
lsof -i :5173
lsof -i :8000
# Kill the process
kill -9 <PID> -
Database Connection Failed
# Check PostgreSQL status
sudo systemctl status postgresql
# Start PostgreSQL
sudo systemctl start postgresql -
Permission Denied
# Fix npm permissions
sudo chown -R $(whoami) ~/.npm -
Module Not Found
# Clear npm cache and reinstall
npm cache clean --force
rm -rf node_modules package-lock.json
npm install
Getting Help
If you encounter issues:
- Check the Troubleshooting Guide
- Search existing GitHub Issues
- Join our Discord Community
- Contact Support
Next Steps
Once installation is complete:
- Quick Start Guide - Get your first building online
- Configuration Guide - Customize your setup
- Architecture Overview - Understand the system
- API Reference - Start integrating
Installation complete! 🎉 You're ready to start building with Aida Platform.