Giter VIP home page Giter VIP logo

tms's Introduction

Description

Nestjs Project for Task Management System with sqlite database and DrizzleORM. Swagger is also integrated for API documentation.

Deployed on Digitalocean

Endpoints

Create Task

  • Endpoint: /tasks

  • HTTP Method: POST

  • Request Body: { title: string, description: string, priority: number }

  • Response: { id: string, title: string, description: string, priority: number, status: string, createdAt: string, updatedAt: string }

List Tasks

  • Endpoint: /tasks

  • HTTP Method: GET

  • Query Parameters:

    • status: (optional) Filter tasks by status (pending, in progress, or completed).
    • priority: (optional) Filter tasks by priority (a number).
  • Response: [{ id: string, title: string, description: string, priority: number, status: string, createdAt: string, updatedAt: string }, ...]

Update Task

  • Endpoint: /tasks/:id

  • HTTP Method: PATCH

  • Path Parameter: id (required) - The ID of the task to update.

  • Request Body: { title: string, description: string, priority: number, status: string }

  • Response: { id: string, title: string, description: string, priority: number, status: string, createdAt: string, updatedAt: string }

Delete Task

  • Endpoint: /tasks/:id

  • HTTP Method: DELETE

  • Path Parameter: id (required) - The ID of the task to delete.

  • Response: { message: string }

Data Model

Task

  • id: Unique identifier for the task.
  • title: A string representing the title of the task.
  • description: A string containing a more detailed description of the task.
  • priority: An integer where a higher number represents a higher priority.
  • status: A string that can be "pending", "in progress", or "completed".
  • createdAt: Timestamp for when the task was created.
  • updatedAt: Timestamp for when the task was last updated.

Prerequisites

  • Node.js (version 18 or higher)

Installation

$ npm install

Make migrations

$ npm run db:generate

Run migrations

$ npm run db:migrate

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run build
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

changes needed to make it production ready

  • Use a production ready database like PostgreSQL
  • Dummy database setup for testing
  • Use a production ready logger like winston
  • Dockerize the application

tms's People

Contributors

rowheat02 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.