Skip to content

API Gateway of a University Club Management Web Application

Notifications You must be signed in to change notification settings

ARUMANDESU/university-clubs-backend

Repository files navigation

UCMS API Gateway

Overview

This service is part of the University Clubs Management application, focusing on connecting api endpoints with other microservices.

Technologies Used

Getting Started

Prerequisites

  • Go version 1.22
  • Docker 4.29.0

Other microservices

Protofiles

Installation

Clone the repository:

git clone https://github.com/ARUMANDESU/university-clubs-backend.git
cd university-clubs-backend
go mod download

Configuration

The Uniclubs API Gateway requires a configuration file to specify various settings like service-specific parameters, other microservices address etc. Depending on your environment (development, test, or production), different configurations may be needed.

Configuration Files

  • dev.yaml: Contains configuration for the development environment.
  • test.yaml: Used for the test environment.
  • local.yaml: Configuration for local development.

Setting Up Configuration

# Example configuration snippet
ENV=dev
SHUTDOWN_TIMEOUT=10s
JWT_SECRET=hart_secret_key

HTTP_ADDRESS=localhost:5000
HTTP_TIMEOUT=5s
HTTP_IDLE_TIMEOUT=3s

USER_SERVICE_ADDRESS=localhost:44044
USER_SERVICE_TIMEOUT=10s
USER_SERVICE_RETRIES_COUNT=2
CLUB_SERVICE_ADDRESS=localhost:44045
CLUB_SERVICE_TIMEOUT=10s
CLUB_SERVICE_RETRIES_COUNT=2

MICROSOFT_OIDC_SECRET=
MICROSOFT_OIDC_AUTHORITY=
MICROSOFT_OIDC_CLIENT_ID=

AWS_REGION=ap-northeast-1
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=

Running the Service

After setting up the database and configuring the service, you can run it as follows:

go run cmd/user-server/main.go

Or use the provided Taskfile to run the service:

task run:enviroment

#or

task env