{"id":37789439,"url":"https://github.com/spectrocloud/hello-universe","last_synced_at":"2026-01-16T15:15:30.878Z","repository":{"id":65229552,"uuid":"582797619","full_name":"spectrocloud/hello-universe","owner":"spectrocloud","description":"A Spectro Cloud demo application intended for learning and showcasing products.","archived":false,"fork":false,"pushed_at":"2026-01-02T13:30:10.000Z","size":37616,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-08T16:24:44.087Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spectrocloud.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-27T22:30:37.000Z","updated_at":"2026-01-02T13:30:13.000Z","dependencies_parsed_at":"2024-09-09T18:58:03.145Z","dependency_job_id":"29c5b3dd-9954-43d1-9c7b-30a50bfb5ea2","html_url":"https://github.com/spectrocloud/hello-universe","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/spectrocloud/hello-universe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spectrocloud%2Fhello-universe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spectrocloud%2Fhello-universe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spectrocloud%2Fhello-universe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spectrocloud%2Fhello-universe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spectrocloud","download_url":"https://codeload.github.com/spectrocloud/hello-universe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spectrocloud%2Fhello-universe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T15:15:30.781Z","updated_at":"2026-01-16T15:15:30.857Z","avatar_url":"https://github.com/spectrocloud.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hello Universe\n\nHello Universe is a demo application intended for learning about [Palette](https://docs.spectrocloud.com/introduction) and to help showcase product features.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./static/img/demo.gif\" alt=\"drawing\" width=\"600\"/\u003e\n\u003c/p\u003e\n\n## Start App\n\nGet started with Hello Universe by choosing between two deployment approaches; docker or a non-docker-based approach.\n\n### Docker\n\nHello Universe is available as a Docker image.\nTo run Hello Universe issue the following commands:\n\n```shell\ndocker pull ghcr.io/spectrocloud/hello-universe:1.3.0\ndocker run -p 8080:8080 ghcr.io/spectrocloud/hello-universe:1.3.0\n```\n\n### Non-Docker\n\nTo run locally without Docker:\n\n```\ngit clone git@github.com:spectrocloud/hello-universe.git\nnpm ci\nnpm run start\n```\n\n### Environment Variables\n\nHello Universe accepts the following environment variables:\n\n| Variable    | Description                                                                                                                   | Default |\n| ----------- | ----------------------------------------------------------------------------------------------------------------------------- | ------- |\n| API_URI     | The fully qualified hostname and port of the API server. In a reverse proxy setting this can be the application loadbalancer. | `\"\"`    |\n| API_VERSION | The API version number.                                                                                                       | `1`     |\n| SVC_URI     | The URI to the service API, such as the internal Kubernetes container hostname of the API service.                            | `\"\"`    |\n| TOKEN       | The API authorization token. This is only used if the API is configured for authorization.                                    | `\"\"`    |\n\n### Connecting to API Server\n\nHello Universe's capabilities can be expanded if connected to the [Hello Universe API](https://github.com/spectrocloud/hello-universe-api).\nTo connect Hello Universe to the API server, provide the API server's fully qualified hostname and port as an environment variable value.\nBe aware that the API server requires an available Postgres database. Checkout [Hello Universe DB](https://github.com/spectrocloud/hello-universe-db) for a dockerized Postgres instance ready for integration with the Hello Universe API.\n\n```shell\nAPI_URI=http://localhost:3000\n```\n\nIf you are using the Docker image then use the `-e` flag parameter.\n\n```shell\ndocker run -p 8080:8080 -e API_URI=http://localhost:3000 ghcr.io/spectrocloud/hello-universe:1.3.0\n```\n\n### Reverse Proxy\n\nA Docker container with a reverse proxy is available. The reverse proxy is useful for scenarios when you need to deploy the\nhello universe application into a Kubernetes cluster or similar architectures and need the UI to route requests internal to the hosting platform. An example of such behavior is needing to to reach a private API inside the Kubernetes cluster. **The reverse proxy expects the API to be listening on port `3000`.**\n\n```shell\ndocker run -p 8080:8080 -p 3000:3000  -e SVC_URI=\"http://myprivate.api.address.example:3000\" -e API_URI=\"http://myloadbalancer.example:3000\"  ghcr.io/spectrocloud/hello-universe:1.3.0-proxy\n```\n\n#### Reverse Proxy Environment Variables\n\n| Variable        | Description                                                                                                                                                                             | Default |\n| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |\n| `SVC_URI`       | The URI to the service API, such as the internal Kubernetes container hostname of the API service.                                                                                      | `\"\"`    |\n| `API_URI`       | The fully qualified hostname and port of the API server. In a reverse proxy setting, set this to the service loadbalancer. If `QUERY_K8S_API` set to `true`, leve this parameter empty. | `\"\"`    |\n| `TOKEN`         | The API authorization token. This is only used if the API is configured for authorization.                                                                                              | `\"\"`    |\n| `QUERY_K8S_API` | Set to `true` to query the Kubernetes API for the service hostname. This is useful when the service is deployed in a Kubernetes cluster.                                                | `false` |\n\n#### Reverse Proxy with Kubernetes\n\nTo deploy the Hello Universe application into a Kubernetes cluster, use the deployment manifest in `deployments/k8s.yaml`. Ensure you provide values and update all placeholders in the manifest with the value `\u003cREPLACE_ME\u003e`. The values must be in base64 format.\n\nIn a Kubernetes environment, you can use two methods to deploy the Hello Universe application:\n\n1. Use a single load balancer for the UI and API services.\n2. Use separate load balancers for the UI and API services.\n\n##### Single Load Balancer\n\nWhen deploying the Hello Universe application into a Kubernetes cluster, set the `QUERY_K8S_API` environment variable to `true` and set the `API_URI` environment variable to an empty string. This will result in the reverse proxy forwarding API requests to API service. Only a single load balancer is used in this deployment pattern. If authorization is enabled, provide the `auth-token` Kubernetes secret with the API authorization token value. Otherwise, API will fail to authorize requests.\n\n\u003e [!NOTE]\n\u003e The `QUERY_K8S_API` environment variable is only used when deploying the Hello Universe application into a Kubernetes cluster. Enabling this environment variable will query the Kubernetes API for the service hostname. You can review the script in the `scripts/service-ip.sh`.\n\n![K8s diagram](./static/img/k8s-diagram.png)\n\nInside the Hello Universe container, [Caddy](https://caddyserver.com/) is used as a reverse proxy to route requests to the API server. The API server is expected to be listening on port `3000`.\n\nIf the Hello Universe API is enabled for authorization, provide the `TOKEN` environment variable with the API authorization token. The default encoded anonymous token is `\"OTMxQTNCMDItOERDQy01NDNGLUExQjItNjk0MjNEMUEwQjk0\"`. The reverse proxy will include the token when forwarding requests to the API server.\n\n\u003e ![TIP]\n\u003e If you want to automatically inject the authorization token into the reverse proxy for all API requests, uncomment line 29 in the Caddyfile under **/etc/caddy/**.\n\u003e `header_up Authorization \"Bearer {$TOKEN}\"`\n\u003e Issue the command `caddy reload --config /etc/caddy/Caddyfile` to apply the changes.\n\n##### Separate Load Balancers\n\n\u003e ![WARNING]\n\u003e\n\u003e This deployment pattern will not work in single deployment. You need to deploy the API and UI services separately due to the dependency on the API service. Use the signle deployment pattern if you want to deploy the services together.\n\nTo use separate load balancers for the UI and API services, you need to make the following changes to the Kubernetes deployment manifest. Change the API service type to `LoadBalancer`. The API service will have its own load balancer, and you will need to set the UI's `API_URI` environment variable to the fully qualified hostname and port of the API service.\n\n```yaml\napiVersion: v1\nkind: Service\nmetadata:\n  name: api\n  namespace: hello-universe\nspec:\n  selector:\n    app: api\n  ports:\n    - protocol: TCP\n      port: 3000\n      targetPort: 3000\n  type: LoadBalancer\n```\n\nFor the UI service, change the image to the default Hello Universe image.\n\n```yaml\ncontainers:\n  - name: ui\n    image: ghcr.io/spectrocloud/hello-universe:1.3.0\n    imagePullPolicy: Always\n    ports:\n      - containerPort: 8080\n        name: ui\n```\n\nThe UI service will have its own load balancer, and you will need to set the `API_URI` environment variable to the fully qualified hostname and port of the API service. Leave the `QUERY_K8S_API` environment variable set to `false`, and set `SVC_URI` to an empty string.\n\n```shell\nAPI_URI=http://\u003cEXTERNAL_IP\u003e:3000\nSVC_URI=\"\"\nQUERY_K8S_API=false\n```\n\nIf authorization is enabled, provide the `auth-token` Kubernetes secret with the API authorization token value. Otherwise, API will fail to authorize requests.\n\n## Image Verification\n\nWe sign our images through [Cosign](https://docs.sigstore.dev/signing/quickstart/). Review the [Image Verification](./docs/image-verification.md) page to learn more.\n\n## Development\n\nCreate an environment file `.env` file and add the following values:\n\n```\nREACT_APP_API_URI=http://localhost:3000\nREACT_APP_API_VERSION=1\n```\n\nThe `.env` file is how you point to the local development API server. Otherwise, local browser storage is used.\n\nUse the [`docker-compose.yml`](./docker-compose.yml) to start the required services.\n\n```shell\nmake start-services\n```\n\nNext, start the local development server\n\n```shell\nmake start\n```\n\nTo stop the docker containers, use the following command.\n\n```shell\n make stop-services\n```\n\n## Clean\n\nTo remove the build folder use the command `make clean`\n\n## Build\n\nTo build the hosting assets use the command `make build`\n\n### Development Server\n\nTo start the local development server without a proxy use the command `make start`.\n\n### Server w/o Reverse Proxy\n\nTo start the Caddy server without a reverse proxy use the command `make start-prod`.\n\n### Server w/o Reverse Proxy\n\nTo start the Caddy server with a reverse proxy use the command `make start-proxy`.\n\n## Dependencies\n\n- [Caddy](https://caddyserver.com/docs/)\n- [React Spring](https://github.com/pmndrs/react-spring) is used to animate the logo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspectrocloud%2Fhello-universe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspectrocloud%2Fhello-universe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspectrocloud%2Fhello-universe/lists"}