Skip to content

Repository files navigation

Hubfly API Documentation (hubfly-api-docs)

Interactive REST API documentation portal for Hubfly Dashboard API (https://api.hubfly.space), built with Astro, React, and Tailwind CSS, pre-configured for Cloudflare Pages.


Features

  • Full OpenAPI 3.0 Coverage: Parses all 216 API endpoints across 13 functional modules (Auth, Projects, Organizations, Billing, CLI, Domains, GitHub, GPU, Marketplace, Courses, System, Regions, Templates).
  • Hubfly Brand Theme: Matches hubfly.space and the dashboard exactly — Geist Variable font, warm amber/umber primary, glass header, brand blobs, shine-sweep CTAs, and syntax-highlighted response payloads.
  • Dark & Light Mode: Built-in theme switching with persistent state (localStorage) and zero initial flash (FOUC).
  • Instant Search Modal: Filter endpoints by path, title, or category with Ctrl+K or /.
  • Interactive "Try It Out" Playground: Live API execution against api.hubfly.space with Bearer token authentication, path parameter inputs, JSON request body editor, response time measurement, and status code indicators.
  • Multi-Language Code Generators: 1-click code snippets for cURL, JavaScript (Fetch), Python (Requests), Go, and Node.js (Axios).
  • Cloudflare Ready: Built with @astrojs/cloudflare adapter and wrangler.json for fast deployment to Cloudflare Pages.

Getting Started

Prerequisites

  • Bun (v1.0+) or Node.js (v18+)

Installation

cd hubfly-api-docs
bun install

Local Development

bun run dev

Open http://localhost:4321 in your browser.


🛠️ Makefile Commands

You can use the included Makefile for convenient short commands:

  • make install - Install project dependencies
  • make dev - Start local development server
  • make build - Build production static bundle in ./dist
  • make preview - Preview production build locally
  • make deploy - Build and deploy to Cloudflare Pages
  • make clean - Remove build artifacts and node_modules

Building for Production

To generate static SSG bundles and Cloudflare Pages assets:

bun run build

The compiled output will be created in dist/.


Deploying to Cloudflare Pages

Option 1: Using Wrangler CLI

npx wrangler pages deploy dist --project-name=hubfly-api-docs

Option 2: Cloudflare Dashboard (Git Integration)

  1. Push your repository to GitHub / GitLab.
  2. In the Cloudflare Pages dashboard, select Create a Project > Connect to Git.
  3. Set Framework Preset: Astro.
  4. Set Root Directory: hubfly-api-docs.
  5. Set Build Command: bun run build.
  6. Set Build Output Directory: dist.

Project Structure

hubfly-api-docs/
├── public/
│   └── favicon.svg          # Custom SVG favicon
├── src/
│   ├── components/
│   │   └── ApiExplorer.jsx  # Interactive API explorer & playground component
│   ├── data/
│   │   └── openapi.json     # Complete OpenAPI specification
│   ├── layouts/
│   │   └── Layout.astro     # Main HTML layout, SEO tags, dark/light inline theme script
│   ├── pages/
│   │   └── index.astro      # Main documentation entrypoint
│   ├── styles/
│   │   └── global.css       # Global design tokens, method badges, glass panel styles
│   └── utils/
│       └── openapi.js       # Data parser, category indexer, & code generator logic
├── .gitignore               # Comprehensive Git ignore file
├── astro.config.mjs         # Astro & Cloudflare adapter configuration
├── package.json             # NPM dependencies & build scripts
├── tailwind.config.mjs      # Tailwind theme configuration (No purple/indigo)
├── tsconfig.json            # TypeScript configuration
└── wrangler.json            # Cloudflare Pages deployment configuration

License

Internal & Proprietary to Hubfly Cloud Platform.

About

Hubfly space api docs

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages