Skip to content

Repository files navigation

Ayurlogics Platform

A comprehensive bioinformatics platform for molecular docking analysis using AutoDock Vina with AI-powered analysis through Claude Code CLI.

Overview

Ayurlogics provides researchers with a web-based interface to perform molecular docking simulations and leverage AI agents for automated analysis, code generation, and research assistance.

Features

  • Molecular Docking: Run AutoDock Vina simulations directly from the web interface
  • AI-Powered Analysis: Leverage Claude Code CLI for intelligent result interpretation
  • Real-time Collaboration: Built on Pocketbase for real-time data synchronization
  • Modern Stack: React + TypeScript + Chakra UI frontend with FastAPI backend
  • Single-Port Access: All services accessible through one port (8080) via nginx reverse proxy
  • Container-Based: Complete platform runs with podman-compose

Architecture

┌─────────────────────────────────────────────────┐
│                                                 │
│              http://localhost:8080              │
│                                                 │
└──────────────────┬──────────────────────────────┘
                   │
                   ▼
         ┌─────────────────┐
         │  Nginx Proxy    │
         │  (Port 8080)    │
         └────────┬────────┘
                  │
        ┌─────────┼─────────┐
        │         │         │
        ▼         ▼         ▼
   ┌────────┐ ┌────────┐ ┌──────────┐
   │Frontend│ │Backend │ │Pocketbase│
   │   /    │ │  /api  │ │   /pb    │
   │        │ │        │ │          │
   │ React  │ │FastAPI │ │ Database │
   │ Chakra │ │+ Vina  │ │  + Auth  │
   │  UI    │ │+ Claude│ │          │
   └────────┘ └────────┘ └──────────┘

Prerequisites

  • Podman or Docker installed
  • Podman Desktop (for Windows users, with WSL2 backend)
  • Git for version control
  • Claude API Key from Anthropic Console

Windows-Specific Requirements

  • Windows 10/11 with WSL2 enabled
  • Podman Desktop with WSL2 integration

Quick Start

1. Clone the Repository

git clone https://github.com/Ojas-Singh/Ayurlogics.git
cd Ayurlogics

2. Initialize the Project

# Make scripts executable (Git Bash or WSL on Windows)
chmod +x scripts/*.sh

# Run initialization script
./scripts/init.sh

3. Configure Environment

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

# Edit .env and add your Claude API key
# Required: CLAUDE_API_KEY=sk-ant-api03-your-key-here

4. Start Development Environment

# Using the development script (recommended)
./scripts/dev.sh

# Or manually with podman compose
podman compose -f compose.yml -f compose.dev.yml up -d --build

podman compose -f compose.yml -f compose.dev.yml up -d --build --force-recreate --remove-orphans

Dokploy (Docker Compose)

If you deploy with Dokploy, create a Docker Compose app (Dokploy has a dedicated “Docker Compose” deployment type). Do not use the “Dockerfile” build type with compose.yml / compose.dev.yml in the “Docker File” field — Docker will try to parse the Compose YAML as a Dockerfile and you’ll see: dockerfile parse error ... unknown instruction: version:.

This repo includes a root-level docker-compose.yml (same as compose.yml) for platforms that expect that filename.

Note: compose.dev.yml is for local development only (hot reload + bind mounts). Use docker-compose.yml/compose.yml for deployments.

Development mode features:

  • Frontend runs Vite dev server with hot reload
  • Backend runs with uvicorn --reload
  • Source code changes automatically reflected

5. Access the Platform

Development:

Production:

Development

Project Structure

Ayurlogics/
├── backend/          # FastAPI backend with Vina + Claude CLI
├── frontend/         # React + TypeScript + Chakra UI
├── nginx/            # Reverse proxy configuration
├── pocketbase/       # Database and authentication
├── scripts/          # Utility scripts
├── docs/             # Documentation
└── podman-compose.yml

Running Individual Services

# View logs for all services
podman compose logs -f

# View logs for specific service
podman logs ayurlogics-frontend -f

# Restart a service
podman compose restart frontend

# Access backend shell
podman exec -it ayurlogics-backend bash

# Stop services
podman compose down

Hot Reload

Development mode includes hot reload:

  • Backend: Code changes in backend/app/ automatically reload uvicorn
  • Frontend: Vite dev server provides instant HMR (Hot Module Replacement)

Running Tests

# Backend tests
podman exec ayurlogics-backend pytest

# Frontend tests (if configured)
cd frontend && npm test

Production Deployment

# Use production script
./scripts/prod.sh

# Or manually
podman-compose -f podman-compose.yml up -d

Production Considerations

  • Set ENVIRONMENT=production in .env
  • Change PB_ADMIN_PASSWORD to a strong password
  • Configure proper ALLOWED_ORIGINS for CORS
  • Set up regular backups with ./scripts/backup.sh
  • Consider adding SSL/TLS termination
  • Set resource limits for containers

Services

Frontend (React + Chakra UI)

  • Port: Internal 80, proxied via nginx
  • Technology: React 18, TypeScript, Vite, Chakra UI v2
  • Features: SPA routing, Pocketbase integration, API client

Backend (FastAPI)

  • Port: Internal 8000, accessible at /api
  • Technology: FastAPI, Python 3.11
  • Features:
    • AutoDock Vina integration for molecular docking
    • Claude Code CLI for AI agent workflows
    • Pocketbase SDK for database operations
    • Structured logging with structlog

Pocketbase

  • Port: Internal 8090, accessible at /pb
  • Features: Database, authentication, real-time subscriptions
  • Admin UI: http://localhost:8080/pb/_/

Nginx

  • Port: 8080 (host) → 80 (container)
  • Purpose: Reverse proxy with routing

AI Agents

See agents.md for comprehensive documentation on:

  • Agent types and capabilities
  • Integration architecture
  • API endpoints
  • Example workflows
  • Best practices

Configuration

All configuration is managed through environment variables in .env:

Variable Description Default
HOST_PORT External access port 8080
CLAUDE_API_KEY Anthropic API key Required
PB_ADMIN_EMAIL Pocketbase admin email admin@ayurlogics.local
PB_ADMIN_PASSWORD Pocketbase admin password changeme...
LOG_LEVEL Logging verbosity info

See .env.example for all available options.

Troubleshooting

Services Won't Start

# Check container status
podman-compose ps

# View logs
podman-compose logs

# Rebuild containers
podman-compose down
podman-compose build --no-cache
podman-compose up -d

Port Already in Use

# Change HOST_PORT in .env to a different port
HOST_PORT=8081

AutoDock Vina Not Working

# Verify Vina installation
podman exec ayurlogics-backend vina --version

# Check workspace permissions
podman exec ayurlogics-backend ls -la /workspace

Claude CLI Not Working

# Verify Claude CLI installation
podman exec ayurlogics-backend claude --version

# Check API key is set
podman exec ayurlogics-backend env | grep CLAUDE_API_KEY

Backup and Restore

Backup

# Run backup script
./scripts/backup.sh

# Manual backup of Pocketbase data
tar -czf backup_$(date +%Y%m%d).tar.gz pocketbase/pb_data/

Restore

# Stop services
podman-compose down

# Restore Pocketbase data
tar -xzf backup_20260210.tar.gz

# Restart services
podman-compose up -d

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For issues, questions, or contributions:

Acknowledgments

  • AutoDock Vina: Molecular docking software
  • Anthropic Claude: AI-powered analysis
  • FastAPI: Modern Python web framework
  • Chakra UI: Component library for React
  • Pocketbase: Backend-as-a-service

Built with ❤️ for bioinformatics research

Releases

Packages

Contributors

Languages