Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
# 🌐 API Gateway

## 🚦 Build Status

**main**

[![Build and Test API Gateway](https://github.com/TechTorque-2025/API_Gateway/actions/workflows/buildtest.yaml/badge.svg)](https://github.com/TechTorque-2025/API_Gateway/actions/workflows/buildtest.yaml)

**dev**

[![Build and Test API Gateway](https://github.com/TechTorque-2025/API_Gateway/actions/workflows/buildtest.yaml/badge.svg?branch=dev)](https://github.com/TechTorque-2025/API_Gateway/actions/workflows/buildtest.yaml)

This service is the single entry point for all client requests in the TechTorque 2025 system. It is responsible for routing, authentication, rate limiting, and enriching requests.

### 🎯 Key Responsibilities

- **Request Routing:** Maps incoming URL paths (e.g., `/api/v1/vehicles`) to the correct internal microservice (e.g., `vehicle-service`).
- **Authentication:** Validates JWTs for all protected endpoints.
- **Header Enrichment:** Injects `X-User-Subject` and `X-User-Roles` headers into requests after successful authentication.
- **CORS:** Manages all Cross-Origin Resource Sharing policies for the frontend application.
- **Request Routing:** Maps incoming URL paths (e.g., `/api/v1/vehicles`) to the correct internal microservice (e.g., `vehicle-service`).
- **Authentication:** Validates JWTs for all protected endpoints.
- **Header Enrichment:** Injects `X-User-Subject` and `X-User-Roles` headers into requests after successful authentication.
- **CORS:** Manages all Cross-Origin Resource Sharing policies for the frontend application.

### ⚙️ Tech Stack

- **Language:** Go
- **Router:** `chi/v5`
- **JWT Library:** `golang-jwt/jwt/v5`
![Go](https://img.shields.io/badge/go-%2300ADD8.svg?style=for-the-badge&logo=go&logoColor=white) ![Docker](https://img.shields.io/badge/Docker-2496ED?style=for-the-badge&logo=docker&logoColor=white)

- **Language:** Go
- **Router:** `chi/v5`
- **JWT Library:** `golang-jwt/jwt/v5`

### 🚀 Running Locally

This service is designed to be run as part of the main `docker-compose` setup from the project's root directory.

```bash
# From the root of the TechTorque-2025 project
docker-compose up --build api-gateway
docker-compose up --build api-gateway
```
Loading