Skip to main content

Example Apps

enlace-examples has a runnable sample app per adapter โ€” aspnetcore/, express/, fastapi/, java/, nest/ โ€” each already wired up to Enlace, so you can see a real chain working before you touch your own API.

๐Ÿš€ Try it live โ€” no setup at allโ€‹

The fastapi/ example is deployed and running right now, Postgres-backed, with real OAuth2 auth:

๐Ÿ‘‰ enlace-fastapi.onrender.com/enlace

Open it, drop in the seeded demo credentials, and build the chain below โ€” nothing to install, nothing to run locally.

The two reference chainsโ€‹

The four CRUD-only examples (aspnetcore/, express/, java/, nest/) implement one shared, unauthenticated contract โ€” customers, products, orders โ€” so a chain built against one works unmodified against any other:

  1. POST /customers โ€” capture the new customer's id.
  2. POST /products (ร—2) โ€” capture both ids.
  3. POST /orders, mapping customerId from step 1 and each item's productId from step 2 โ€” capture the order's id and its server-computed total.
  4. PUT /orders/{id}/status, with id mapped from step 3, body { "status": "paid" }.
  5. GET /orders/{id} โ€” confirm the status change.

fastapi/ goes further: it's the production reference implementation โ€” three real credential types across three actors (customer, admin, carrier), a compound cartโ†’checkoutโ†’paymentโ†’fulfillmentโ†’shipment flow, and an 8-step chain with two credential switches mid-run:

  1. GET /products (no credential) โ€” pick a product's id.
  2. POST /carts (customer credential) โ€” capture the cart's id.
  3. POST /carts/{cartId}/items, productId mapped from step 1.
  4. POST /carts/{cartId}/checkout โ€” capture both order.id and payment.id out of one compound response.
  5. POST /payments/{id}/confirm, id mapped from step 4's payment.id.
  6. POST /orders/{id}/fulfill, id mapped from step 4's order.id โ€” switch to the admin credential here โ€” capture the shipment's trackingNumber.
  7. PUT /shipments/{trackingNumber}/status, mapped from step 6 โ€” switch to the carrier credential here.
  8. GET /shipments/{trackingNumber} (no credential) โ€” confirm status: "delivered".

See fastapi/README.md for the exact demo credential values, or CONTRACT.md for the full API shape behind both chains. The CRUD-only examples will grow into this same richer contract over time โ€” for now, fastapi/ is the one that's actually there, and it's the one that's live.