Task API
A simple REST API for task management built with Go, demonstrating best practices in open-source development with CodeRabbit integration.
Features
- Create, read, update, and delete tasks
- In-memory storage for simplicity
- RESTful API design
- Comprehensive documentation
- Automated code reviews with CodeRabbit
Quick Start
# Clone the repository
git clone https://github.com/AKSHAYK0UL/task-Api.git
cd task-api
# Install dependencies
go mod tidy
# Run the server
go run cmd/server/main.go
The API will be available at http://localhost:8080
API Endpoints
| Method |
Endpoint |
Description |
| GET |
/tasks |
Get all tasks |
| GET |
/tasks/{id} |
Get task by ID |
| POST |
/tasks |
Create new task |
| PUT |
/tasks/{id} |
Update task |
| DELETE |
/tasks/{id} |
Delete task |
Project Structure
task_api/
├── cmd/server/main.go # Application entry point
├── internal/handler/ # HTTP handlers
├── internal/model/ # Data models
├── internal/store/ # Data storage layer
├── docs/ # API documentation
├── .coderabbit.yaml # CodeRabbit configuration
└── README.md # Project documentation
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'Add amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
All PRs are automatically reviewed by CodeRabbit for code quality, security, and best practices.
License
This project is licensed under the MIT License - see the LICENSE file for details.