Skip to content

Commit 981ad4a

Browse files
committed
chore: rename hivemind→devsper across entire registry repo
- Go module: github.com/rithul/hivemind/registry/api → github.com/devsper-com/registry/api - All Go imports, config defaults, test assertions updated - SQL schema/queries: requires_hivemind → requires_devsper - Web frontend: package name, titles, branding, auth, types - Deploy: Caddyfile, docker-compose, scripts → devsper domains/paths - CI: deploy.yml and infra.yml paths fixed for standalone repo structure - Terraform: all resource names, defaults, tags, state backend - Docs: README, DEPLOY, SECURITY, RUNBOOK, oauth-setup - Email templates: Devsper Registry branding, devsper.com domains - ECR images: devsper-registry-api, devsper-registry-web - IAM role: devsper-deploy - S3 buckets: devsper-registry-packages, devsper-registry-dev - Remove stale build artifacts (api/bin/registry, api/registry, tsconfig.node.tsbuildinfo)
1 parent 054efad commit 981ad4a

95 files changed

Lines changed: 334 additions & 336 deletions

Some content is hidden

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

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Usage: cd registry && just dev (loads .env via dotenv-load)
33

44
# Required
5-
DATABASE_URL=postgresql://registry:registry@localhost:5432/hivemind_registry?sslmode=disable
5+
DATABASE_URL=postgresql://registry:registry@localhost:5432/devsper_registry?sslmode=disable
66
JWKS_URL=http://localhost:3000/auth/.well-known/jwks.json
77
INTERNAL_SECRET=dev-internal-secret
88
# Better Auth signing/CSRF (optional in dev; set in prod)

.env.prod.example

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
POSTGRES_USER=registry
55
# Generate a strong password: openssl rand -base64 32
66
POSTGRES_PASSWORD=your-secure-password
7-
POSTGRES_DB=hivemind_registry
7+
POSTGRES_DB=devsper_registry
88

99
JWT_SECRET=your-jwt-secret-min-32-bytes-base64-or-hex
1010

1111
# Better Auth JWKS URL for JWT verification (required if using Better Auth instead of legacy JWT)
12-
JWKS_URL=https://auth.hivemind.rithul.dev/auth/.well-known/jwks.json
12+
JWKS_URL=https://auth.docs.devsper.com/auth/.well-known/jwks.json
1313
# Internal secret for auth service <-> API calls (must be >= 32 chars in production)
1414
# Generate with: openssl rand -base64 48
1515
INTERNAL_SECRET=
@@ -22,11 +22,11 @@ S3_BUCKET=
2222
S3_REGION=us-east-1
2323
SES_REGION=
2424
SES_FROM_ADDRESS=
25-
BASE_URL=https://registry.hivemind.rithul.dev
25+
BASE_URL=https://registry.devsper.com
2626

2727
# Frontend build-time (used when building web image)
28-
VITE_API_BASE_URL=https://registry.hivemind.rithul.dev
29-
VITE_REGISTRY_URL=https://registry.hivemind.rithul.dev/simple/
28+
VITE_API_BASE_URL=https://registry.devsper.com
29+
VITE_REGISTRY_URL=https://registry.devsper.com/simple/
3030

3131
RATE_LIMIT_RPS=10
3232
MAX_UPLOAD_SIZE_MB=100

.github/workflows/deploy.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Registry Deploy: test both components, build arm64 images, push to ECR, deploy stack.
2-
# Replaces per-component workflows (registry-api.yml, registry-web.yml).
32
#
43
# Triggers:
5-
# - Push to main touching registry/** or this workflow
4+
# - Push to main touching api/** or web/** or this workflow
65
# - Manual dispatch with optional force deploy (skip tests)
76

87
name: Registry Deploy
@@ -11,8 +10,9 @@ on:
1110
push:
1211
branches: [main]
1312
paths:
14-
- "registry/**"
15-
- ".github/workflows/registry-deploy.yml"
13+
- "api/**"
14+
- "web/**"
15+
- ".github/workflows/deploy.yml"
1616
workflow_dispatch:
1717
inputs:
1818
force:
@@ -46,15 +46,15 @@ jobs:
4646
with:
4747
go-version: "1.24"
4848
cache: true
49-
cache-dependency-path: registry/api/go.sum
49+
cache-dependency-path: api/go.sum
5050
- name: Run Go tests
5151
run: go test ./... -race -coverprofile=coverage.out
52-
working-directory: registry/api
52+
working-directory: api
5353
env:
5454
DATABASE_URL: postgres://test:test@localhost:5432/test?sslmode=disable
5555
- name: Run go vet
5656
run: go vet ./...
57-
working-directory: registry/api
57+
working-directory: api
5858

