Skip to content

Meganote is a full-stack task management app built with React, Redux, Material UI, Node.js, Express, and MongoDB

Notifications You must be signed in to change notification settings

hoanglechau/meganote-fe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meganote - The ultimate task management app

Table of Contents
  1. Links
  2. About The Project
  3. API Endpoints
  4. Entity Relationship Diagram
  5. Getting Started

Links

(back to top)


About The Project

Meganote Public Screen Shot

Meganote Screen Shot

Project Description

Meganote is an app that aims to solve a problem that companies often have - how to manage employees' tasks efficiently.

This app acts like the traditional sticky note board system in which users stick notes that contain the tasks need to be done on a board and then proceed to complete them one-by-one.

Challenges: Designing logical schema models for the API, implementing authentication and authorization, designing an easy-to-use user interface, making the app responsive.

Features for the future: Making a mobile version of the app for iOS and Android.

(back to top)

User Stories

Authentication

  • As a user, I can sign in with my username and password
  • As a user, I can choose to stay signed in after refreshing the page
  • As a user, I can edit my own username, full name, avatar, email, and password
  • As a user, I can sign out from the system

Admin

  • As an admin, I can view a list of all the notes in the system
  • As an admin, I can edit the information of all existing notes
  • As an admin, I can delete my own notes, and the notes of managers and employees, but I cannot delete the notes of other admins
  • As an admin, I can create new notes and assign them to myself, other admins, and any users
  • As an admin, I can view a list of all the users in the system
  • As an admin, I can create new users with username, avatar URL, password, and role (admin, manager, or employee)
  • As an admin, I can edit the information of all existing users
  • As an admin, I can delete all users from the system

Manager

  • As a manager, I can view a list of all the notes in the system except the notes of admins
  • As a manager, I can edit the information of all existing notes except the notes of admins
  • As a manager, I can delete my own notes, and the notes employees, but I cannot delete the notes of other managers. I cannot delete admins' notes
  • As a manager, I can create new notes and assign them to myself, other managers, and employees. I cannot assign notes to admins
  • As a manager, I can view a list of all the users in the system except admins

Employee

  • As an employee, I can view a list of the notes assigned to me
  • As an employee, I can edit the information of the notes currently assigned to me
  • As an employee, I can create new notes and assign them to myself or other employees. I cannot assign notes to admins or managers

(back to top)

Notable Features

  • Persistent login sessions for users
  • Users can switch between dark and light modes
  • Users can upload their own avatars from their computers (stored on Firebase)
  • If users forgot their password, they can click "Forgot Password" and receive a password reset email with a reset token
  • Whenever a user's account information or notes get updated, the app will send them a notification email
  • Admins can search for users by their name or role
  • Admins can choose to hide inactive users
  • Users can search for notes by ticket number, title, or user's name
  • Users can choose to hide completed notes
  • Debounced search input

(back to top)

Built With

  • React
  • React Router
  • Redux
  • Material UI
  • NodeJS
  • Express
  • MongoDB
  • JWT
  • ESLint
  • Prettier
  • Stylelint

(back to top)


API Endpoints

Auth APIs

/**
 * @route POST /auth
 * @description Log in with username and password
 * @body {username, passsword}
 * @access Public
 */
/**
 * @route POST /auth/register
 * @description Register new user (for demo purposes only)
 * @body {username, fullname, email, password, role}
 * @access Public
 */

(back to top)

User APIs

/**
 * @route GET /users
 * @description Get users with search query, filter, and paginations
 * @query {page, limit, fullname, role, active}
 * @access Private - only for Admins
 */
/**
 * @route GET /users/all
 * @description Get all users
 * @access Private - only for Admins
 */
/**
 * @route GET /users/:id
 * @description Get a single user by their id
 * @params {id}
 * @access Private - only for Admins
 */
/**
 * @route POST /users
 * @description Create a new user
 * @body {username, fullname, email, password, role}
 * @access Private - only for Admins
 */
