Skip to content

Commit b01d17f

Browse files
committed
rename from to
1 parent eb9ac7a commit b01d17f

32 files changed

Lines changed: 48 additions & 48 deletions
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Planet Gateway Builder
1+
name: Gateway Builder
22

33
on:
44
push:
@@ -30,7 +30,7 @@ jobs:
3030
echo "::set-output name=version::$version"
3131
3232
build:
33-
name: Planet Gateway build
33+
name: Gateway build
3434
needs: [ build-prepare ]
3535
runs-on: ubuntu-latest
3636
env:
@@ -59,11 +59,11 @@ jobs:
5959
BRANCH="${GITHUB_REF_NAME//\//-}"
6060
BRANCH_HASH="$(printf '%s' "$BRANCH" | sha256sum | cut -c1-8)"
6161
SAFE_BRANCH="${BRANCH:0:75}-$BRANCH_HASH"
62-
repo="$DOCKER_ORG/$DOCKER_REPO_TAG:${{ matrix.arch }}-planet-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
63-
branchrepo="$DOCKER_ORG/$DOCKER_REPO_TAG:${{ matrix.arch }}-planet-gateway-$PLANET_VERSION-$SAFE_BRANCH"
62+
repo="$DOCKER_ORG/$DOCKER_REPO_TAG:${{ matrix.arch }}-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
63+
branchrepo="$DOCKER_ORG/$DOCKER_REPO_TAG:${{ matrix.arch }}-gateway-$PLANET_VERSION-$SAFE_BRANCH"
6464
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
6565
docker build \
66-
-f './docker/planet-gateway/Dockerfile' \
66+
-f './docker/gateway/Dockerfile' \
6767
--build-arg BASE_IMAGE='${{ matrix.base_image }}' \
6868
-t $repo .
6969
docker images
@@ -87,10 +87,10 @@ jobs:
8787
BRANCH="${GITHUB_REF_NAME//\//-}"
8888
BRANCH_HASH="$(printf '%s' "$BRANCH" | sha256sum | cut -c1-8)"
8989
SAFE_BRANCH="${BRANCH:0:75}-$BRANCH_HASH"
90-
manifesttag="$DOCKER_ORG/$DOCKER_REPO_TAG:planet-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
91-
amd64tag="$DOCKER_ORG/$DOCKER_REPO_TAG:amd64-planet-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
92-
armtag="$DOCKER_ORG/$DOCKER_REPO_TAG:arm-planet-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
93-
arm64tag="$DOCKER_ORG/$DOCKER_REPO_TAG:arm64-planet-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
90+
manifesttag="$DOCKER_ORG/$DOCKER_REPO_TAG:gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
91+
amd64tag="$DOCKER_ORG/$DOCKER_REPO_TAG:amd64-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
92+
armtag="$DOCKER_ORG/$DOCKER_REPO_TAG:arm-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
93+
arm64tag="$DOCKER_ORG/$DOCKER_REPO_TAG:arm64-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
9494
docker manifest create $manifesttag $amd64tag $armtag $arm64tag
9595
docker manifest annotate $manifesttag $amd64tag --os linux --arch amd64
9696
docker manifest annotate $manifesttag $armtag --os linux --arch arm
@@ -103,10 +103,10 @@ jobs:
103103
BRANCH="${GITHUB_REF_NAME//\//-}"
104104
BRANCH_HASH="$(printf '%s' "$BRANCH" | sha256sum | cut -c1-8)"
105105
SAFE_BRANCH="${BRANCH:0:75}-$BRANCH_HASH"
106-
amd64tag="$DOCKER_ORG/$DOCKER_REPO_TAG:amd64-planet-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
107-
armtag="$DOCKER_ORG/$DOCKER_REPO_TAG:arm-planet-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
108-
arm64tag="$DOCKER_ORG/$DOCKER_REPO_TAG:arm64-planet-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
109-
for tag in "$DOCKER_ORG/$DOCKER_REPO:planet-gateway-$PLANET_VERSION" "$DOCKER_ORG/$DOCKER_REPO:planet-gateway"; do
106+
amd64tag="$DOCKER_ORG/$DOCKER_REPO_TAG:amd64-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
107+
armtag="$DOCKER_ORG/$DOCKER_REPO_TAG:arm-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
108+
arm64tag="$DOCKER_ORG/$DOCKER_REPO_TAG:arm64-gateway-$PLANET_VERSION-$SAFE_BRANCH-${GITHUB_SHA::8}"
109+
for tag in "$DOCKER_ORG/$DOCKER_REPO:gateway-$PLANET_VERSION" "$DOCKER_ORG/$DOCKER_REPO:gateway"; do
110110
docker manifest create $tag $amd64tag $armtag $arm64tag
111111
docker manifest annotate $tag $amd64tag --os linux --arch amd64
112112
docker manifest annotate $tag $armtag --os linux --arch arm

