Enterprise-Grade API Gateway & Developer Portal
A self-hostable, production-ready API Gateway solution for managing, securing, and monitoring your APIs at scale.
Features β’ Tech Stack β’ Quick Start β’ API Reference β’ Architecture β’ Developer
GatePilot is a comprehensive API management platform designed for developers and organizations who need complete control over their API infrastructure. Built with modern technologies and security best practices, GatePilot provides everything you need to manage API access, enforce rate limits, and monitor usage.
- Self-Hostable: Full control over your data and infrastructure
- Enterprise Security: SHA-256 hashed API keys, audit logging, and role-based access
- Real-time Analytics: Monitor API usage, latency, and error rates
- Developer-Friendly: Clean UI, comprehensive documentation, and OpenAPI support
- Create and manage multiple organizations
- Invite team members with role-based permissions (Owner, Admin, Member, Viewer)
- Isolated projects per organization
- Create unlimited API projects
- Configure routes, keys, and rate limits per project
- Enable/disable projects instantly
- Define proxy routes to upstream services
- Path prefix matching with HTTP method filtering
- Scope-based access control per route
- SHA-256 hashed key storage (keys never stored in plaintext)
- Unique key prefixes for identification (
gp_xxxxxxx) - Scope-based permissions
- Key expiration and revocation
- Per-key requests per minute (RPM) limits
- Per-IP rate limiting
- Daily quota enforcement
- Configurable rate limit policies
- Complete request history with metadata
- Latency tracking and status code monitoring
- Visual analytics dashboard with charts:
- Requests over time
- Endpoint distribution
- Latency percentiles
- Error rate tracking
- Upload and host OpenAPI/Swagger specifications
- Auto-generated API documentation
- Version management
- Complete trail of administrative actions
- Compliance-ready logging
- Filter by action, resource, and time
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, Vite, Tailwind CSS, shadcn/ui |
| Backend | Express.js, TypeScript, Node.js |
| Database | PostgreSQL with Drizzle ORM |
| Authentication | Supabase Auth (Email/Password) |
| Charts | Recharts |
| State Management | TanStack Query |
| Routing | Wouter |
- Node.js 18+
- PostgreSQL 14+
- Supabase account (for authentication)
- Clone the repository
git clone https://github.com/Mavdii/GetPilot.git
cd GetPilot- Install dependencies
npm install- Configure environment variables
cp .env.example .env
# Edit .env with your credentials- Set up the database
# Run migrations
npm run db:push
# Or use SQL files
psql -d your_database -f migrations/000_run_all.sql- Start the development server
npm run devThe application will be available at http://localhost:5000
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
SESSION_SECRET |
Secret key for session encryption |
SUPABASE_URL |
Supabase project URL |
SUPABASE_ANON_KEY |
Supabase anonymous key |
SUPABASE_SERVICE_ROLE_KEY |
Supabase service role key |
See .env.example for a complete list.
gatepilot/
βββ client/ # Frontend React application
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ ui/ # shadcn/ui components
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utilities and query client
β β βββ pages/ # Page components
β βββ index.html
βββ server/ # Backend Express application
β βββ routes.ts # API route handlers
β βββ storage.ts # Database storage layer
β βββ supabase-auth.ts # Authentication logic
β βββ index.ts # Server entry point
βββ shared/ # Shared types and schemas
β βββ tables/ # Database table definitions
β β βββ users.ts
β β βββ organizations.ts
β β βββ projects.ts
β β βββ api-keys.ts
β β βββ rate-limits.ts
β β βββ request-logs.ts
β β βββ openapi-specs.ts
β β βββ audit-logs.ts
β βββ schema.ts # Combined schema exports
βββ migrations/ # SQL migration files
β βββ 001_create_sessions.sql
β βββ 002_create_users.sql
β βββ ...
βββ drizzle.config.ts # Drizzle ORM configuration
Proxy requests through the gateway:
POST /gateway/{projectId}/your/api/path
Headers:
x-api-key: gp_your_api_key_here
Content-Type: application/json| Method | Endpoint | Description |
|---|---|---|
POST |
/api/auth/signup |
Register new user |
POST |
/api/auth/login |
Login with credentials |
POST |
/api/auth/logout |
Logout current user |
GET |
/api/auth/user |
Get current user info |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/orgs |
List user's organizations |
GET |
/api/orgs/:slug |
Get organization details |
POST |
/api/orgs |
Create new organization |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/projects/:id |
Get project with routes |
POST |
/api/orgs/:slug/projects |
Create new project |
PATCH |
/api/projects/:id |
Update project |
DELETE |
/api/projects/:id |
Delete project |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/projects/:projectId/keys |
List API keys |
POST |
/api/projects/:projectId/keys |
Generate new API key |
POST |
/api/keys/:id/revoke |
Revoke API key |
- Keys are hashed with SHA-256 before storage
- Only the key prefix (first 11 characters) is stored for display
- Full key is shown only once at creation time
- HTTP-only cookies
- Secure flag in production
- Session expiration (7 days default)
- All sensitive operations are logged
- Actor, action, resource, and timestamp recorded
- Compliance-ready audit logs
GatePilot provides comprehensive analytics including:
- Requests Over Time: Line chart showing API traffic trends
- Status Code Distribution: Pie chart of response codes (2xx, 4xx, 5xx)
- Endpoint Popularity: Bar chart of most-used endpoints
- Latency Percentiles: P50, P95, P99 latency metrics
- Error Rate Tracking: Monitor API health in real-time
The database consists of 11 tables organized for optimal performance:
| Table | Description |
|---|---|
users |
User accounts |
sessions |
Session storage |
orgs |
Organizations |
memberships |
User-org relationships |
projects |
API projects |
routes |
Proxy route configurations |
api_clients |
Registered API consumers |
api_keys |
Hashed API keys |
rate_limit_policies |
Rate limiting configs |
request_logs |
API request history |
openapi_specs |
OpenAPI specifications |
audit_logs |
Administrative action log |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
| Platform | Contact |
|---|---|
| π€ Name | Umar |
| π GitHub | @Mavdii |
| π§ Email | omarelmhdi@gmail.com |
| π± Telegram | @dev_umar |
| π¬ WhatsApp | 01550875414 |
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by Umar