Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Gatsby starter for building API documentation hubs with US Web Design System styling and a built-in Swagger UI sandbox.
The USWDS Gatsby API Docs Starter is an open-source Gatsby boilerplate for building API documentation hubs with US Web Design System styling and an embedded Swagger UI sandbox.
This starter template, created by Softrams, pairs the Gatsby static site generator with the US Web Design System (USWDS) and Swagger UI to publish documentation for one or more API products on a single hub site. It takes Markdown content and a Swagger/OpenAPI JSON file as input and produces a static Progressive Web App with API reference pages, guides, and an interactive sandbox for trying API calls. The project is an open-source pilot; it is not endorsed, sponsored, or funded by the US Government or any federal agency.
Create a new site with the Gatsby CLI command shown in the quick start section, then run gatsby develop to start editing at localhost:8000. Markdown files in the docs and guides folders become pages automatically, and the swagger.json file in static/assets drives the embedded sandbox. Modify pages/swagger.js when you need to change Swagger UI behavior.
The starter is free and open source. The project page lists no paid tiers or licensing fees.
Yes, the starter is open source and free to use. It was initially built by Softrams and shared publicly with the community.
Create a new Markdown file in the docs folder. The page will automatically be included in the API reference section with the same layout as the placeholder pages.
Replace the swagger.json file in the static/assets folder with your own API definition. You can also edit pages/swagger.js to adjust how Swagger UI is configured.
Yes. The template is designed for REST APIs in general, though it includes placeholder content tailored to FHIR APIs. You can rename pages and rewrite the Markdown to document any REST endpoints.
Run the command npm run deploy to publish the built site to GitHub Pages. The quick start instructions also show how to run the site locally with gatsby develop.