CLAUDE.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Commands
66

7-
Prerequisites: Node.js v18, npm v10, Angular CLI v18. A CouchDB instance must be running (the README describes a Docker Compose setup that exposes CouchDB on port 2200 and `planet-gateway` on port 5000).
7+
Prerequisites: Node.js v18, npm v10, Angular CLI v18. A CouchDB instance must be running (the README describes a Docker Compose setup that exposes CouchDB on port 2200 and `gateway` on port 5000).
88

99
### Angular app (root)
1010

1111
- `npm install` — install dependencies.
12-
- `npm run install-hooks` — copy `git-hooks/*` into `.git/hooks`. The `pre-push` hook runs `npm run lint` in both the root and `planet-gateway/`.
12+
- `npm run install-hooks` — copy `git-hooks/*` into `.git/hooks`. The `pre-push` hook runs `npm run lint` in both the root and `gateway/`.
1313
- `npm start` / `ng serve` — dev server on port 3000 (host `0.0.0.0`). If 3000 is taken, use `ng serve --port 3001`.
14-
- `npm run dev` — runs `dev-env.sh` (which templates `src/environments/environment.dev.ts` from `environment.template` using `CHAT_PORT`, `COUCH_PORT`, `PARENT_PROTOCOL` from an optional `.env`) then `ng serve --configuration dev`. Use this when `planet-gateway` or CouchDB are on non-default ports.
14+
- `npm run dev` — runs `dev-env.sh` (which templates `src/environments/environment.dev.ts` from `environment.template` using `CHAT_PORT`, `COUCH_PORT`, `PARENT_PROTOCOL` from an optional `.env`) then `ng serve --configuration dev`. Use this when `gateway` or CouchDB are on non-default ports.
1515
- `npm run build` — production build via `ng-high-memory` (`--max_old_space_size=4096`); large builds OOM without it.
1616
- `npm run test` — Karma + Jasmine; opens `localhost:9876`. There is no `e2e` workflow wired up on this branch.
1717
- Single spec: `ng test --include src/app/path/to/file.spec.ts` (or temporarily use `fdescribe` / `fit`).
1818
- `npm run lint` — ESLint over `src/**/*.{ts,html}` via `@angular-eslint/builder`. `ng lint --fix` auto-fixes.
1919
- `npm run lint-all` — sass-lint + `ng lint --type-check` + htmlhint. Heavier than the pre-push hook.
2020
- Locales (en, so, fr, ne, ar, es): `ng serve --configuration <spa|fra|nep|ara|som>` or `LNG=es npm start`. Locale configs, base hrefs, and xlf sources are defined in `angular.json` under `projects.planet-app.i18n`.
2121

22-
### planet-gateway (`planet-gateway/`)
22+
### gateway (`gateway/`)
2323

24-
Independent Node service; requires its own `.env` (see `planet-gateway/README.md`) with `SERVE_PORT`, `COUCHDB_HOST`, `COUCHDB_USER`, `COUCHDB_PASS`. macOS/Windows users typically use `SERVE_PORT=5400` and mirror it in the root `.env` as `CHAT_PORT`.
24+
Independent Node service; requires its own `.env` (see `gateway/README.md`) with `SERVE_PORT`, `COUCHDB_HOST`, `COUCHDB_USER`, `COUCHDB_PASS`. macOS/Windows users typically use `SERVE_PORT=5400` and mirror it in the root `.env` as `CHAT_PORT`.
2525

26-
- `cd planet-gateway && npm install && npm run dev` — nodemon + ts-node.
26+
- `cd gateway && npm install && npm run dev` — nodemon + ts-node.
2727
- `npm run build``tsc`.
2828
- `npm run lint` / `npm run lint-fix` — uses legacy ESLint config (`ESLINT_USE_FLAT_CONFIG=false`); the root app uses flat config (`eslint.config.mjs`), so don't try to unify them casually.
29-
- Only one planet-gateway can bind the port at a time; stop the Docker gateway container before `npm run dev`.
29+
- Only one `gateway` instance can bind the port at a time; stop the Docker gateway container before `npm run dev`.
3030