5959
test-web:
6060
if: ${{ !inputs.force }}
@@ -66,10 +66,10 @@ jobs:
6666
bun-version: latest
6767
- name: Install dependencies
6868
run: bun install --frozen-lockfile
69-
working-directory: registry/web
69+
working-directory: web
7070
- name: Typecheck
7171
run: bun run tsc -b
72-
working-directory: registry/web
72+
working-directory: web
7373

7474
# ── Build & Push ───────────────────────────────────────────────────────
7575

@@ -91,7 +91,7 @@ jobs:
9191

9292
- uses: aws-actions/configure-aws-credentials@v4
9393
with:
94-
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/hivemind-registry-deploy
94+
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/devsper-deploy
9595
aws-region: us-east-1
9696

9797
- uses: aws-actions/amazon-ecr-login@v2
@@ -102,24 +102,24 @@ jobs:
102102
- name: Build and push API image
103103
uses: docker/build-push-action@v6
104104
with:
105-
context: registry/api
105+
context: api
106106
platforms: linux/arm64
107107
push: true
108108
tags: |
109-
${{ steps.ecr-login.outputs.registry }}/hivemind-registry-api:latest
110-
${{ steps.ecr-login.outputs.registry }}/hivemind-registry-api:${{ github.sha }}
109+
${{ steps.ecr-login.outputs.registry }}/devsper-registry-api:latest
110+
${{ steps.ecr-login.outputs.registry }}/devsper-registry-api:${{ github.sha }}
111111
cache-from: type=gha,scope=registry-api
112112
cache-to: type=gha,mode=max,scope=registry-api
113113

114114
- name: Build and push Web image
115115
uses: docker/build-push-action@v6
116116
with:
117-
context: registry/web
117+
context: web
118118
platforms: linux/arm64
119119
push: true
120120
tags: |
121-
${{ steps.ecr-login.outputs.registry }}/hivemind-registry-web:latest
122-
${{ steps.ecr-login.outputs.registry }}/hivemind-registry-web:${{ github.sha }}
121+
${{ steps.ecr-login.outputs.registry }}/devsper-registry-web:latest
122+
${{ steps.ecr-login.outputs.registry }}/devsper-registry-web:${{ github.sha }}
123123
cache-from: type=gha,scope=registry-web
124124
cache-to: type=gha,mode=max,scope=registry-web
125125

@@ -139,7 +139,7 @@ jobs:
139139
steps:
140140
- uses: aws-actions/configure-aws-credentials@v4
141141
with:
142-
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/hivemind-registry-deploy
142+
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/devsper-deploy
143143
aws-region: us-east-1
144144

145145
- name: Deploy via EC2 Instance Connect
@@ -155,7 +155,7 @@ jobs:
155155
ssh -i /tmp/deploy_key -o StrictHostKeyChecking=no ubuntu@"$EC2_HOST" \
156156
"set -euo pipefail && \
157157
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_REGISTRY && \
158-
cd /opt/hivemind-registry && \
158+
cd /opt/devsper-registry && \
159159
docker compose -f docker-compose.prod.yml --env-file .env.prod pull api web && \
160160
docker compose -f docker-compose.prod.yml --env-file .env.prod up -d --no-deps web && \
161161
sleep 3 && \
@@ -170,19 +170,19 @@ jobs:
170170
sleep 8
171171
172172
# Check API health
173-
curl -sf --retry 3 --retry-delay 5 "https://registry.hivemind.rithul.dev/health" || \
173+
curl -sf --retry 3 --retry-delay 5 "https://registry.devsper.com/health" || \
174174
{ echo "FAIL: /health"; exit 1; }
175175
176176
# Check JWKS endpoint
177-
curl -sf --retry 3 --retry-delay 5 "https://registry.hivemind.rithul.dev/auth/jwks" || \
177+
curl -sf --retry 3 --retry-delay 5 "https://registry.devsper.com/auth/jwks" || \
178178
{ echo "FAIL: /auth/jwks"; exit 1; }
179179
180180
# Check web frontend
181-
curl -sf --retry 3 --retry-delay 5 "https://registry.hivemind.rithul.dev/" || \
181+
curl -sf --retry 3 --retry-delay 5 "https://registry.devsper.com/" || \
182182
{ echo "FAIL: / (web)"; exit 1; }
183183
184184
# Check packages API
185-
curl -sf --retry 3 --retry-delay 5 "https://registry.hivemind.rithul.dev/api/v1/packages" || \
185+
curl -sf --retry 3 --retry-delay 5 "https://registry.devsper.com/api/v1/packages" || \
186186
{ echo "FAIL: /api/v1/packages"; exit 1; }
187187
188188
echo "All smoke tests passed"

