Git Product home page Git Product logo

udofia2 / activities Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 300 KB

This is a task management system that allows users to register and create tasks. Users can mark tasks as completed. Users can create private and shared tasks. Completed tasks and Shared tasks can be seen by anyone while private tasks are seen only by the owner of the task. Fully paginated.

Home Page: https://activities-csay.onrender.com/v1/docs

License: MIT License

TypeScript 97.62% Shell 0.15% Dockerfile 0.31% JavaScript 0.29% HTML 1.64%

activities's Introduction

Description

This is a task management system that allows users to register and create tasks. Users can mark tasks as completed. Users can create private and shared tasks. Completed tasks and Shared tasks can be seen by anyone while private tasks are seen only by the owner of the task. Fully paginated.

Quick Start

Clone the repo:

git clone https://github.com/udofia2/activities.git
cd tasks-management-socket
yarn install
cp .env.example .env
nvm use 18
yarn compile

for local development

yarn dev

for production build

yarn start

docker for dev

yarn start

docker for prod

yarn start

Compiling to JS from TS

yarn compile

Compiling to JS from TS in watch mode

yarn compile:watch
yarn commit

Testing:

# all tests
yarn test

# TypeScript tests
yarn test:ts

# JS tests
yarn test:js

# all tests in watch mode
yarn test:watch

# test coverage
yarn coverage

Linting:

# run ESLint
yarn lint

# fix ESLint errors
yarn lint:fix

# run prettier
yarn prettier

# fix prettier errors
yarn prettier:fix

API Endpoints

List of available routes:

Auth routes:
GET /health - health check\

Auth routes:
POST /v1/auth/register - register
POST /v1/auth/login - login
POST /v1/auth/refresh-tokens - refresh auth tokens
POST /v1/auth/forgot-password - reset password token POST /v1/auth/reset-password - reset password

Blog routes:
POST /v1/tasks - create a task
GET /v1/tasks - get all tasks including published and draft
GET /v1/tasks/shared - get all shared tasks
GET /v1/tasks/completed - get all completed tasks
GET /v1/tasks/my/tasks - get all created tasks for a login user
GET /v1/tasks/:taskId - get task
PATCH /v1/tasks/:taskId - update task by a login user
DELETE /v1/tasks/:taskId - delete task by a login user\

User routes:
POST /v1/users - create a user
GET /v1/users - get all users
GET /v1/users/:userId - get user
PATCH /v1/users/:userId - update user
DELETE /v1/users/:userId - delete user\

[Entities]:

  • Users : Represents a registered user on the blogging platform.
  • Tasks : Represents a task created by a user.
  • Tokens : Represents an authentication or authorization token associated with a user.

[Attributes]

User:
  -  _id (primary key)
  -  first_name
  -  last_name
  -  email (unique)
  -  password (hashed)
  -  role
  -  isEmailVerified

Task:
  -  _id (primary key)
  -  title (unique)
  -  isCompleted
  -  description(boolean)
  -  owner_id (foreign key referencing User._id)
  -  status
  -  view_count
  -  tags
  Token:
  -  _id (primary key)
  -  token (unique)
  -  user (foreign key referencing User._id)
  -  type (refresh, reset_password)
  -  expires
  -  blacklisted

[Relationships]:

  • User - Token(one-to-many)
  • Task - User(many-to-one)

Diagram:

     (1)                        (N)
User ----->* Token  (N)          |
     |                       Task
user_id    user_id (FK) --------*-----> (relationship)

activities's People

Contributors

udofia2 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.