-
Notifications
You must be signed in to change notification settings - Fork 0
Add prism-web-console as separate Go process with launcher integration #185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jrepp
wants to merge
18
commits into
main
Choose a base branch
from
feature/separate-web-console
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f55cdb3
Add RFC-039: Backend Configuration Registry
jrepp a32b64f
Expand RFC-039 with frontend interface bindings and slot schema integ…
jrepp 1965f51
Add docs PR validation workflow for documentation-only changes
jrepp 1f515a8
Add RFC-040: Multi-Language Client SDK Architecture
jrepp 63a6f63
Update submit-pr command for concise Why/How/What PR descriptions
jrepp fd686cf
Improve prism local start output with accurate endpoints and commands
jrepp cb2db2d
Create prism-web-console as separate Go process from prism-admin
jrepp 7152935
Fold prism-operator CHANGELOG into shared changelog
jrepp 87cc4cd
Add prism-web-console to prismctl local start with launcher integration
jrepp ea1921c
Resolve merge conflict in local_stack.go (keep web console output)
jrepp dbbba55
Add prism-web-console to task build pipeline
jrepp b667fd2
Merge main into feature/separate-web-console
jrepp 8f026ef
Merge Client SDK RFC from PR #191
jrepp ea301bf
Trigger PR sync
jrepp b548d5b
Merge branch 'main' into feature/separate-web-console
mergify[bot] bbff451
Merge branch 'main' into feature/separate-web-console
mergify[bot] bc0b92f
Merge branch 'main' into feature/separate-web-console
mergify[bot] 9ece713
Merge branch 'main' into feature/separate-web-console
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,228 @@ | ||
| # prism-web-console | ||
|
|
||
| Web-based admin console for Prism data access gateway. | ||
|
|
||
| **Status:** Initial implementation - separated from prism-admin control plane | ||
|
|
||
| ## Overview | ||
|
|
||
| `prism-web-console` provides a web-based UI for managing Prism: | ||
| - Namespace management (create, list, delete) | ||
| - Session monitoring | ||
| - Backend health dashboard | ||
| - Operational tasks | ||
|
|
||
| This service is separate from `prism-admin` (the control plane gRPC server) to provide: | ||
| - Clear separation of concerns (control plane vs UI) | ||
| - Independent scaling and deployment | ||
| - Technology flexibility (web framework choice independent of control plane) | ||
|
|
||
| ## Architecture | ||
|
|
||
| Based on RFC-036: Minimalist Web Framework for Prism Admin UI | ||
|
|
||
| ``` | ||
| Browser → prism-web-console (:8000) → prism-admin (:8981) | ||
| (Gin + templ + htmx) (gRPC Control Plane) | ||
| ``` | ||
|
|
||
| **Technology Stack:** | ||
| - **Gin**: HTTP routing and middleware | ||
| - **templ**: Type-safe HTML templates (to be added) | ||
| - **htmx**: HTML over the wire interactions | ||
| - **Tailwind CSS**: Utility-first styling | ||
|
|
||
| ## Installation | ||
|
|
||
| ### Build from Source | ||
|
|
||
| ```bash | ||
| cd cmd/prism-web-console | ||
| go build -o prism-web-console . | ||
| ``` | ||
|
|
||
| ### Install Globally | ||
|
|
||
| ```bash | ||
| cd cmd/prism-web-console | ||
| go install . | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Start the Server | ||
|
|
||
| ```bash | ||
| # Default: http://0.0.0.0:8000 | ||
| prism-web-console | ||
|
|
||
| # Custom port | ||
| prism-web-console --port 8080 | ||
|
|
||
| # With admin endpoint | ||
| prism-web-console --admin-endpoint localhost:8981 | ||
| ``` | ||
|
|
||
| ### Configuration | ||
|
|
||
| Configuration precedence (highest to lowest): | ||
| 1. Command-line flags | ||
| 2. Environment variables (prefix: `PRISM_`) | ||
| 3. Config file (`~/.prism.yaml` or `./.prism.yaml`) | ||
| 4. Defaults | ||
|
|
||
| **Environment Variables:** | ||
|
|
||
| ```bash | ||
| export PRISM_SERVER_PORT=8000 | ||
| export PRISM_SERVER_LISTEN=0.0.0.0 | ||
| export PRISM_ADMIN_ENDPOINT=localhost:8981 | ||
| export PRISM_LOGGING_LEVEL=info | ||
| ``` | ||
|
|
||
| **Config File** (`~/.prism.yaml`): | ||
|
|
||
| ```yaml | ||
| server: | ||
| listen: 0.0.0.0 | ||
| port: 8000 | ||
| mode: release # debug or release | ||
|
|
||
| admin: | ||
| endpoint: localhost:8981 | ||
|
|
||
| logging: | ||
| level: info | ||
| ``` | ||
|
|
||
| ## Development | ||
|
|
||
| ### Project Structure | ||
|
|
||
| ``` | ||
| cmd/prism-web-console/ | ||
| ├── main.go # Entry point, Gin setup | ||
| ├── handlers/ # HTTP handlers | ||
| │ ├── namespace.go # Namespace CRUD | ||
| │ ├── session.go # Session monitoring | ||
| │ └── health.go # Backend health | ||
| ├── templates/ # templ templates (to be added) | ||
| │ ├── layout.templ | ||
| │ ├── namespace.templ | ||
| │ └── session.templ | ||
| ├── static/ # Static assets | ||
| │ ├── css/styles.css # Tailwind CSS | ||
| │ └── js/htmx.min.js # htmx library | ||
| ├── middleware/ # Gin middleware | ||
| │ ├── auth.go # OIDC authentication | ||
| │ └── logging.go # Request logging | ||
| ├── go.mod | ||
| └── README.md | ||
| ``` | ||
|
|
||
| ### Running Locally | ||
|
|
||
| ```bash | ||
| # Start prism-admin control plane | ||
| cd cmd/prism-admin | ||
| go run . serve --port 8981 | ||
|
|
||
| # Start web console (in another terminal) | ||
| cd cmd/prism-web-console | ||
| go run . --port 8000 | ||
|
|
||
| # Open browser | ||
| open http://localhost:8000 | ||
| ``` | ||
|
|
||
| ### Testing | ||
|
|
||
| ```bash | ||
| # Run tests | ||
| go test ./... | ||
|
|
||
| # Run with coverage | ||
| go test -coverprofile=coverage.out ./... | ||
| go tool cover -html=coverage.out | ||
| ``` | ||
|
|
||
| ## Docker Deployment | ||
|
|
||
| ### Build Image | ||
|
|
||
| ```bash | ||
| # From repository root | ||
| make docker-build-service SERVICE=prism-web-console VARIANT=scratch | ||
| ``` | ||
|
|
||
| ### Run Container | ||
|
|
||
| ```bash | ||
| docker run -p 8000:8000 \ | ||
| -e PRISM_ADMIN_ENDPOINT=prism-admin:8981 \ | ||
| prism-web-console:scratch | ||
| ``` | ||
|
|
||
| ### Docker Compose | ||
|
|
||
| ```yaml | ||
| services: | ||
| prism-admin: | ||
| image: prism/admin:latest | ||
| ports: | ||
| - "8981:8981" | ||
|
|
||
| prism-web-console: | ||
| image: prism/web-console:latest | ||
| ports: | ||
| - "8000:8000" | ||
| environment: | ||
| PRISM_ADMIN_ENDPOINT: prism-admin:8981 | ||
| PRISM_LOGGING_LEVEL: info | ||
| depends_on: | ||
| - prism-admin | ||
| ``` | ||
|
|
||
| ## API Endpoints | ||
|
|
||
| ### Health Check | ||
|
|
||
| ```bash | ||
| GET /health | ||
| ``` | ||
|
|
||
| **Response:** | ||
| ```json | ||
| { | ||
| "status": "healthy", | ||
| "service": "prism-web-console" | ||
| } | ||
| ``` | ||
|
|
||
| ### Web UI Routes | ||
|
|
||
| - `GET /` - Admin dashboard | ||
| - `GET /namespaces` - Namespace list | ||
| - `POST /namespaces` - Create namespace | ||
| - `DELETE /namespaces/:name` - Delete namespace | ||
| - `GET /sessions` - Session monitoring | ||
| - `GET /health-dashboard` - Backend health | ||
|
|
||
| ## Authentication | ||
|
|
||
| OIDC authentication integration (to be implemented): | ||
| - Session-based authentication | ||
| - JWT validation | ||
| - Integration with Dex IdP (RFC-010) | ||
|
|
||
| ## References | ||
|
|
||
| - RFC-036: Minimalist Web Framework for Prism Admin UI | ||
| - ADR-028: Admin UI with FastAPI and gRPC-Web | ||
| - [Gin Web Framework](https://gin-gonic.com/) | ||
| - [templ](https://templ.guide/) | ||
| - [htmx](https://htmx.org/) | ||
|
|
||
| ## Revision History | ||
|
|
||
| - 2025-10-22: Initial separation from prism-admin | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| module github.com/jrepp/prism-data-layer/prism-web-console | ||
|
|
||
| go 1.24.0 | ||
|
|
||
| require ( | ||
| github.com/gin-gonic/gin v1.10.0 | ||
| github.com/spf13/cobra v1.8.1 | ||
| github.com/spf13/viper v1.19.0 | ||
| ) | ||
|
|
||
| require ( | ||
| github.com/bytedance/sonic v1.11.6 // indirect | ||
| github.com/bytedance/sonic/loader v0.1.1 // indirect | ||
| github.com/cloudwego/base64x v0.1.4 // indirect | ||
| github.com/cloudwego/iasm v0.2.0 // indirect | ||
| github.com/fsnotify/fsnotify v1.7.0 // indirect | ||
| github.com/gabriel-vasile/mimetype v1.4.3 // indirect | ||
| github.com/gin-contrib/sse v0.1.0 // indirect | ||
| github.com/go-playground/locales v0.14.1 // indirect | ||
| github.com/go-playground/universal-translator v0.18.1 // indirect | ||
| github.com/go-playground/validator/v10 v10.20.0 // indirect | ||
| github.com/goccy/go-json v0.10.2 // indirect | ||
| github.com/google/go-cmp v0.7.0 // indirect | ||
| github.com/hashicorp/hcl v1.0.0 // indirect | ||
| github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| github.com/json-iterator/go v1.1.12 // indirect | ||
| github.com/klauspost/cpuid/v2 v2.2.7 // indirect | ||
| github.com/leodido/go-urn v1.4.0 // indirect | ||
| github.com/magiconair/properties v1.8.7 // indirect | ||
| github.com/mattn/go-isatty v0.0.20 // indirect | ||
| github.com/mitchellh/mapstructure v1.5.0 // indirect | ||
| github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
| github.com/modern-go/reflect2 v1.0.2 // indirect | ||
| github.com/pelletier/go-toml/v2 v2.2.2 // indirect | ||
| github.com/sagikazarmark/locafero v0.4.0 // indirect | ||
| github.com/sagikazarmark/slog-shim v0.1.0 // indirect | ||
| github.com/sourcegraph/conc v0.3.0 // indirect | ||
| github.com/spf13/afero v1.11.0 // indirect | ||
| github.com/spf13/cast v1.6.0 // indirect | ||
| github.com/spf13/pflag v1.0.5 // indirect | ||
| github.com/stretchr/testify v1.11.1 // indirect | ||
| github.com/subosito/gotenv v1.6.0 // indirect | ||
| github.com/twitchyliquid64/golang-asm v0.15.1 // indirect | ||
| github.com/ugorji/go/codec v1.2.12 // indirect | ||
| go.uber.org/atomic v1.9.0 // indirect | ||
| go.uber.org/multierr v1.9.0 // indirect | ||
| golang.org/x/arch v0.8.0 // indirect | ||
| golang.org/x/crypto v0.40.0 // indirect | ||
| golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect | ||
| golang.org/x/net v0.42.0 // indirect | ||
| golang.org/x/sys v0.34.0 // indirect | ||
| golang.org/x/text v0.27.0 // indirect | ||
| google.golang.org/protobuf v1.36.6 // indirect | ||
| gopkg.in/ini.v1 v1.67.0 // indirect | ||
| gopkg.in/yaml.v3 v3.0.1 // indirect | ||
| ) | ||
|
|
||
| replace github.com/jrepp/prism-data-layer/pkg/plugin => ../../pkg/plugin |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.