.github/workflows/infra.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Infrastructure: Terraform plan on PR (with comment), apply on push to main.
2-
# Path filter: registry/infra. Manual run: workflow_dispatch.
2+
# Path filter: infra/**. Manual run: workflow_dispatch.
33

44
name: Infrastructure
55

66
on:
77
push:
88
branches: [main]
99
paths:
10-
- "registry/infra/**"
10+
- "infra/**"
1111
pull_request:
1212
branches: [main]
1313
paths:
14-
- "registry/infra/**"
14+
- "infra/**"
1515
workflow_dispatch:
1616

1717
jobs:
@@ -25,15 +25,15 @@ jobs:
2525
- uses: actions/checkout@v4
2626
- uses: aws-actions/configure-aws-credentials@v4
2727
with:
28-
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/hivemind-registry-deploy
28+
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/devsper-deploy
2929
aws-region: us-east-1
3030
- uses: hashicorp/setup-terraform@v3
31-
- run: cd registry/infra && terraform init
32-
- run: cd registry/infra && terraform validate
33-
- run: cd registry/infra && terraform plan -no-color -out=tfplan
31+
- run: cd infra && terraform init
32+
- run: cd infra && terraform validate
33+
- run: cd infra && terraform plan -no-color -out=tfplan
3434
- id: plan_show
3535
run: |
36-
cd registry/infra && terraform show -no-color tfplan > plan.txt
36+
cd infra && terraform show -no-color tfplan > plan.txt
3737
echo "plan<<PLANEOF" >> $GITHUB_OUTPUT
3838
cat plan.txt >> $GITHUB_OUTPUT
3939
echo "PLANEOF" >> $GITHUB_OUTPUT
@@ -69,8 +69,8 @@ jobs:
6969
- uses: actions/checkout@v4
7070
- uses: aws-actions/configure-aws-credentials@v4
7171
with:
72-
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/hivemind-registry-deploy
72+
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/devsper-deploy
7373
aws-region: us-east-1
7474
- uses: hashicorp/setup-terraform@v3
75-
- run: cd registry/infra && terraform init
76-
- run: cd registry/infra && terraform apply -auto-approve
75+
- run: cd infra && terraform init
76+
- run: cd infra && terraform apply -auto-approve

DEPLOY.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
## Architecture
44

5-
The hivemind project deploys two services to a single EC2 instance:
5+
The devsper project deploys two services to a single EC2 instance:
66

7-
- **Registry** (`registry.hivemind.rithul.dev`) — Go API + Node.js web app + Postgres, running via Docker Compose behind Caddy
8-
- **Docs** (`hivemind.rithul.dev`) — Static Docusaurus site served by the same Caddy instance
7+
- **Registry** (`registry.devsper.com`) — Go API + Node.js web app + Postgres, running via Docker Compose behind Caddy
8+
- **Docs** (`docs.devsper.com`) — Static Docusaurus site served by the same Caddy instance
99

1010
## CI/CD Workflows
1111

@@ -26,7 +26,7 @@ Manual dispatch supports a `force` boolean to skip tests.
2626

2727
Triggers on push to `main` touching `website/**`, or manual dispatch.
2828

