A powerful tool for automatically analyzing and documenting REST APIs with a modern React frontend and Python backend.
Try it now: https://universal-api-generator.onrender.com/
Experience the Universal API Generator in action! The live demo allows you to:
- Analyze any public API endpoint
- Generate comprehensive Swagger documentation
- View interactive API documentation with Swagger UI
- Test the full functionality without installation
Example APIs to try:
https://api.github.com- GitHub APIhttps://jsonplaceholder.typicode.com- JSONPlaceholder APIhttps://api.openf1.org/v1- OpenF1 API
Universal API Generator is a comprehensive solution that combines:
- Python Backend: Intelligent API analysis and Swagger specification generation
- React Frontend: Modern, responsive UI with Swagger UI integration
- Integrated Server: Single command to run both frontend and backend
universal_api_generator/
βββ universal_api_backend/ # Python backend
β βββ app.py # Flask server
β βββ universal_api_generator.py # Main API analyzer
β βββ swagger_generator.py # Swagger spec generator
β βββ run_server.py # Integrated server runner
β βββ requirements.txt # Python dependencies
βββ universal_api_frontend/ # React frontend
β βββ src/ # React source code
β βββ public/ # Static assets
β βββ package.json # NPM configuration
β βββ tailwind.config.js # Tailwind CSS config
βββ README.md # This file
# Clone the repository
git clone <your-repo-url>
cd universal_api_generator
# Run the integrated server
cd universal_api_backend
python3 run_server.py
# Open http://localhost:5000 in your browser# Backend: Generate API documentation
cd universal_api_backend
python3 universal_api_generator.py https://api.example.com --swagger
# Frontend: Start React development server
cd universal_api_frontend
npm install
npm run dev- β Intelligent Endpoint Discovery: Automatic detection of API endpoints
- β Custom Endpoint Support: Specify exact endpoints for targeted analysis
- β Parameter Analysis: Comprehensive parameter type detection and validation
- β CRUD Operation Detection: Automatic identification of Create, Read, Update, Delete operations
- β Swagger Generation: Generate OpenAPI/Swagger specifications
- β Response Schema Analysis: Infer data structures from API responses
- β Modern UI: Clean, responsive design inspired by open-lovable
- β Swagger UI Integration: Professional API documentation viewer
- β Custom Endpoints: Specify exact endpoints for efficient analysis
- β Advanced Options: API name, description, and custom endpoint configuration
- β Tailwind CSS: Modern utility-first styling
- β Real-time Feedback: Progress indicators and status updates
- β Single Command: Run both frontend and backend with one command
- β Auto-build: Automatic frontend building and dependency installation
- β API Endpoints: RESTful API for frontend-backend communication
- β Error Handling: Graceful error handling and user feedback
# Basic analysis
python3 universal_api_backend/universal_api_generator.py https://api.example.com
# With custom endpoints
python3 universal_api_backend/universal_api_generator.py https://api.example.com -e /users /posts --swagger
# From endpoints file
python3 universal_api_backend/universal_api_generator.py https://api.example.com -f endpoints.txt --swagger- Start Server: Run
python3 run_server.py - Open Browser: Navigate to
http://localhost:5000 - Enter API URL: Add your API URL and optional custom endpoints
- Generate Docs: Click "Analyze API" to generate documentation
- View Results: Swagger UI displays the generated documentation
- Python 3.8+
- Node.js 16+
- npm or yarn
cd universal_api_backend
pip install -r requirements.txtcd universal_api_frontend
npm install- Timeout: Adjust request timeout in
universal_api_generator.py - Delay: Configure delay between requests
- Custom Endpoints: Specify exact endpoints for targeted analysis
- Styling: Modify
tailwind.config.jsfor theme customization - Components: Update
src/styles.jsfor component-specific styles - API Integration: Configure API endpoints in
src/App.js
app.py- Flask server with API endpointsuniversal_api_generator.py- Main API analysis engineswagger_generator.py- Swagger specification generatorrun_server.py- Integrated server runnerbuild_frontend.py- Frontend build automationrequirements.txt- Python dependencies
src/App.js- Main React componentsrc/index.js- Application entry pointsrc/styles.js- Tailwind CSS component stylessrc/index.css- Global styles and Tailwind directivespackage.json- NPM configuration and scriptstailwind.config.js- Tailwind CSS configuration
# Integrated mode
cd universal_api_backend
python3 run_server.py
# Separate mode
cd universal_api_frontend && npm run dev # Frontend
cd universal_api_backend && python3 app.py # Backend# Build frontend
cd universal_api_frontend
npm run build
# Run production server
cd universal_api_backend
python3 app.py- 404 Errors: Build frontend manually with
python3 build_frontend.py - npm Not Found: Install Node.js from https://nodejs.org/
- Port Conflicts: Use different port with
FLASK_PORT=5001 python3 app.py - Dependencies: Install with
pip install -r requirements.txt
# Enable debug logging
cd universal_api_backend
FLASK_DEBUG=1 python3 app.py- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- open-lovable: UI design inspiration
- Swagger UI: API documentation viewer
- Tailwind CSS: Utility-first CSS framework
- Flask: Python web framework
- React: Frontend framework
For issues and questions:
- Create an issue on GitHub
- Check the troubleshooting section
- Review the documentation in each directory
Made with β€οΈ for the developer community