A RESTful Todo Management System built using Go, GORM, and PostgreSQL to handle tasks efficiently. This project includes user management, task categorization, and the ability to set deadlines and track completion status.
- User Management:
- Create and manage users.
- Secure user authentication and authorization.
- Todo Management:
- Create, update, delete, and retrieve todos.
- Associate todos with specific users and categories.
- Set deadlines and mark tasks as completed.
- Category Management:
- Define categories for tasks.
- Associate tasks with predefined categories.
- Soft Deletes:
- Use GORM’s soft delete functionality to preserve data integrity.
- Backend: Go
- Database: PostgreSQL
- ORM: GORM
- API Testing: Postman
` By default this runs on port-8080
POST("/api/users/create)
GET("/api/users/getAll")
GET("/api/users/get-by-pid")
POST("/api/users/delete")
PUT("api/users/update")
POST /todos
- Create a new todo.GET /todos
- Get all todos.GET /todos/{id}
- Get todo by ID.PUT /todos/{id}
- Update todo by ID.DELETE /todos/{id}
- Soft delete a todo.
POST /categories
- Create a new category.GET /categories
- Get all categories.
- Install Go (>= 1.19).
- Install PostgreSQL.
- Install Postman for API testing.
-
Clone the repository:
git clone https://github.com/MohitPandia/go-to-do.git cd go-to-do
-
Install dependencies:
go mod tidy
-
Set up PostgreSQL:
- Create a database.
- Update the database connection string in the environment variables or configuration file.
-
Run migrations:
go run main.go migrate
-
Start the server:
go run main.go
-
Test the API using Postman or any API client.
This project is managed by Yash Pandia