Giter VIP home page Giter VIP logo

fancy-todo-1's Introduction

fancy-todo

fancy-todo

installation

  1. clone this repository
  2. npm install on the server folder
  3. set up .env files as below
MONGODB_URL=[mongodb atlas url]
SECRET_JWT=[secret jwt]
SALT_ROUNDS=[salt round]
PASSWORD=[auto generated password]
PORT=[port]
CLIENT_ID=[google oauth client id]
  1. run npm run start on server folder terminal
  2. run live-server --host=localhost on client folder terminal

server documentation

backend routes - USER

POST /users/register => register as a new user POST /users/login => log in as a registered user POST /users/logingoogle => log in using google GET /users/allname => get all name & email of registered users

backend routes - TODO

GET /todos => get todo that belongs to a user GET /todos/:todoId => get todo by id GET /todos/project/:projectId => get todos of a project POST /todos => create new todo PATCH /todos/:todoId => update todo DELETE /todos/:todoId => delete todo

backend routes - PROJECT

GET /projects => get projects that are assigned to user GET /projects/:id => get project by id POST /projects => create new project PATCH /projects/:id?adminOnly=false => update project DELETE /projects/:id?adminOnly=true => delete project

server details

description route method req.headers req.body req.query response on success response on error middlewares
register as a new user /users/register POST - name, email, password - { user object } { message } ---
log in as a registered user /users/login POST - name, email, password - { token } { message } ---
log in using google /users/logingoogle POST - ticket - { token } { message } ---
get all name & email of registered users /users/allname GET { token } - - [ { user object }] { message } authentication
get todo that belongs to a user /todos GET { token } - - [ { todos object } ] { message } authentication
get todo by id /todos/:todoId GET { token } - - { todos object } { message } authentication, authorization
get todos of a project /todos/project/:projectId GET { token } - - [ { todos object } ] { message } authentication, authorization
create new todo /todos POST { token } { todos object } - [ { todos object } ] { message } authentication
update todo /todos/:todoId PATCH { token } { todos object } - { todos object } { message } authentication, authorization
delete todo /todos/:todoId DELETE { token } todos._id - { todos object } { message } authentication, authorization
get projects that are assigned to user /projects GET { token } - - [ { project object } ] { message } authentication, authorization
get project by id /project/:projectId GET { token } - - { project object } { message } authentication, authorization
create new project /project POST { token } { project object } - { project object } { message } authentication
update project /todos/:todoId PATCH { token } { project object } - { project object } { message } authentication, authorization
delete project /todos/:todoId DELETE { token } project._id - { project object } { message } authentication, authorization

next update

  1. make the server & client live on http://noviirna-fancytodo.site
  2. fix some minor cosmetic bugs

fancy-todo-1's People

Contributors

noviirna avatar wikasilo avatar

Watchers

James Cloos 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.