Skip to content

bannaarr01/trouble-ticket-ms

Repository files navigation

Trouble Ticket

Trouble Ticket API

go-restapi-mysql-keycloak-redis-docker

Dependencies

Getting Started

Prerequisites

  • Go 1.22 or higher
  • Docker (optional, for running MySQL and Redis)
  • MySQL server
  • Redis server

Installation

  1. Clone the Repository

    git clone https://github.com/bannaarr01/trouble-ticket-ms.git
    cd trouble-ticket-ms
  2. Configuration

    • Update all the env files for database and Keycloak.
  3. Start the Application

    docker-compose up -d

API Endpoints

Refer to the Swagger Documentation for detailed information on available endpoints and their usage.

DB Design

DB Structure

Testing

To run the unit tests:

ginkgo ./... 

Keycloak Settings

Access the Admin Console Keycloak Admin Console

Setup Requirements

To enable successful sign-up via Keycloak endpoint, update the following settings:

  • Import the realm settings for auto-setup (create a new client secret afterwards for the service-account client), details also in .env
  • Create an initial admin user on the admin console in entry client if used the import, assign (admin) role and log in to obtain a token
  • Use the token to create new users with any roles
  • If creating an admin user with this token, the admin user can also create new users with any roles

Stay in touch

License

Trouble Ticket is Apache Licensed.