This project is an API Gateway built using Starlette and HTTPX. It is currently in the MVP stage, focusing on basic routing functionalities.
check out RedHat docs to understand the usage.
- Routing: Directs incoming requests to the appropriate backend services.
- CI/CD: Test and build image on push or merge with main.
- Dynamic Middleware: Allows for dynamic addition and removal of middleware.
- Firewall: Basic firewall functionalities to secure the gateway.
- Database Configuration: Configures and manages database connections.
- Observations: Tracks and logs requests for monitoring and debugging.
- Authentication and Authorization: Implement security measures to control access to services.
- Rate Limiting: Add functionality to limit the number of requests a client can make.
- Load Balancing: Distribute incoming requests across multiple instances of a service.
- Caching: Store responses to reduce load on backend services.
Starlette: A lightweight ASGI framework/toolkit. HTTPX: An HTTP client for Python.
- Docker
-
Clone the repository:
git clone https://github.com/aminmasoudi/api-gateway.git cd api-gateway
-
Create a settings file: Create a file named
prod.py
in the settings directory with the necessary configuration settings. -
Run with Docker:
docker run -v $(pwd)/prod.py:/app/prod.py -p 8000:8000 aminmasoudii/api-gateway
Once the application is running, you can access the API Gateway at http://localhost:8000.
- prod.py: This file should contain all the necessary configuration settings for the application.
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Make your changes.
- Commit your changes (git commit -m 'Add new feature').
- Push to the branch (git push origin feature-branch).
- Open a pull request.
- Fixing Cookies and CSRF Tokens: Secure handling of cookies and CSRF tokens.
- Implementing Planned Features: Work on any of the planned features listed above.
- Reporting any Issue: Submit any issue you see.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or support, please contact the maintainer at [email protected].