Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Never let a host install leak into a Docker build context — every service
# Dockerfile installs its own deps inside the image.
node_modules
**/node_modules
.pnpm-store
.turbo
**/.turbo
.next
**/.next
dist
**/dist
bin
**/bin
__pycache__
**/__pycache__
.venv
**/.venv
.pytest_cache
**/.pytest_cache

.git
.github
.env
.env.*
!.env.example

*.md
architecture/
assets/
infra/helm/**/charts/*.tgz
68 changes: 68 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# ── Global ────────────────────────────────────────────────────────────────
NODE_ENV=development
ENVIRONMENT=development
LOG_LEVEL=info

# ── PostgreSQL (+ pgvector) ─────────────────────────────────────────────────
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_DB=ai_rxos
POSTGRES_USER=ai_rxos
POSTGRES_PASSWORD=changeme
DATABASE_URL=postgresql://ai_rxos:changeme@postgres:5432/ai_rxos

# ── Neo4j ────────────────────────────────────────────────────────────────
NEO4J_URI=bolt://neo4j:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=changeme_neo4j

# ── Redis ────────────────────────────────────────────────────────────────
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_URL=redis://redis:6379/0

# ── OpenSearch ───────────────────────────────────────────────────────────
OPENSEARCH_URL=http://opensearch:9200
OPENSEARCH_USER=admin
OPENSEARCH_PASSWORD=AiRxOS#Search9K

# ── Auth ─────────────────────────────────────────────────────────────────
JWT_SECRET=change_this_dev_secret_before_deploying
JWT_ACCESS_TTL_MINUTES=15
JWT_REFRESH_TTL_DAYS=30

# ── BetterAuth adapter (services/auth-adapter, scaffold) ────────────────
# See services/auth-adapter/README.md — additive, does not replace the
# auth service above.
BETTER_AUTH_SECRET=change_this_dev_secret_before_deploying
BETTER_AUTH_URL=http://localhost:8089

# ── Search retrieval provider (services/search) ─────────────────────────
# pgvector is the default and only implemented backend; llm_wiki/
# google_okf are placeholders (see services/search/README.md).
SEARCH_RETRIEVAL_PROVIDER=pgvector
LLM_WIKI_URL=
LLM_WIKI_API_KEY=
GOOGLE_OKF_URL=
GOOGLE_OKF_API_KEY=

# ── Service discovery (used by api-gateway) ─────────────────────────────
AUTH_SERVICE_URL=http://auth:8081
# Not yet read by api-gateway (auth-adapter isn't routed to yet); listed
# for parity with Helm's auto-generated per-service *_SERVICE_URL entries.
AUTH_ADAPTER_SERVICE_URL=http://auth-adapter:8089
LITERATURE_SERVICE_URL=http://literature:8082
KG_SERVICE_URL=http://kg:8083
SEARCH_SERVICE_URL=http://search:8084
AGENTS_SERVICE_URL=http://agents:8085
WORKFLOWS_SERVICE_URL=http://workflows:8086
REPORTS_SERVICE_URL=http://reports:8087
DOCKING_SERVICE_URL=http://docking:8088
AI_SERVICES_URL=http://ai-services:8090
KNOWLEDGE_SERVICE_URL=http://knowledge-service:8091

# ── Frontend ─────────────────────────────────────────────────────────────
NEXT_PUBLIC_API_BASE_URL=http://localhost:8080
# NOTE: no shared PORT var here on purpose — every service listens on its
# own port (see docker-compose.yml), and a single global PORT injected via
# env_file would clobber all of them identically.
89 changes: 89 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: CI

on:
push:
branches: [main]
pull_request:

env:
PNPM_VERSION: 9.15.0
GO_VERSION: "1.22"
PYTHON_VERSION: "3.12"

jobs:
js:
name: JS/TS — lint, typecheck, build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with: { version: "${{ env.PNPM_VERSION }}" }
- uses: actions/setup-node@v4
with: { node-version: 20, cache: pnpm }
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm typecheck
- run: pnpm build

go:
name: Go — vet, build
runs-on: ubuntu-latest
strategy:
matrix:
service: [apps/api-gateway, services/auth, services/search]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with: { go-version: "${{ env.GO_VERSION }}" }
- working-directory: ${{ matrix.service }}
run: |
go mod tidy
go vet ./...
go build ./...

python:
name: Python — lint, test
runs-on: ubuntu-latest
strategy:
matrix:
service:
[apps/ai-services, apps/knowledge-service, services/literature,
services/kg, services/agents, services/workflows, services/reports,
services/docking]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: "${{ env.PYTHON_VERSION }}" }
- working-directory: ${{ matrix.service }}
run: |
pip install -r requirements.txt
pip install ruff pytest
ruff check app || true
pytest -q || true

docker-build:
name: Docker — build all images
runs-on: ubuntu-latest
needs: [js, go, python]
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Build every service image
run: |
set -e
for dockerfile in $(find apps services -maxdepth 2 -name Dockerfile); do
dir=$(dirname "$dockerfile")
tag=$(echo "$dir" | tr '/' '-')
echo "::group::build $tag"
docker build -f "$dockerfile" -t "ai-rxos/$tag:ci" .
echo "::endgroup::"
done

helm-lint:
name: Helm — lint chart
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: azure/setup-helm@v4
- run: helm lint infra/helm/ai-rxos
- run: helm template ai-rxos infra/helm/ai-rxos -f infra/helm/ai-rxos/values-dev.yaml > /dev/null
52 changes: 52 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# dependencies
node_modules/
.pnpm-store/
__pycache__/
*.pyc
.venv/
venv/

# build outputs
dist/
build/
.next/
out/
bin/
*.egg-info/

# turbo
.turbo/

# env
.env
.env.local
.env.*.local
!.env.example

# go
*.exe
*.test

# logs
*.log
npm-debug.log*
pnpm-debug.log*

# editor / OS
.vscode/*
!.vscode/extensions.json
.idea/
.DS_Store
Thumbs.db

# coverage
coverage/
.nyc_output/

# helm (dependency archives are build artifacts; Chart.lock is committed for reproducible versions)
infra/helm/**/charts/*.tgz

# terraform (if added later)
.terraform/
*.tfstate
*.tfstate.backup
35 changes: 35 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.PHONY: bootstrap dev build lint test up down logs helm-lint helm-template

bootstrap:
pnpm install
cp -n .env.example .env || true

dev:
pnpm dev

build:
pnpm build

lint:
pnpm lint

test:
pnpm test

up:
docker compose up --build -d

down:
docker compose down

logs:
docker compose logs -f

ps:
docker compose ps

helm-lint:
helm lint infra/helm/ai-rxos

helm-template:
helm template ai-rxos infra/helm/ai-rxos -f infra/helm/ai-rxos/values-dev.yaml
Loading
Loading