This repository contains infrastructure configurations for the NeuralLog system, including Kubernetes manifests, Docker configurations, Redis setup, and authentication services.
infra/
├── kubernetes/ # Kubernetes configurations
│ ├── base/ # Base Kubernetes resources
│ │ ├── server/ # Server resources
│ │ ├── redis/ # Redis resources
│ │ ├── auth/ # Auth service resources
│ │ └── openfga/ # OpenFGA resources
│ └── overlays/ # Kustomize overlays
│ └── test/ # Test environment
├── docker/ # Docker configurations
│ ├── server/ # Server Docker files
│ ├── auth/ # Auth service Docker files
│ └── dev/ # Development Docker files
├── redis/ # Redis configuration
│ ├── conf/ # Redis config files
│ └── scripts/ # Redis scripts
├── scripts/ # Utility scripts
│ ├── *.ps1 # PowerShell scripts for Windows
│ └── *.sh # Bash scripts for Linux/macOS
├── docker-compose.*.yml # Docker Compose files for different components
└── README.md # Repository documentation
- Docker Desktop
- kubectl
- kind (for local Kubernetes testing)
- Git
- Node.js v22 or later (for development)
- PowerShell (for Windows users)
To initialize the development environment and check prerequisites:
# Windows (PowerShell)
.\scripts\Initialize-DevEnvironment.ps1
# Linux/macOS (Bash)
./scripts/initialize-dev-environment.shThis script will:
- Check for required prerequisites
- Verify Docker is running
- Check for the NeuralLog/server repository
- Pull required Docker images
There are two ways to start the development environment:
# Windows (PowerShell)
.\scripts\Start-DevEnvironment.ps1
# Linux/macOS (Bash)
./scripts/start-dev-env.shThis will start:
- NeuralLog server on http://localhost:3030
- Redis on port 6379
- Redis Commander on http://localhost:8081
# Windows (PowerShell)
.\scripts\Start-All.ps1This will start:
- Verdaccio private npm registry on http://localhost:4873
- Redis on port 6379
- PostgreSQL on port 5432
- OpenFGA on http://localhost:8080
- Auth service on http://localhost:3040
- Logs server on http://localhost:3030
# For the legacy environment
.\scripts\Stop-DevEnvironment.ps1
# For the complete environment
.\scripts\Stop-All.ps1
# Linux/macOS (Bash, legacy environment only)
./scripts/stop-dev-env.shTo build and optionally push the server Docker image:
# Windows (PowerShell)
.\scripts\Build-ServerImage.ps1 -Tag "latest" -Push
# Linux/macOS (Bash)
./scripts/build-server-image.sh latest trueIf no tag is provided, "latest" will be used.
This repository includes configurations for a test Kubernetes environment using kind (Kubernetes in Docker).
-
Create a kind cluster and deploy NeuralLog:
# Windows (PowerShell) .\scripts\Setup-TestCluster.ps1 # Linux/macOS (Bash) ./scripts/setup-test-cluster.sh
-
Verify the deployment:
kubectl get pods -n neurallog
-
Access the server:
kubectl port-forward svc/neurallog-server 3030:3030 -n neurallog
-
Clean up the test environment:
# Windows (PowerShell) .\scripts\Cleanup-TestCluster.ps1 # Linux/macOS (Bash) ./scripts/cleanup-test-cluster.sh
The Kubernetes configuration uses Kustomize to manage base resources and environment-specific overlays:
- Base: Contains the core resources (deployments, services, etc.)
- Overlays: Contains environment-specific configurations (test, staging, production)
To apply the Kubernetes configuration:
kubectl apply -k kubernetes/overlays/testThe Redis configuration is located in the redis/conf directory. The default configuration is suitable for development and testing purposes.
Redis scripts for backup and restore are available in the redis/scripts directory:
# Backup Redis data
./redis/scripts/backup-redis.sh
# Restore Redis data
./redis/scripts/restore-redis.sh <backup-file>The Auth Service provides authentication and authorization capabilities for the NeuralLog platform. It uses OpenFGA (Fine-Grained Authorization) to manage permissions and supports multi-tenancy.
For more information, see the Auth Service documentation.
# Start the Auth Service and OpenFGA
docker-compose -f docker-compose.auth.yml up -d# Deploy the Auth Service and OpenFGA
kubectl apply -k kubernetes/base/auth
kubectl apply -k kubernetes/base/openfgaDocker configurations for the NeuralLog server are located in the docker directory:
- Production:
docker/server/Dockerfile - Development:
docker/dev/Dockerfile.dev
The development environment is configured using Docker Compose files in the root directory:
- docker-compose.combined.yml: Combined configuration for all components
- docker-compose.web.yml: Configuration for the web application and Verdaccio
- docker-compose.server.yml: Configuration for the logs server and Redis
- docker-compose.auth.yml: Configuration for the auth service, PostgreSQL, and OpenFGA
Additionally, there's a development-specific Docker Compose file in docker/dev/docker-compose.dev.yml.
NeuralLog uses private packages for sharing code between components. These packages are published to a private Verdaccio registry.
The @neurallog/shared package contains common types and utilities used across all NeuralLog components.
# Windows (PowerShell)
.\scripts\Publish-Shared.ps1This script will:
- Start Verdaccio if it's not already running
- Configure npm to use the private registry for the @neurallog scope
- Build the shared package
- Publish the package to the private registry
# Windows (PowerShell)
.\scripts\Update-Shared.ps1 [version]This script will install the specified version (or latest by default) of the shared package in all repositories.
The @neurallog/sdk package provides a client library for interacting with the NeuralLog server.
# Windows (PowerShell)
.\scripts\Publish-SDK.ps1This script will:
- Start Verdaccio if it's not already running
- Configure npm to use the private registry for the @neurallog scope
- Build the SDK
- Publish the SDK to the private registry
Since NeuralLog is not a monorepo, we provide scripts to help manage the multiple repositories:
# Windows (PowerShell)
.\scripts\Repo-Status.ps1This script will show the git status of all repositories.
# Windows (PowerShell)
.\scripts\Pull-All.ps1This script will pull the latest changes for all repositories.
# Windows (PowerShell)
.\scripts\Push-All.ps1 "Commit message"This script will commit and push changes for all repositories with the specified commit message.
Detailed documentation is available in the docs directory:
For integration guides and tutorials, visit the NeuralLog Documentation Site.
Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.
- NeuralLog Auth - Authentication and authorization
- NeuralLog Server - Core server functionality
- NeuralLog Web - Web interface components
- NeuralLog TypeScript Client SDK - TypeScript client SDK
- NeuralLog Java Client SDK - Java client SDK
- NeuralLog Python SDK - Python SDK
- NeuralLog C# SDK - C# SDK
- NeuralLog Go SDK - Go SDK
MIT