Skip to content

AlisChain Windows Installation Guide

System Requirements

  • Windows 10/11 (64-bit)
  • 8GB RAM minimum (16GB recommended)
  • 50GB free disk space
  • Python 3.8+
  • Node.js 16+
  • Git

Installation Steps

1. Install Prerequisites

Install Python

# Download Python installer from official website
# Or use winget
winget install Python.Python.3.11

Install Node.js

winget install OpenJS.NodeJS.LTS

Install Git

winget install Git.Git

2. Download and Extract AlisChain Project

Download and extract the AlisChain project to your desired location.

3. Set Up Project Directory

Open PowerShell and navigate to the project directory:

cd path\to\alischain

4. Set Up Python Environment

# Create virtual environment
python -m venv venv

# Activate virtual environment
.\venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

5. Install Frontend Dependencies

cd frontend
npm install

6. Configure Environment

Create .env file in project root:

ALISCHAIN_API_KEY=your_api_key
WEBSOCKET_URL=wss://api.alischain.com/ws
REDIS_URL=redis://localhost:6379

7. Start Services

Start Backend

# In first terminal
.\venv\Scripts\activate
python server.py

Start Frontend

# In second terminal
cd frontend
npm start

Development Setup

1. Install Development Tools

# Install development dependencies
pip install -r requirements-dev.txt

# Install frontend development tools
npm install --save-dev @types/react @types/node

2. IDE Setup

VS Code

Install recommended extensions: - Python - ESLint - Prettier - TypeScript - Solidity

Settings (settings.json):

{
    "python.linting.enabled": true,
    "python.formatting.provider": "black",
    "editor.formatOnSave": true,
    "solidity.formatter": "prettier"
}

Troubleshooting

Common Issues

Python Path Issues

# Add Python to PATH
$env:Path += ";C:\Python311;C:\Python311\Scripts"

Node.js Version Conflicts

# Install nvm-windows
winget install CoreyButler.NVMforWindows

# Install and use correct Node version
nvm install 16
nvm use 16

Port Already in Use

# Find process using port
netstat -ano | findstr :5000

# Kill process
taskkill /PID <process_id> /F

Updating

Update Dependencies

# Update Python dependencies
.\venv\Scripts\activate
pip install -r requirements.txt

# Update frontend dependencies
cd frontend
npm install

Running Tests

# Run backend tests
.\venv\Scripts\activate
pytest

# Run frontend tests
cd frontend
npm test

Production Deployment

1. Build Frontend

cd frontend
npm run build

2. Configure IIS

Install IIS features:

Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServer

3. Set Up SSL

# Install certificate
Import-PfxCertificate -FilePath certificate.pfx -CertStoreLocation Cert:\LocalMachine\My

Monitoring

Windows Services

# Create service
New-Service -Name "AlisChain" -BinaryPathName "C:\AlisChain\venv\Scripts\python.exe C:\AlisChain\server.py"

# Start service
Start-Service -Name "AlisChain"

Logging

Logs are stored in: - C:\AlisChain\logs\server.log - C:\AlisChain\logs\error.log

Security Recommendations

  1. Firewall Configuration

    # Allow required ports
    New-NetFirewallRule -DisplayName "AlisChain Server" -Direction Inbound -LocalPort 5000 -Protocol TCP -Action Allow
    

  2. Windows Defender Exclusions

    Add-MpPreference -ExclusionPath "C:\AlisChain"
    

  3. File Permissions

    # Set appropriate permissions
    icacls "C:\AlisChain" /grant "Users:(OI)(CI)RX" /T
    


Last update: 2024-12-08