Skip to content

qthuy2k1/thesis-management-backend

Repository files navigation

Thesis Management Backend

Overview

An API provides the features to manage the thesis graduation for IT students and lecturers

Table of Contents

  1. Installation
  2. Usage
  3. Configuration

Installation

Requirements

  • Docker (required)
  • Kubernetes (optional, for advanced usage)
  • Minikube (optional, for local development with Kubernetes)

Steps

  1. Clone this repository

    git clone https://github.com/qthuy2k1/thesis-management-backend.git
    cd thesis-management-backend
  2. If you want to use Docker, run the following command

    docker compose up
  3. If you want to use Kubernetes and Minikube, run the following command

    # Run the Minikube
    minikube start --namespace thesis-management-backend
    
    # Create the Kubernetes namespace
    kubectl create namespace thesis-management-backend
    
    # Apply all the kubernetes deployments and services
    kubectl apply -f kubernetes/
    
    # Expose the service port to the local port
    minikube tunnel
  4. You can access to the Kubernetes dashboard by running the following command

    minikube dashboard
  5. After all the pods are running, you can use the API right now

Architecture

  1. Server architecture

server_architecture

  1. Database diagram 1.1 Classroom service

classroom_service

1.2 User service

user_service

1.3 Schedule service

schedule_service

Usage

For the examples, please refer to the api-docs folder

Configuration

The API requires the following configuration:

  1. For authentication, you have to download the firebase admin sdk json file from Firebase Console in the Project Settings. Here is an example of configuration:

    {
        "type": "service_account",
        "project_id": "YOUR_PROJECT_ID",
        "private_key_id": "YOUR_PRIVATE_KEY_ID",
        "private_key": "YOUR_PRIVATE_KEY",
        "client_email": "YOUR_CLIENT_EMAIL",
        "client_id": "YOUR_CLIENT_ID",
        "auth_uri": "https://accounts.google.com/o/oauth2/auth",
        "token_uri": "https://oauth2.googleapis.com/token",
        "auth_provider_x509_cert_url": "YOUR_AUTH_PROVIDER_X509_CERT_URL",
        "client_x509_cert_url": "YOUR_CLIENT_X509_CERT_URL",
        "universe_domain": "googleapis.com"
    }
  2. For uploading file, you have to download the credentials file from Google Cloud Console. Here is an example of configuration:

        {
            "installed": 
            {
                "client_id":"YOUR_CLIENT_ID",
                "project_id":"YOUR_PROJECT_ID",
                "auth_uri":"https://accounts.google.com/o/oauth2/auth",
                "token_uri":"https://oauth2.googleapis.com/token",
                "auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs",
                "client_secret":"YOUR_CLIENT_SECRET",
                "redirect_uris":["http://localhost"]
            }
        }

About

Microservices: Golang, gRPC, Postgres,...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published