Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bannaarr01/trouble-ticket-ms
trouble ticket api
https://github.com/bannaarr01/trouble-ticket-ms
complaint-management-system gin-framework gin-gonic gin-gonic-api gin-gonic-mysql gin-middleware go-rest-api go-rest-api-docker go-rest-api-docker-keycloak go-rest-api-keycloak gocloak golang issue-ticket issue-tracker trouble-ticket
Last synced: 16 days ago
JSON representation
trouble ticket api
- Host: GitHub
- URL: https://github.com/bannaarr01/trouble-ticket-ms
- Owner: bannaarr01
- License: apache-2.0
- Created: 2024-08-25T08:31:22.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-08-25T15:59:16.000Z (4 months ago)
- Last Synced: 2024-11-02T11:21:58.532Z (2 months ago)
- Topics: complaint-management-system, gin-framework, gin-gonic, gin-gonic-api, gin-gonic-mysql, gin-middleware, go-rest-api, go-rest-api-docker, go-rest-api-docker-keycloak, go-rest-api-keycloak, gocloak, golang, issue-ticket, issue-tracker, trouble-ticket
- Language: Go
- Homepage:
- Size: 205 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Trouble Ticket
Trouble Ticket API
go-restapi-mysql-keycloak-redis-docker
## Dependencies
- [Go](https://github.com/golang/go)
- [Gin](https://github.com/gin-gonic/gin)
- [Go Cloak](https://github.com/Nerzal/gocloak)
- [Lumberjack Logger](https://github.com/natefinch/lumberjackLumberjack)
- [MySQL 8.4.2](https://hub.docker.com/_/mysql/Utilize)
- [Go Sql Driver](github.com/go-sql-driver/mysql )
- [Gorm](https://github.com/go-gorm/gorm)
- [Go-redis](https://github.com/redis/go-redis)
- [Ginkgo](https://github.com/onsi/ginkgo)
- [Cors](github.com/gin-contrib/cors)
- [GoDotEnv](github.com/joho/godotenv)
- [Gin Swagger](https://github.com/swaggo/gin-swagger)## Getting Started
### Prerequisites
- Go 1.22 or higher
- Docker (optional, for running MySQL and Redis)
- MySQL server
- Redis server### Installation
1. **Clone the Repository**
```bash
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**
```bash
docker-compose up -d
```### API Endpoints
Refer to the [Swagger Documentation](http://localhost:8080/swagger/index.html) for detailed information on available endpoints and their usage.
### DB Design
[DB Structure](assets/db_structure.pdf)### Testing
To run the unit tests:
```bash
ginkgo ./...
```### Keycloak Settings
**Access the Admin Console** [Keycloak Admin Console](http://localhost:8501)## Setup Requirements
To enable successful sign-up via Keycloak endpoint, update the following settings:
* Import the [realm settings](realm-export.json) 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
- Author - [B. Joshua Adedigba](https://www.linkedin.com/in/b-joshua-adedigba-a96231211/)
- Email: [[email protected]]([email protected])## License
Trouble Ticket is [Apache Licensed](LICENSE).