Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/islamhaqq/tasksapi
https://github.com/islamhaqq/tasksapi
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/islamhaqq/tasksapi
- Owner: islamhaqq
- Created: 2024-03-05T21:14:43.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-03-06T19:34:03.000Z (8 months ago)
- Last Synced: 2024-09-13T15:42:43.696Z (2 months ago)
- Language: Ruby
- Size: 51.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rails Task Management API: README
## Overview
This Rails Task Management API provides a robust solution for managing tasks, users, and their assignments. Designed with simplicity and scalability in mind, it offers a comprehensive set of features suitable for a wide range of task management needs.
## Setup
To get started with the Rails Task Management API, follow these steps:
1. Clone the repository:
```bash
git clone https://github.com/SyedAman/TasksAPI.git
```2. Navigate to the project directory:
```bash
cd TasksAPI
```3. Install dependencies:
```bash
bundle install
```4. Set up the database:
```bash
rails db:create db:migrate db:seed
```5. Start the Rails server:
```bash
rails server
```Now, the API should be up and running on `http://localhost:3000`.
## Testing
The API uses RSpec for testing. Tests are located in the `spec` directory, with subdirectories for models, requests, and services. To run the tests, execute:
```bash
rspec
```This will run the entire test suite and output the results.
## API Endpoints
The API provides the following endpoints:
- **Users**:
- `GET /api/users`: List all users.
- `POST /api/users`: Create a new user.
- `GET /api/users/:id`: Show a single user.
- `PUT /api/users/:id`: Update a user.
- `DELETE /api/users/:id`: Delete a user.- **Tasks**:
- `GET /api/tasks`: List all tasks.
- `POST /api/tasks`: Create a new task.
- `GET /api/tasks/:id`: Show a single task.
- `PUT /api/tasks/:id`: Update a task.
- `DELETE /api/tasks/:id`: Delete a task.
- `POST /api/tasks/:id/assign`: Assign a task to a user.
- `PUT /api/tasks/:id/progress`: Update task progress.- **Statistics and Filters**:
- `GET /api/tasks/overdue`: List all overdue tasks.
- `GET /api/tasks/status/:status`: List tasks by status (pending, completed, etc.).
- `GET /api/tasks/completed`: List tasks completed within a certain date range.
- `GET /api/tasks/statistics`: Get statistical data of tasks.Each endpoint supports standard RESTful actions and returns JSON responses.
## Room for Improvement
While the API covers basic task management functionality, there are several areas where it could be enhanced:
- **API Versioning**: Implementing versioning can help manage changes more effectively and maintain compatibility.
- **Authentication and Authorization**: Adding user authentication and role-based access control would enhance security.
- **Performance Optimization**: Implementing caching and query optimization could improve response times and reduce server load.
- **Real-time Updates**: Utilizing ActionCable for WebSocket connections could allow real-time updates for task changes.
- **Comprehensive Testing**: Expanding the test suite to cover edge cases and failure scenarios would improve reliability.These enhancements would provide a more robust and user-friendly API, catering to a broader range of task management needs.