{"id":29302613,"url":"https://github.com/saltbo/openapi-rest-admin","last_synced_at":"2025-08-10T20:42:24.149Z","repository":{"id":302019356,"uuid":"1010755089","full_name":"saltbo/openapi-rest-admin","owner":"saltbo","description":"Automatically generate admin interfaces from OpenAPI specifications","archived":false,"fork":false,"pushed_at":"2025-07-22T11:52:38.000Z","size":2564,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-06T18:54:54.707Z","etag":null,"topics":["admin","console","openapi","restful","swagger"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saltbo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-29T18:28:07.000Z","updated_at":"2025-07-22T11:52:41.000Z","dependencies_parsed_at":"2025-06-30T06:43:24.893Z","dependency_job_id":null,"html_url":"https://github.com/saltbo/openapi-rest-admin","commit_stats":null,"previous_names":["saltbo/openapi-rest-admin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saltbo/openapi-rest-admin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltbo%2Fopenapi-rest-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltbo%2Fopenapi-rest-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltbo%2Fopenapi-rest-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltbo%2Fopenapi-rest-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saltbo","download_url":"https://codeload.github.com/saltbo/openapi-rest-admin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltbo%2Fopenapi-rest-admin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269786254,"owners_count":24475700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin","console","openapi","restful","swagger"],"created_at":"2025-07-07T00:01:47.207Z","updated_at":"2025-08-10T20:42:24.113Z","avatar_url":"https://github.com/saltbo.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e🚀 OpenAPI Admin\u003c/h1\u003e\n  \u003cp\u003eAutomatically generate admin interfaces from OpenAPI specifications\u003c/p\u003e\n  \n  [![React Router](https://img.shields.io/badge/React%20Router-v7-blue.svg)](https://reactrouter.com/)\n  [![TypeScript](https://img.shields.io/badge/TypeScript-5.8-blue.svg)](https://www.typescriptlang.org/)\n  [![React](https://img.shields.io/badge/React-19.1-blue.svg)](https://reactjs.org/)\n  [![Ant Design](https://img.shields.io/badge/Ant%20Design-5.26-red.svg)](https://ant.design/)\n  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n  \u003cimg src=\"docs/snapshots/home.png\" alt=\"OpenAPI Admin Dashboard\" width=\"100%\" /\u003e\n\u003c/div\u003e\n\n---\n\n## What is OpenAPI Rest Admin?\n\nOpenAPI 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.\n\n### Key Benefits\n\n- **Zero Setup**: Works entirely in the browser, no backend needed\n- **Automatic UI**: Generates tables and forms from your API schemas\n- **Modern Stack**: Built with React 19, TypeScript, and Ant Design\n- **Production Ready**: Deploy as static files anywhere\n\n## How It Works\n\n1. **Provide OpenAPI Spec**: Configure your OpenAPI document URL\n2. **Auto-Discovery**: The app analyzes your API to identify resources\n3. **Generate Interface**: Creates tables, forms, and navigation automatically\n4. **Direct API Calls**: Makes HTTP requests directly to your API endpoints\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Node.js 18+ and npm\n\n### Installation\n\n1. **Clone and install**\n\n   ```bash\n   git clone https://github.com/your-username/openapi-rest-admin.git\n   cd openapi-rest-admin\n   npm install\n   ```\n\n2. **Configure your API**\n\n   Create a `.env` file:\n\n   ```bash\n   # Your OpenAPI specification URL\n   VITE_OPENAPI_DOC_URL=https://your-api.com/openapi.json\n\n   # Optional: Custom title\n   VITE_APP_TITLE=My API Admin\n   ```\n\n3. **Start development server**\n\n   ```bash\n   npm run dev\n   ```\n\n4. **Open http://localhost:5173**\n\n### Try with the Example REST Server\n\nThe project includes a demo REST server that provides a complete RESTful API with Authors, Books, and Notes resources:\n\n1. **Start the example server**\n\n   ```bash\n   cd example/simple-rest-server\n   chmod +x start.sh\n   ./start.sh\n   ```\n\n   The server will run at `http://localhost:3000` with API documentation available at `http://localhost:3000/api-docs`\n\n2. **Configure the admin interface to use it**\n\n   ```bash\n   # In your .env file\n   VITE_OPENAPI_DOC_URL=http://localhost:3000/openapi.json\n   ```\n\n3. **Open the admin interface at http://localhost:5173**\n\nThis example server includes full CRUD operations for multiple resources and serves as an excellent demonstration of OpenAPI Admin's capabilities.\n\n## 📜 Available Scripts\n\n```\n| Command | Description |\n|---------|-------------|\n| `npm run dev` | Start development server |\n| `npm run build` | Build for production |\n| `npm run test` | Run tests with Vitest |\n| `npm run test:ui` | Run tests with interactive UI |\n| `npm run typecheck` | TypeScript type checking |\n| `npm run config:generate` | Generate configuration files |\n```\n\n## ⚙️ Configuration\n\n### Environment Variables\n\nCreate a `.env` file in the project root:\n\n```bash\n# Required: Your OpenAPI document URL\nVITE_OPENAPI_DOC_URL=https://your-api.example.com/openapi.json\n\n# Optional: Custom application title\nVITE_APP_TITLE=My API Admin\n```\n\n### Runtime Configuration\n\nYou can also configure the application at runtime by editing `public/config.json`:\n\n```json\n{\n  \"openapiDocUrl\": \"https://your-api.example.com/openapi.json\",\n  \"appTitle\": \"My API Admin\"\n}\n```\n\n### Configuration Priority\n\nThe application loads configuration in the following order:\n\n1. Environment variables (highest priority)\n2. Default values\n\n## � Standalone Usage (Script Tag)\n\nYou can use OpenAPI Rest Admin as a standalone library, similar to Scalar API Reference:\n\n### Quick Setup\n\n1. **Build the standalone version**\n\n   ```bash\n   npm run build:standalone\n   ```\n\n2. **Use in your HTML**\n\n   ```html\n   \u003c!DOCTYPE html\u003e\n   \u003chtml\u003e\n   \u003chead\u003e\n       \u003ctitle\u003eMy API Admin\u003c/title\u003e\n       \u003clink rel=\"stylesheet\" href=\"path/to/openapi-rest-admin.css\"\u003e\n   \u003c/head\u003e\n   \u003cbody\u003e\n       \u003cdiv id=\"app\"\u003e\u003c/div\u003e\n       \u003cscript src=\"path/to/openapi-rest-admin.js\"\u003e\u003c/script\u003e\n       \u003cscript\u003e\n           OpenAPIRestAdmin.createAdminInterface('#app', {\n               openapiDocUrl: 'https://api.example.com/openapi.json',\n               siteTitle: 'My API Admin'\n           });\n       \u003c/script\u003e\n   \u003c/body\u003e\n   \u003c/html\u003e\n   ```\n\nFor complete standalone usage documentation, see [docs/STANDALONE_USAGE.md](docs/STANDALONE_USAGE.md).\n\n## �🚀 Production Deployment\n\n### Static File Hosting\n\n1. **Build the application**\n\n   ```bash\n   npm run build\n   ```\n\n2. **Deploy to any static hosting**\n\n   ```bash\n   # Copy built files to your web server\n   cp -r build/client/* /var/www/html/\n\n   # Or use a static file server\n   npx serve build/client\n   ```\n\n3. **Update configuration**\n\n   Edit `config.json` in your deployed files:\n\n   ```json\n   {\n     \"openapiDocUrl\": \"https://your-production-api.com/openapi.json\",\n     \"appTitle\": \"Production API Admin\"\n   }\n   ```\n\n### Docker Deployment\n\n```dockerfile\n# Dockerfile included in the project\ndocker build -t openapi-rest-admin .\ndocker run -p 5173:5173 openapi-rest-admin\n```\n\n## 🔧 Supported OpenAPI Features\n\n### Resource Detection\n\n- Standard REST patterns (GET, POST, PUT, DELETE)\n- Path parameters (`/users/{id}`)\n- Query parameters (filtering, pagination)\n- Request/response schemas\n\n### Schema Support\n\n- Basic types (string, number, boolean)\n- Complex types (objects, arrays)\n- Validation (required fields, formats, enums)\n- Example values\n\n## � Troubleshooting\n\n\u003cimg src=\"docs/snapshots/list.png\" width=\"100%\" /\u003e\n\u003cimg src=\"docs/snapshots/detail.png\" width=\"100%\" /\u003e\n\n### Common Issues\n\n1. **CORS Errors**: Ensure your API allows cross-origin requests\n2. **Invalid Schema**: Check that your OpenAPI spec is valid JSON/YAML\n3. **No Resources Found**: Verify your spec contains standard REST patterns\n4. **Config Loading Failed**: Check browser console for errors\n\n### Debug Mode\n\n```javascript\nlocalStorage.setItem(\"debug\", \"openapi-rest-admin:*\");\n```\n\n## 🤝 Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.\n\nQuick start for contributors:\n\n1. Fork and clone the repository\n2. Run `npm install` and `npm run dev`\n3. Make your changes and add tests\n4. Submit a pull request\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- [React Router v7](https://reactrouter.com/) - Routing and SSR\n- [Ant Design](https://ant.design/) - UI components\n- [swagger-parser](https://github.com/APIDevTools/swagger-parser) - OpenAPI parsing\n\n---\n\n**Made with ❤️ for the API development community**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltbo%2Fopenapi-rest-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaltbo%2Fopenapi-rest-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltbo%2Fopenapi-rest-admin/lists"}