Sign inSign up

iquipe/api-rout

By iquipe

β€’Updated 3 months ago

A lightweight PHP/SQLite API gateway managing routing, auth, rate-limiting, and metrics.

Image
API management
Web servers
Monitoring & observability
0

142

iquipe/api-rout repository overview

⁠ApiGateway v1.0.0 Easy (Dockerized)

This is a PHP + SQLite API Gateway containerized for rapid deployment. Think of it as a traffic controller for your microservices or API endpointsβ€”it manages routing, authentication, rate limiting, and metrics reporting in a lightweight package.


β πŸš€ Getting Started with Docker

To run the gateway as a service, use the following configuration.

⁠1. Run the Container

You can pull and run the image directly:

docker run -d \
  -p 8000:80 \
  --name api-gateway \
  iquipe/api-rout:beta

⁠2. Environment Variables (Optional)

You can customize the deployment by passing environment variables:

VariableDescriptionDefault
DB_PATHPath for the SQLite database/var/www/html/db/gateway.sqlite
CACHE_ENABLEDToggle caching mechanismtrue

β πŸ›  Features

  • Multi-tenant support β†’ Isolated routes, limits, and counters per client.
  • Login protection β†’ Secure Basic Auth implementation.
  • Rate limiting β†’ Prevents API abuse and traffic spikes.
  • Request tracking β†’ Built-in counters for usage monitoring.
  • Caching β†’ Reduces load on your backend services.
  • Metrics endpoint β†’ Real-time stats exposed via JSON.

β πŸ” Credentials

  • Username: admin
  • Password: admin123
  • Admin URL: http://localhost:8000/admin
  • API Endpoint: http://localhost:8000
  • Video Show Step-by-Step: https://youtu.be/MXYPjv6OP8Y

β βœ… Verification

Once the container is running, verify connectivity with these commands:

Test your routes:

curl -X GET http://localhost:8000/users \
    -H "Authorization: Basic YWRtaW46YWRtaW4xMjM=" \
    -H "X-Client-ID: client123"

Check system metrics:

curl -X GET http://localhost:8000/metrics \
    -H "Authorization: Basic YWRtaW46YWRtaW4xMjM=" \
    -H "X-Client-ID: client123"


β πŸ“š Resources

Tag summary

Content type

Image

Digest

sha256:232bb39f0…

Size

190.4 MB

Last updated

3 months ago

docker pull iquipe/api-rout:beta