3131
### CouchDB bootstrap
3232

@@ -43,9 +43,9 @@ Planet Learning is an Angular 19 + CouchDB learning platform. There are two tier
4343
- `couchdb.service.ts` — HTTP wrapper around CouchDB used by most features. Every request goes through `setOpts` / `couchDBReq`, which injects `withCredentials` and surfaces 403s via `PlanetMessageService`. Prefer adding new calls through this service rather than raw `HttpClient`.
4444
- `database/pouch.service.ts` + `pouch-auth.service.ts` — PouchDB mirror for offline-capable data (currently seeded with `feedback`). When adding an offline-capable database, register it in the `databases` Set so `configureDBs()` creates the local mirror.
4545
- `src/app/manager-dashboard/` — admin surfaces (sync, fetch, AI configuration, reports, requests, certifications). AI provider keys/models are read from the CouchDB `configurations` database; do not hardcode them.
46-
- `planet-gateway/` — standalone Express + WebSocket gateway with internal `chatapi` and `public` modules. It serves chat on the existing `/ml/` namespace and scoped public operations on `/api/`. Credentials/models come from the CouchDB `configurations` doc, not env vars.
46+
- `gateway/` — standalone Express + WebSocket gateway with internal `chatapi` and `public` modules. It serves chat on the existing `/ml/` namespace and scoped public operations on `/api/`. Credentials/models come from the CouchDB `configurations` doc, not env vars.
4747
- `design/` — CouchDB design documents (map/reduce views). Edit the per-db `.js` files and re-run `couchdb-setup.sh` to upload.
48-
- `docker/` — Dockerfiles for `planet` (nginx + built Angular bundle), `planet-gateway`, and `db-init`. `docker/planet/default.conf.template` and `docker/planet/scripts/` drive the production entrypoint.
48+
- `docker/` — Dockerfiles for `planet` (nginx + built Angular bundle), `gateway`, and `db-init`. `docker/planet/default.conf.template` and `docker/planet/scripts/` drive the production entrypoint.
4949
- `src/environments/``environment.ts` (local dev), `environment.dev.ts` (generated by `dev-env.sh`, git-ignored), `environment.test.ts`, `environment.prod.ts`, plus the `environment.template` consumed by `dev-env.sh`.
5050
- `src/i18n/messages.*.xlf` — translation catalogs; do not edit by hand outside a normal i18n extraction flow.
5151

@@ -63,4 +63,4 @@ From `Style-Guide.md` (read it before making UI changes):
6363

6464
### Git workflow
6565

66-
Develop on feature branches off `master`; the project asks for two positive reviews before merging. Install hooks (`npm run install-hooks`) so `pre-push` enforces lint in both `./` and `planet-gateway/`.
66+
Develop on feature branches off `master`; the project asks for two positive reviews before merging. Install hooks (`npm run install-hooks`) so `pre-push` enforces lint in both `./` and `gateway/`.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ docker compose -f planet-dev.yml -p planet-dev up -d
4444
```
4545

4646
Verify container status:
47-
Run ```docker ps -a``` after a minute. You should see two containers running: planet-gateway and couchdb. The db-init container should have exited.
47+
Run ```docker ps -a``` after a minute. You should see two containers running: gateway and couchdb. The db-init container should have exited.
4848

4949
Configure CORS for CouchDB:
5050
```
@@ -72,13 +72,13 @@ ng serve
7272
Visit localhost:3000 to access the Planet app.
7373
If port 3000 is in use, try ```ng serve --port 3001```
7474

75-
## Planet Gateway Notes
75+
## Gateway Notes
7676

7777
Configure the models (API keys & Models & Assistant settings) through the `manager dashboard -> AI Configurations` or directly in the `configurations` database in CouchDB.
7878

7979
Supported models: *OpenAI*, *Perplexity*, *Deepseek*, and *Gemini*
8080

81-
For gateway development instructions, refer to the [planet-gateway README](planet-gateway/README.md).
81+
For gateway development instructions, refer to the [gateway README](gateway/README.md).
8282

8383
## Project Guidelines
8484

dev-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ sed \
1414
-e "s/{{PARENT_PROTOCOL}}/${PARENT_PROTOCOL}/g" \
1515
src/environments/environment.template > src/environments/environment.dev.ts
1616

