Skip to content

Commit 90092eb

Browse files
author
amychenn
committed
Initial commit: Constellation Hub MVP
- 4 backend microservices (core-orbits, routing, ground-scheduler, ai-agents) - React + TypeScript frontend with space-themed UI - Docker Compose orchestration - GitHub Actions CI/CD workflows - Comprehensive documentation for operators and executives - Apache 2.0 license
0 parents  commit 90092eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+10626
-0
lines changed

.env.example

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Environment Configuration
2+
# Copy this file to .env and fill in your values
3+
4+
# Database Configuration
5+
DATABASE_URL=postgresql://constellation:constellation@localhost:5432/constellation_hub
6+
POSTGRES_USER=constellation
7+
POSTGRES_PASSWORD=constellation
8+
POSTGRES_DB=constellation_hub
9+
10+
# Redis Configuration (optional)
11+
REDIS_URL=redis://localhost:6379
12+
13+
# Service URLs (for inter-service communication)
14+
CORE_ORBITS_URL=http://core-orbits:8001
15+
ROUTING_URL=http://routing:8002
16+
GROUND_SCHEDULER_URL=http://ground-scheduler:8003
17+
AI_AGENTS_URL=http://ai-agents:8004
18+
19+
# Frontend Configuration
20+
VITE_API_BASE_URL=http://localhost:8001
21+
22+
# AI/LLM Configuration
23+
# Options: mock, openai, anthropic, local
24+
LLM_PROVIDER=mock
25+
LLM_API_KEY=
26+
LLM_MODEL=gpt-4
27+
28+
# Logging
29+
LOG_LEVEL=INFO
30+
31+
# Development
32+
DEBUG=true

.github/workflows/ci-backend.yml

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
name: CI - Backend
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
paths:
7+
- 'backend/**'
8+
- '.github/workflows/ci-backend.yml'
9+
pull_request:
10+
branches: [main]
11+
paths:
12+
- 'backend/**'
13+
14+
jobs:
15+
test-core-orbits:
16+
name: Test Core Orbits Service
17+
runs-on: ubuntu-latest
18+
19+
services:
20+
postgres:
21+
image: postgres:15-alpine
22+
env:
23+
POSTGRES_USER: test
24+
POSTGRES_PASSWORD: test
25+
POSTGRES_DB: test_db
26+
ports:
27+
- 5432:5432
28+
options: >-
29+
--health-cmd pg_isready
30+
--health-interval 10s
31+
--health-timeout 5s
32+
--health-retries 5
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: Set up Python
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: '3.11'
41+
cache: 'pip'
42+
cache-dependency-path: backend/core-orbits/requirements.txt
43+
44+
- name: Install dependencies
45+
run: |
46+
cd backend/core-orbits
47+
pip install -r requirements.txt
48+
49+
- name: Run linting
50+
run: |
51+
cd backend/core-orbits
52+
pip install ruff
53+
ruff check .
54+
55+
- name: Run tests
56+
env:
57+
DATABASE_URL: postgresql://test:test@localhost:5432/test_db
58+
run: |
59+
cd backend/core-orbits
60+
pytest -v --tb=short
61+
62+
test-routing:
63+
name: Test Routing Service
64+
runs-on: ubuntu-latest
65+
66+
services:
67+
postgres:
68+
image: postgres:15-alpine
69+
env:
70+
POSTGRES_USER: test
71+
POSTGRES_PASSWORD: test
72+
POSTGRES_DB: test_db
73+
ports:
74+
- 5432:5432
75+
options: >-
76+
--health-cmd pg_isready
77+
--health-interval 10s
78+
--health-timeout 5s
79+
--health-retries 5
80+
81+
steps:
82+
- uses: actions/checkout@v4
83+
84+
- name: Set up Python
85+
uses: actions/setup-python@v5
86+
with:
87+
python-version: '3.11'
88+
cache: 'pip'
89+
cache-dependency-path: backend/routing/requirements.txt
90+
91+
- name: Install dependencies
92+
run: |
93+
cd backend/routing
94+
pip install -r requirements.txt
95+
96+
- name: Run linting
97+
run: |
98+
cd backend/routing
99+
pip install ruff
100+
ruff check .
101+
102+
- name: Run tests
103+
env:
104+
DATABASE_URL: postgresql://test:test@localhost:5432/test_db
105+
run: |
106+
cd backend/routing
107+
pytest -v --tb=short
108+
109+
test-ground-scheduler:
110+
name: Test Ground Scheduler Service
111+
runs-on: ubuntu-latest
112+
113+
services:
114+
postgres:
115+
image: postgres:15-alpine
116+
env:
117+
POSTGRES_USER: test
118+
POSTGRES_PASSWORD: test
119+
POSTGRES_DB: test_db
120+
ports:
121+
- 5432:5432
122+
options: >-
123+
--health-cmd pg_isready
124+
--health-interval 10s
125+
--health-timeout 5s
126+
--health-retries 5
127+
128+
steps:
129+
- uses: actions/checkout@v4
130+
131+
- name: Set up Python
132+
uses: actions/setup-python@v5
133+
with:
134+
python-version: '3.11'
135+
cache: 'pip'
136+
cache-dependency-path: backend/ground-scheduler/requirements.txt
137+
138+
- name: Install dependencies
139+
run: |
140+
cd backend/ground-scheduler
141+
pip install -r requirements.txt
142+
143+
- name: Run linting
144+
run: |
145+
cd backend/ground-scheduler
146+
pip install ruff
147+
ruff check .
148+
149+
- name: Run tests
150+
env:
151+
DATABASE_URL: postgresql://test:test@localhost:5432/test_db
152+
run: |
153+
cd backend/ground-scheduler
154+
pytest -v --tb=short
155+
156+
test-ai-agents:
157+
name: Test AI Agents Service
158+
runs-on: ubuntu-latest
159+
160+
steps:
161+
- uses: actions/checkout@v4
162+
163+
- name: Set up Python
164+
uses: actions/setup-python@v5
165+
with:
166+
python-version: '3.11'
167+
cache: 'pip'
168+
cache-dependency-path: backend/ai-agents/requirements.txt
169+
170+
- name: Install dependencies
171+
run: |
172+
cd backend/ai-agents
173+
pip install -r requirements.txt
174+
175+
- name: Run linting
176+
run: |
177+
cd backend/ai-agents
178+
pip install ruff
179+
ruff check .
180+
181+
- name: Run tests
182+
run: |
183+
cd backend/ai-agents
184+
pytest -v --tb=short

