This is a Task Management System built with Go, Gin, and MySQL. It allows users to manage tasks and users, with authentication and authorization features.
- User authentication and authorization
- CRUD operations for users and tasks
- Task assignment to users
- Middleware for token validation
- Docker support for easy setup
- Go 1.23.2 or later
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/manosvelivasakis/taskmanagement.git cd taskmanagement -
Copy the example environment file and update it with your configuration:
cp .env.example .env
-
Build the Go application:
make build
-
Start the application using Docker Compose:
make up
To run the application locally without Docker, use the following command:
make runTo stop the Docker containers, use:
make down- POST
/login: User login - POST
/register: User registration
- POST
/: Create a new user - GET
/user: List all users - GET
/user/:id: Get a user by ID - PUT
/user/:id: Update a user by ID - DELETE
/user/:id: Delete a user by ID
- POST
/task: Create a new task - GET
/task: List all tasks - GET
/task/:id: Get a task by ID - PUT
/task/:id: Update a task by ID - DELETE
/task/:id: Delete a task by ID - GET
/task/user/:id: Get tasks assigned to a user
The following environment variables need to be set in the .env file:
DB_HOST=your_db_host
DB_PORT=your_db_port
DB_USER=your_user
DB_PASSWORD=your_password
DB_NAME=your_db_name
DB_ROOT_PASSWORD=your_root_password
DB_PATH=path/to/your/init-scripts/folder
APP_PORT=8080