npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

openapi-rest-admin

v0.6.0

Published

A REST API admin interface built with React and OpenAPI

Readme

React Router TypeScript React Ant Design License: MIT


What is OpenAPI Rest Admin?

OpenAPI Rest Admin is a Single Page Application that automatically creates admin interfaces from your OpenAPI/Swagger specifications. Point it to your API documentation, and get a fully functional admin panel with tables, forms, and CRUD operations - no coding required.

Key Benefits

  • Zero Setup: Works entirely in the browser, no backend needed
  • Automatic UI: Generates tables and forms from your API schemas
  • Modern Stack: Built with React 19, TypeScript, and Ant Design
  • Production Ready: Deploy as static files anywhere

How It Works

  1. Provide OpenAPI Spec: Configure your OpenAPI document URL
  2. Auto-Discovery: The app analyzes your API to identify resources
  3. Generate Interface: Creates tables, forms, and navigation automatically
  4. Direct API Calls: Makes HTTP requests directly to your API endpoints

🚀 Quick Start

Prerequisites

  • Node.js 18+ and npm

Installation

  1. Clone and install

    git clone https://github.com/your-username/openapi-rest-admin.git
    cd openapi-rest-admin
    npm install
  2. Configure your API

    Create a .env file:

    # Your OpenAPI specification URL
    VITE_OPENAPI_DOC_URL=https://your-api.com/openapi.json
    
    # Optional: Custom title
    VITE_APP_TITLE=My API Admin
  3. Start development server

    npm run dev
  4. Open http://localhost:5173

Try with the Example REST Server

The project includes a demo REST server that provides a complete RESTful API with Authors, Books, and Notes resources:

  1. Start the example server

    cd example/simple-rest-server
    chmod +x start.sh
    ./start.sh

    The server will run at http://localhost:3000 with API documentation available at http://localhost:3000/api-docs

  2. Configure the admin interface to use it

    # In your .env file
    VITE_OPENAPI_DOC_URL=http://localhost:3000/openapi.json
  3. Open the admin interface at http://localhost:5173

This example server includes full CRUD operations for multiple resources and serves as an excellent demonstration of OpenAPI Admin's capabilities.

📜 Available Scripts

| Command | Description |
|---------|-------------|
| `npm run dev` | Start development server |
| `npm run build` | Build for production |
| `npm run test` | Run tests with Vitest |
| `npm run test:ui` | Run tests with interactive UI |
| `npm run typecheck` | TypeScript type checking |
| `npm run config:generate` | Generate configuration files |

⚙️ Configuration

Environment Variables

Create a .env file in the project root:

# Required: Your OpenAPI document URL
VITE_OPENAPI_DOC_URL=https://your-api.example.com/openapi.json

# Optional: Custom application title
VITE_APP_TITLE=My API Admin

Runtime Configuration

You can also configure the application at runtime by editing public/config.json:

{
  "openapiDocUrl": "https://your-api.example.com/openapi.json",
  "appTitle": "My API Admin"
}

Configuration Priority

The application loads configuration in the following order:

  1. Environment variables (highest priority)
  2. Default values

� Standalone Usage (Script Tag)

You can use OpenAPI Rest Admin as a standalone library, similar to Scalar API Reference:

Quick Setup

  1. Build the standalone version

    npm run build:standalone
  2. Use in your HTML

    <!DOCTYPE html>
    <html>
    <head>
        <title>My API Admin</title>
        <link rel="stylesheet" href="path/to/openapi-rest-admin.css">
    </head>
    <body>
        <div id="app"></div>
        <script src="path/to/openapi-rest-admin.js"></script>
        <script>
            OpenAPIRestAdmin.createAdminInterface('#app', {
                openapiDocUrl: 'https://api.example.com/openapi.json',
                siteTitle: 'My API Admin'
            });
        </script>
    </body>
    </html>

For complete standalone usage documentation, see docs/STANDALONE_USAGE.md.

�🚀 Production Deployment

Static File Hosting

  1. Build the application

    npm run build
  2. Deploy to any static hosting

    # Copy built files to your web server
    cp -r build/client/* /var/www/html/
    
    # Or use a static file server
    npx serve build/client
  3. Update configuration

    Edit config.json in your deployed files:

    {
      "openapiDocUrl": "https://your-production-api.com/openapi.json",
      "appTitle": "Production API Admin"
    }

Docker Deployment

# Dockerfile included in the project
docker build -t openapi-rest-admin .
docker run -p 5173:5173 openapi-rest-admin

🔧 Supported OpenAPI Features

Resource Detection

  • Standard REST patterns (GET, POST, PUT, DELETE)
  • Path parameters (/users/{id})
  • Query parameters (filtering, pagination)
  • Request/response schemas

Schema Support

  • Basic types (string, number, boolean)
  • Complex types (objects, arrays)
  • Validation (required fields, formats, enums)
  • Example values

� Troubleshooting

Common Issues

  1. CORS Errors: Ensure your API allows cross-origin requests
  2. Invalid Schema: Check that your OpenAPI spec is valid JSON/YAML
  3. No Resources Found: Verify your spec contains standard REST patterns
  4. Config Loading Failed: Check browser console for errors

Debug Mode

localStorage.setItem("debug", "openapi-rest-admin:*");

🤝 Contributing

See CONTRIBUTING.md for detailed guidelines.

Quick start for contributors:

  1. Fork and clone the repository
  2. Run npm install and npm run dev
  3. Make your changes and add tests
  4. Submit a pull request

License

MIT License - see LICENSE file for details.

🙏 Acknowledgments


Made with ❤️ for the API development community