29-
Single job: build Docusaurus, rsync `website/build/` to EC2 `/opt/hivemind-docs/`, verify with curl.
29+
Single job: build Docusaurus, rsync `website/build/` to EC2 `/opt/devsper-docs/`, verify with curl.
3030

3131
### `docs.yml` — Docs Versioning
3232

@@ -46,13 +46,13 @@ Triggers on release published. Creates a versioned docs snapshot via `docusaurus
4646

4747
All workflows authenticate to AWS via OIDC federation — no static AWS keys are stored in GitHub.
4848

49-
- **Role**: `arn:aws:iam::<account-id>:role/hivemind-registry-deploy`
49+
- **Role**: `arn:aws:iam::<account-id>:role/devsper-deploy`
5050
- **Trust policy**: Allows `sts:AssumeRoleWithWebIdentity` from the GitHub OIDC provider for this repository
5151
- **Permissions**: ECR push/pull, EC2 Instance Connect `SendSSHPublicKey`, S3 (for package storage)
5252

5353
### Environment Secrets (on EC2)
5454

55-
The file `/opt/hivemind-registry/.env.prod` contains production secrets:
55+
The file `/opt/devsper-registry/.env.prod` contains production secrets:
5656

5757
```
5858
ECR_REGISTRY=<account-id>.dkr.ecr.us-east-1.amazonaws.com
@@ -61,7 +61,7 @@ POSTGRES_PASSWORD=<password>
6161
POSTGRES_DB=registry
6262
JWT_SECRET=<secret>
6363
INTERNAL_SECRET=<secret>
64-
BASE_URL=https://registry.hivemind.rithul.dev
64+
BASE_URL=https://registry.devsper.com
6565
AWS_REGION=us-east-1
6666
BUCKET_NAME=<s3-bucket>
6767
GITHUB_CLIENT_ID=<id>
@@ -82,9 +82,9 @@ GOOGLE_CLIENT_SECRET=<secret>
8282
### Registry Setup
8383

8484
```bash
85-
sudo mkdir -p /opt/hivemind-registry
86-
sudo chown ubuntu:ubuntu /opt/hivemind-registry
87-
cd /opt/hivemind-registry
85+
sudo mkdir -p /opt/devsper-registry
86+
sudo chown ubuntu:ubuntu /opt/devsper-registry
87+
cd /opt/devsper-registry
8888

8989
# Copy docker-compose.prod.yml and Caddyfile from the repo
9090
# Create .env.prod with all required secrets (see above)
@@ -96,23 +96,23 @@ docker compose -f docker-compose.prod.yml --env-file .env.prod up -d
9696
### Docs Setup
9797

9898
```bash
99-
sudo mkdir -p /opt/hivemind-docs
100-
sudo chown ubuntu:ubuntu /opt/hivemind-docs
99+
sudo mkdir -p /opt/devsper-docs
100+
sudo chown ubuntu:ubuntu /opt/devsper-docs
101101
```
102102

103-
The docs-deploy workflow will rsync the built Docusaurus site to `/opt/hivemind-docs/`. Caddy serves it via the `hivemind.rithul.dev` server block in the Caddyfile.
103+
The docs-deploy workflow will rsync the built Docusaurus site to `/opt/devsper-docs/`. Caddy serves it via the `docs.devsper.com` server block in the Caddyfile.
104104

105105
### Caddyfile
106106

107-
The Caddyfile at `/opt/hivemind-registry/Caddyfile` serves both domains:
107+
The Caddyfile at `/opt/devsper-registry/Caddyfile` serves both domains:
108108

109-
- `registry.hivemind.rithul.dev` → reverse proxy to API (`:8080`) and Web (`:3000`)
110-
- `hivemind.rithul.dev` → static files from `/srv/docs` (host bind-mount from `/opt/hivemind-docs`)
109+
- `registry.devsper.com` → reverse proxy to API (`:8080`) and Web (`:3000`)
110+
- `docs.devsper.com` → static files from `/srv/docs` (host bind-mount from `/opt/devsper-docs`)
111111

112112
After updating the Caddyfile, reload Caddy:
113113

114114
```bash
115-
cd /opt/hivemind-registry
115+
cd /opt/devsper-registry
116116
docker compose -f docker-compose.prod.yml --env-file .env.prod exec caddy caddy reload --config /etc/caddy/Caddyfile
117117
```
118118

@@ -121,7 +121,7 @@ docker compose -f docker-compose.prod.yml --env-file .env.prod exec caddy caddy
121121
Migrations are embedded in the API binary and run automatically on startup. If you need to run them manually:
122122

123123
```bash
124-
cd /opt/hivemind-registry
124+
cd /opt/devsper-registry
125125
docker compose -f docker-compose.prod.yml --env-file .env.prod exec api /registry migrate
126126
```
127127

@@ -134,7 +134,7 @@ Trigger via GitHub Actions → "Registry Deploy" → Run workflow (optionally ch
134134
Or SSH to EC2 and pull/restart manually:
135135

136136
```bash
137-
cd /opt/hivemind-registry
137+
cd /opt/devsper-registry
138138
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin <ecr-registry>
139139
docker compose -f docker-compose.prod.yml --env-file .env.prod pull api web
140140
docker compose -f docker-compose.prod.yml --env-file .env.prod up -d --no-deps web
@@ -150,5 +150,5 @@ Or build locally and rsync:
150150

