TaskManager is a simple, terminal-based task management application with a web interface. It allows you to manage tasks with features like adding, updating, deleting, and viewing tasks.
- Terminal-based user interface
- Web interface for remote access
- Add, update, delete, and view tasks
- Filter tasks by status (Completed, In Progress, Not Completed)
- Persistent storage using JSON file
To install TaskManager, you need to have Go installed on your system. Then, you can use the following command:
go get github.com/Saiweb3dev/taskManager
To use TaskManager in your Go project:
package main
import (
"log"
"github.com/yourusername/taskmanager/internal/taskmanager"
)
func main() {
config := taskmanager.Config{
Filename: "tasks.json",
Port: 9000,
}
tm := taskmanager.NewTaskManager(config)
err := tm.Run()
if err != nil {
log.Fatal("Error running task manager:", err)
}
}
To run TaskManager as a standalone application:
go run main.go
Once running, you'll see a menu with the following options:
- Add Task
- Update Task
- Show All Tasks
- Show Completed Tasks
- Show In Progress Tasks
- Show Not Completed Tasks
- Delete Task
- Exit
Use the number keys to select an option.
The web interface runs on http://localhost:9000
(or the port you specified in the configuration). You can use the following endpoints:
- GET
/tasks
: List all tasks - POST
/add
: Add a new task - POST
/update
: Update an existing task - POST
/delete?id=<task_id>
: Delete a task
Add a task:
curl -X POST http://localhost:9000/add -H "Content-Type: application/json" -d '{"description":"New task", "status":"Not Completed"}'
You can configure the TaskManager with the following options:
Filename
: The name of the JSON file to store tasks (default: "tasks.json")Port
: The port number to run the web interface on (default: 9000)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.