Skip to content

[JITERA] Add Todo API for managing tasks

Administrator requested to merge feat/todo-api-1760672723 into main

Overview

This pull request introduces a new "todo" API to the project, allowing users to manage tasks with basic CRUD operations. The implementation follows the existing project structure and conventions, including the creation of a Todo model, service, controller, and routes.

Changes

  1. Model:

    • Created backend/src/models/Todo.js to define the Todo schema and handle database interactions using SQLite.
  2. Service:

    • Implemented backend/src/services/todoService.js to encapsulate the business logic for managing todos, including methods for creating, reading, updating, and deleting todos.
  3. Controller:

    • Developed backend/src/controllers/todoController.js to handle incoming requests and responses, mapping them to the appropriate service methods.
  4. Routes:

    • Added backend/src/routes/todoRoutes.js to define the API endpoints for the todo resource, including routes for all CRUD operations.
  5. Database Configuration:

    • Updated backend/src/config/db.js to ensure the Todo model is properly integrated with the SQLite database.
  6. Server Integration:

    • Modified backend/src/server.js to include the new todo routes in the main application router, ensuring that the API is accessible.

This implementation adheres to the existing code style and patterns, ensuring consistency across the codebase.

Merge request reports