This project provides a fully functional Swagger Editor that runs entirely on GitHub Pages, requiring no backend server.
Perfect for lightweight API documentation management directly through GitHub.
Edit the .env file to match your GitHub account details:
# Your GitHub username
VITE_GITHUB_OWNER="ijun17"
# Your GitHub email
VITE_GITHUB_EMAIL="[email protected]"
# Repository name
VITE_GITHUB_REPO="swagger-editor-github-page"
# Branch to store API files
VITE_GITHUB_BRANCH="main"- Go to your repository’s Settings → Pages and enable GitHub Pages.
- Then go to the Actions tab.
- Select the Deploy static content to Pages workflow and click Run workflow.
This app uses GitHub’s API to manage OpenAPI files in your repository.
You will need a Personal Access Token (classic) with the following scopes:
repo(orrepo:contentsif public repo)workflow(to trigger deployment)
Steps:
- Visit GitHub → Settings → Developer Settings → Tokens.
- Click Generate new token (classic).
- Check the required scopes and generate the token.
- Copy the token and keep it secure.
🔐 The token is stored only in your browser's localStorage. It is never transmitted anywhere else.
- Visit your deployed GitHub Pages site.
- Click Login and paste your GitHub token.
- If
directory.jsonis missing, a modal will prompt you. - Click Create directory.json to initialize the structure.
Now you can create, edit, and delete OpenAPI files directly from the UI.
| Layer | Technology |
|---|---|
| Framework | React 17, Vite |
| UI Styling | Tailwind CSS |
| State Management | Zustand |
| Networking | Octokit REST |
| API Editing | swagger-editor-dist |
| API Viewing | swagger-ui-react |
| Data Fetching | TanStack Query |
| Routing | React Router v6 |
| Linting | ESLint + TypeScript ESLint |
| Language | TypeScript |