How iron-io/functions-ui works
Project type and purpose
• This is a full-stack web application that provides a Vue.js single-page UI for managing functions on an external IronFunctions API.
• The front end is built with Vue components and bundled by Webpack. The back end is a Node/Express server that serves static assets and proxies API calls.
File structure
• Top-level files:
• Dockerfile, build.sh/release.sh → containerization and release scripts
• webpack.config.js, .babelrc, stylelint.config.js → build and lint configuration
• server.js + /server folder → Express server entrypoint, routing, controllers, helpers
• /client folder → Vue.js source (components, pages, styles, helper libraries)
• /public → static index.html, fonts, images, manifest for PWA behavior
• CI/CD: .circleci/config.yml defines continuous integration and possibly image builds.
README insights
• The UI runs in a Docker container and is configured by two environment variables: PORT and API_URL.
• The server proxies all calls with API_URL env var to the external IronFunctions API running in a separate container.
• Development workflow uses npm, webpack --watch, and Docker for the API.
Main components
a. Front end (Browser)
• Vue SPA (client/client.js, client/components, client/pages)
• Static assets (CSS, fonts, images under /public)
b. Back end (Node/Express server)
• Static file server (serves bundled SPA)
• API router (server/router.js)
• Controllers (apps.js, routes.js, info.js)
• Helpers (app-helpers.js)
c. External service
• IronFunctions API (deployed in its own container, URL passed via API_URL)
d. Build & deploy pipeline (optional)
• Webpack bundling step
• Docker build (Dockerfile, build.sh, release.sh)
• CI (CircleCI)
Relationships and data flow
• User in Browser → HTTP GET/POST → Node/Express server
• Static asset requests → served directly from server → Browser renders SPA
• API calls (e.g., /api/apps) → routed by server/router.js → appropriate controller → HTTP call to IronFunctions API → controller returns JSON → Browser updates UI
• Build pipeline: source code → Webpack → bundle → Docker image → registry → deployment
Architectural patterns and design principles
• Single-Page Application (MVVM) on front end using Vue components
• API-gateway/proxy pattern on back end to avoid CORS and centralize authentication or request shaping
• Clear separation of concerns: presentation (client) vs. integration (server) vs. external API
Details
• router.js
• controllers/ (apps, routes, info)
• helpers/ (app-helpers)
• client.js (entry)
• components/ & pages/ directories
• CSS and font assets