.github/workflows/ci-frontend.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI - Frontend
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
paths:
7+
- 'frontend/**'
8+
- '.github/workflows/ci-frontend.yml'
9+
pull_request:
10+
branches: [main]
11+
paths:
12+
- 'frontend/**'
13+
14+
jobs:
15+
build-and-test:
16+
name: Build and Test Frontend
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '20'
26+
cache: 'npm'
27+
cache-dependency-path: frontend/web/package-lock.json
28+
29+
- name: Install dependencies
30+
run: |
31+
cd frontend/web
32+
npm ci
33+
34+
- name: Run linting
35+
run: |
36+
cd frontend/web
37+
npm run lint
38+
39+
- name: Run type check
40+
run: |
41+
cd frontend/web
42+
npm run type-check
43+
44+
- name: Run tests
45+
run: |
46+
cd frontend/web
47+
npm test -- --run
48+
49+
- name: Build
50+
run: |
51+
cd frontend/web
52+
npm run build
53+
54+
- name: Upload build artifacts
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: frontend-build
58+
path: frontend/web/dist
59+
retention-days: 7

.github/workflows/deploy-dev.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy to Dev
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
environment:
7+
description: 'Deployment environment'
8+
required: true
9+
default: 'dev'
10+
type: choice
11+
options:
12+
- dev
13+
- staging
14+
15+
jobs:
16+
deploy:
17+
name: Deploy to ${{ github.event.inputs.environment }}
18+
runs-on: ubuntu-latest
19+
environment: ${{ github.event.inputs.environment }}
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Set up kubectl
25+
uses: azure/setup-kubectl@v3
26+
with:
27+
version: 'latest'
28+
29+
# NOTE: This is a template. Configure your Kubernetes cluster connection.
30+
# - name: Configure Kubernetes
31+
# run: |
32+
# echo "${{ secrets.KUBE_CONFIG }}" | base64 -d > kubeconfig
33+
# export KUBECONFIG=kubeconfig
34+
35+
- name: Deploy with Docker Compose (Dev)
36+
if: github.event.inputs.environment == 'dev'
37+
run: |
38+
echo "To deploy to dev environment:"
39+
echo "1. SSH to your dev server"
40+
echo "2. cd to constellation-hub/infra/docker"
41+
echo "3. Run: docker-compose up -d"
42+
echo ""
43+
echo "This workflow is a template for future automation."
44+
45+
- name: Deploy with Kubernetes (Staging)
46+
if: github.event.inputs.environment == 'staging'
47+
run: |
48+
echo "To deploy to staging environment:"
49+
echo "1. Configure KUBE_CONFIG secret"
50+
echo "2. Apply manifests from infra/k8s/"
51+
echo "3. kubectl apply -f infra/k8s/"
52+
echo ""
53+
echo "This workflow is a template for future automation."

0 commit comments

Comments
 (0)