TicketIt is a simple ticket management system implemented in Go. The project includes various entities such as users, tickets, comments, settings, statuses, priorities, categories, and audits, which are interconnected as shown in the database schema diagram.
- cmd/main.go: The main entry point of the application.
- cmd/migrate/main.go: Handles database migrations.
- cmd/migrate/migrations: Contains SQL migration files.
- bin/: Directory where the compiled application will be placed.
The project includes a Makefile with various commands to build, test, and run the application, as well as to manage database migrations.
To build the application, run:
make build
This command will compile the Go code and place the executable in the bin
directory.
To run the application, use:
make run
This will first build the application and then run the resulting binary.
To execute the tests, run:
make test
This command will run all the tests in the project.
To create a new migration, use:
make migration name=your_migration_name
This will create a new SQL migration file in the cmd/migrate/migrations
directory.
To apply all the pending migrations, run:
make migrate-up
To rollback the last applied migration, use:
make migrate-down
- Clone the repository:
git clone https://github.com/your-username/TicketIt.git
cd TicketIt
- Build the application:
make build
- Run the database migrations:
make migrate-up
- Run the application:
make run
Ensure you have the following dependencies installed:
- Go 1.16+
migrate
tool for database migrations
Feel free to fork this repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. See the LICENSE file for details.