151151
```bash
152152
cd website && npm ci && npm run build
153-
rsync -azP --delete website/build/ ubuntu@<ec2-host>:/opt/hivemind-docs/
153+
rsync -azP --delete website/build/ ubuntu@<ec2-host>:/opt/devsper-docs/
154154
```

README.docker.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cd registry
1818
docker compose -f docker-compose.dev.yml up --build
1919
```
2020

21-
- **Postgres**: localhost:5432 (user `registry`, password `registry`, db `hivemind_registry`)
21+
- **Postgres**: localhost:5432 (user `registry`, password `registry`, db `devsper_registry`)
2222
- **API**: http://localhost:8080 (Go app with Air hot reload)
2323
- **Web**: http://localhost:3000 (Vite dev server; serves `/auth` in-process, proxies `/api` and `/simple` to API)
2424

@@ -50,25 +50,25 @@ If you see **CONNRESET** in the browser or terminal, the API may have restarted
5050

5151
- Configure the index in `pyproject.toml`:
5252
```toml
53-
[tool.hivemind]
53+
[tool.devsper]
5454
index-url = "http://localhost:3000/simple/"
5555
```
5656
- Upload via the registry UI (package page → upload), or use the API with auth (e.g. `POST /api/v1/packages/{name}/upload` with Bearer token or API key).
5757

5858
Trust/certificate warnings for `http://` are expected for local dev; use HTTPS in production.
5959

60-
### Test plugin (hivemind-plugin-demo)
60+
### Test plugin (devsper-plugin-demo)
6161

6262
A minimal plugin lives in `registry/test-plugin/`. To build and optionally seed the registry:
6363

6464
1. **Build the wheel**: From repo root, `just test-plugin-build` (or `cd registry/test-plugin && pip install build && python -m build`).
65-
2. **Create the package and upload**: Use the web UI (register, create package `hivemind-plugin-demo`, upload the wheel from `registry/test-plugin/dist/`), or run the seed script when the API has storage (S3) configured:
65+
2. **Create the package and upload**: Use the web UI (register, create package `devsper-plugin-demo`, upload the wheel from `registry/test-plugin/dist/`), or run the seed script when the API has storage (S3) configured:
6666
```bash
6767
./registry/scripts/seed-dev.sh
6868
# Or with custom wheel: ./registry/scripts/seed-dev.sh /path/to/wheel.whl
6969
```
7070
Set `REGISTRY_EMAIL`, `REGISTRY_PASSWORD` if needed; default is `seed@localhost` / `seedpass123`.
71-
3. **Install from the registry**: `pip install --index-url http://localhost:3000/simple/ hivemind-plugin-demo` (or `just test-plugin-install` from repo root).
71+
3. **Install from the registry**: `pip install --index-url http://localhost:3000/simple/ devsper-plugin-demo` (or `just test-plugin-install` from repo root).
7272

7373
Without S3 configured, the API will not accept uploads (upload and file download return 503). For local dev with uploads, use AWS credentials and set `S3_BUCKET`, or use a local S3-compatible store (e.g. LocalStack).
7474

0 commit comments

Comments
 (0)