17-
echo "planet-gateway running on port: ${CHAT_PORT}"
17+
echo "gateway running on port: ${CHAT_PORT}"
1818
echo "couchdb running on port: ${COUCH_PORT}"
1919
echo "parent protocol: ${PARENT_PROTOCOL}"

docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ You'll see you containers like this
5050
```
5151
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5252
0914c167f20e d14b10ade528 "/bin/sh -c ./docker…" 2 weeks ago Up 2 seconds 0.0.0.0:80->80/tcp, [::]:80->80/tcp, 443/tcp planet-prod-planet-1
53-
42d4b4ea3826 898294509ee6 "npm run start" 2 weeks ago Up 2 seconds 0.0.0.0:5400->5400/tcp, [::]:5400->5400/tcp planet-prod-planet-gateway-1
53+
42d4b4ea3826 898294509ee6 "npm run start" 2 weeks ago Up 2 seconds 0.0.0.0:5400->5400/tcp, [::]:5400->5400/tcp planet-prod-gateway-1
5454
c03b86dfede9 9859c264e24e "/bin/sh -c 'bash ./…" 2 weeks ago Up 2 seconds planet-prod-db-init-1
5555
f7ddb76ae6b6 treehouses/couchdb:2.3.1 "tini -- /docker-ent…" 14 months ago Up 2 seconds 4369/tcp, 9100/tcp, 0.0.0.0:2200->5984/tcp, [::]:2200->5984/tcp planet-prod-couchdb-1
5656
```
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ ARG BASE_IMAGE=treehouses/node:3.16
33
FROM ${BASE_IMAGE} as builder
44
LABEL maintainer="dogi@ole.org,mutugiii@ole.org"
55

6-
COPY ./planet-gateway/package.json ./
6+
COPY ./gateway/package.json ./
77

88
RUN npm install
99

10-
COPY ./planet-gateway/src ./src/
11-
COPY ./planet-gateway/tsconfig.json ./
10+
COPY ./gateway/src ./src/
11+
COPY ./gateway/tsconfig.json ./
1212

1313
RUN npm run build
1414

1515
FROM ${BASE_IMAGE}
1616
LABEL maintainer="dogi@ole.org,mutugiii@ole.org"
1717

1818
RUN apk add --no-cache poppler-utils
19-
COPY ./planet-gateway/package.json ./
19+
COPY ./gateway/package.json ./
2020

2121
RUN npm install --production
2222
COPY --from=builder /dist ./dist/

docker/planet.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ services:
99
- "/srv/planet/conf:/opt/couchdb/etc/local.d"
1010
- "/srv/planet/data:/opt/couchdb/data"
1111
- "/srv/planet/log:/opt/couchdb/var/log"
12-
planet-gateway:
12+
gateway:
1313
expose:
1414
- 5000
15-
image: treehouses/planet:planet-gateway-local
15+
image: treehouses/planet:gateway-local
1616
depends_on:
1717
- couchdb
1818
ports:

docker/planet/default.conf.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ server {
135135
}
136136

137137
location /ml/ {
138-
proxy_pass http://planet-gateway:5000/;
138+
proxy_pass http://gateway:5000/;
139139
proxy_set_header Host $host;
140140
proxy_set_header X-Real-IP $remote_addr;
141141
client_max_body_size 1024M;
142142
}
143143

144144
location /api/ {
145-
proxy_pass http://planet-gateway:5000/;
145+
proxy_pass http://gateway:5000/;
146146
proxy_set_header Host $host;
147147
proxy_set_header X-Real-IP $remote_addr;
148148
client_max_body_size 1024M;

docker/planet/nginx/credentials.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if [ ! -z "$PLANET_USER" ] && ([ -z "$OLD_USER" ] || [ "$PLANET_USER" == "$OLD_U
1919
rm -f credentials/credentials.yml
2020
{
2121
echo "services:"
22-
echo " planet-gateway:"
22+
echo " gateway:"
2323
echo " environment:"
2424
echo " - COUCHDB_USER=$PLANET_USER"
2525
echo " - COUCHDB_PASS=$PLANET_PASS"

docker/planet/nginx/latest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ function upgrade {
99

1010
upgrade "treehouses/planet:db-init"
1111
upgrade "treehouses/planet:latest"
12-
upgrade "treehouses/planet:planet-gateway"
12+
upgrade "treehouses/planet:gateway"

0 commit comments

Comments
 (0)