/**
 * @route PATCH /users/:id
 * @description Update an existing user
 * @body {id, username, fullname, email, role, active}
 * @access Private - only for Admins
 */
/**
 * @route DELETE /users/:id
 * @description Soft delete an existing user
 * @params {id}
 * @access Private - only for Admins
 */

(back to top)

Account APIs

/**
 * @route GET /account/:id
 * @description Get the currently logged-in user's account by their id
 * @params {id}
 * @access Private - for all users
 */
/**
 * @route PATCH /account/:id
 * @description Update the currently logged-in user's account settings
 * @body {id, username, email, password}
 * @access Private - for all users
 */
/**
 * @route PUT /account/:id
 * @description Update the currently logged-in user's profile
 * @body {id, fullname, avatarUrl}
 * @access Private - for all users
 */

(back to top)

Note APIs

/**
 * @route GET /notes/all
 * @description Get all notes
 * @access Private - for all users
 */
/**
 * @route GET /notes/
 * @description Get notes with search query, filter, and paginations
 * @query {page, limit, ticket, title, status}
 * @access Private - for all users
 */
/**
 * @route GET /notes/:id
 * @description Get a single note by its id
 * @params {id}
 * @access Private - for all users
 */
/**
 * @route POST /notes
 * @description Create a new note
 * @body {user, title, text, status}
 * @access Private - for all users
 */
/**
 * @route PATCH /notes/:id
 * @description Update an existing note
 * @body {id, user, title, text, status}
 * @access Private - for all users
 */
/**
 * @route DELETE /notes/:id
 * @description Soft delete an existing note
 * @params {id}
 * @access Private - only for Admins and Managers
 */

(back to top)


Entity Relationship Diagram

Meganote ERD

(back to top)


Getting Started

Prerequisites

  1. Check your version of Node.js and npm
    node -v
    npm -v
  2. Install Node.js and npm if needed at https://nodejs.org/en/download

(back to top)

Installation

Backend

  1. Clone the repo
    git clone https://github.com/hoanglechau/meganote-be-v2.git
    cd meganote-be-v2
  2. Install NPM packages
    npm install
  3. Create an .env file with the following contents
    MONGO_URI = your_mongodb_uri
    PORT = your_preferred_port // default: 5000
    NODE_ENV = development
    ACCESS_TOKEN_SECRET = your_access_token_secret
    REFRESH_TOKEN_SECRET = your_refresh_token_secret
    EMAIL_SERVICE=your_email_service
    EMAIL_USERNAME=your_email_username
    EMAIL_PASSWORD=your_email_password
    EMAIL_FROM=your_email_address
    FRONTEND_URL=https://meganote-fe-v4.vercel.app
  4. Generate two different secret keys for ACCESS_TOKEN_SECRET and REFRESH_TOKEN_SECRET using the built-in crypto module of node
    node
    require('crypto').randomBytes(64).toString('hex')
  5. Replace the default values with your own values for PORT (optional), MONGO_URI, ACCESS_TOKEN_SECRET, REFRESH_TOKEN_SECRET, EMAIL_SERVICE, EMAIL_USERNAME, EMAIL_PASSWORD, EMAIL_FROM in the .env file
  6. Start the server
    npm start

Frontend

  1. Clone the repo
    git clone https://github.com/hoanglechau/meganote-fe-v4.git
    cd meganote-fe-v4
  2. Install NPM packages
    npm install
  3. Create an .env file with the following contents
    VITE_NODE_ENV = development;
    VITE_API_URL = your_api_url; // default: http://localhost:5000
    VITE_FIREBASE_API_KEY = your_firebase_api_key;
  4. Replace the value of VITE_FIREBASE_API_KEY with your own Firebase API Key. Optional: Replace the value of VITE_API_URL with the URL of your deployed API
  5. Build the app
    npm run build
  6. Run the app
    npm run dev

(back to top)

About

Meganote is a full-stack task management app built with React, Redux, Material UI, Node.js, Express, and MongoDB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages