Skip to content

glennprays/tix-id

Repository files navigation

TIX-ID Movie Ticketing

MIT License

This project aims to develop an application similar to TIX-ID, a well-established platform for booking tickets online. There is three roles here

  • Admin*
  • Customer*
  • Guest
    *Need Authentification

The program uses go-gin as the framework, MySQL as the database, and using go-migrate for database migrations

It also employs various libraries:

Get Started

API Documentation

To view the API documentation, you need to create /docs directory by running the following command in the terminal:

swag init

and open <URL>/swagger/index.html

Enviroment variables (.env)

Before starting the program, you need to set the .env file first:

  1. Create .env file in the root directory
  2. Copy the enviroment variables from .env.example
  3. Fill the variables

Database Migration

Ensure that you have installed go-migrate. Before migrating the database, create a database in your MySQL.
To run the database migrations:

  • UP Migration
    migrate -path config/migrations -database "<database_address>" up
    
  • DOWN Migration
    migrate -path config/migrations -database "<database_address>" down
    

"Note: Replace database_address with mysql:https://user:password@tcp(host:port)/dbname?query"

Docker

To start this project in docker:

  1. Build the Docker Compose first
    docker compose build
    
  2. Execute the Docker Compose useing 'up' command
    docker compose up
    
    this docker will run in port 80
  • Stopping Docker Compose
    docker compose down
    
  • Migrate Database in Docker
    docker run -v {{ migration dir }}:/config/migrations --network host migrate/migrate -path=/config/migrations/ -database mysql:https://user:password@tcp(host:port)/dbname?query up
    

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •