GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - REBELDOT-SOLUTIONS-S-R-L/idp-ramboll-athg-test

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
backend
backend
 
 
docs
docs
 
 
frontend
frontend
 
 
iac/infra
iac/infra
 
 
security
security
 
 
.gitignore
.gitignore
 
 
.releaserc.json
.releaserc.json
 
 
.semgrep.yml
.semgrep.yml
 
 
README.md
README.md
 
 
catalog-info.yaml
catalog-info.yaml
 
 
docker-compose.yml
docker-compose.yml
 
 
mkdocs.yml
mkdocs.yml
 
 

Repository files navigation

IDP Demo — TanStack Start × Rust

A minimal, deployable full-stack demo for an internal developer platform (IDP). It pairs a TanStack Start frontend (React + SSR) with a Rust (axum) backend and wires them together with a single, simple interservice call.

Architecture

┌──────────────────────────┐    HTTP (server function)    ┌───────────────────────┐
│  frontend (Node 3000)    │ ───────────────────────────▶ │  backend (Rust 3001)  │
│  TanStack Start (React)  │     GET /api/info            │  axum                 │
│                          │     GET /api/items           │                       │
│                          │ ◀─────────────────────────── │                       │
└──────────────────────────┘             JSON              └───────────────────────┘
  • frontend/ — TanStack Start (React 19, file-based routing, Tailwind).
  • backend/ — Rust + axum HTTP server.

How the services connect

The browser never calls the backend directly. Instead:

  1. The page calls a TanStack Start server function (fetchBackendInfo, fetchBackendItems) in frontend/src/lib/backend.ts.
  2. The server function runs on the frontend's Node server and makes a normal fetch to the Rust backend.
  3. The backend URL comes from the BACKEND_URL environment variable (defaults to http://localhost:3001 locally, http://backend:3001 in Docker Compose).

Backend API

Method Path Description
GET /health Liveness probe (used by the IDP / Compose)
GET /api/info Service metadata + uptime + request counter
GET /api/items A small list of demo items

Local development

Prerequisites: Node ≥ 20, pnpm, Rust (stable).

Backend (terminal 1):

cd backend
cargo run          # listens on http://localhost:3001

Frontend (terminal 2):

cd frontend
pnpm install
pnpm dev           # listens on http://localhost:3000

Open http://localhost:3000.

Run with Docker Compose

docker compose up --build
  • Frontend: http://localhost:3000
  • Backend: http://localhost:3001

Compose connects the two services over an internal network and waits for the backend's /health check before starting the frontend.

Building for production

# Frontend — builds dist/client (static) + dist/server/server.js (server entry)
cd frontend && pnpm build
pnpm start     # runs: srvx --prod -s dist/client dist/server/server.js

# Backend
cd backend && cargo build --release

Deploying through an IDP

Each service ships a production Dockerfile:

  • backend/Dockerfile — multi-stage Rust build into a minimal Debian runtime with a /health HEALTHCHECK.
  • frontend/Dockerfile — multi-stage Node build served by srvx.

Point your IDP at the two containers and:

  1. Expose the frontend on port 3000 (public).
  2. Keep the backend on port 3001 (internal), or expose it for debugging.
  3. Set BACKEND_URL on the frontend to the backend's internal address (e.g. http://backend:3001).
  4. Use GET /health on the backend as the liveness/readiness probe.

Environment variables

Variable Service Default Description
BACKEND_URL frontend http://localhost:3001 Base URL of the Rust backend
PORT both 3000 / 3001 Listen port
RUST_LOG backend backend=info,tower_http=info Log level

idp-ramboll-athg-test

About

No description, website, or topics provided.

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.