Skip to content

Backend Repo - A simple application for saving and sharing our notes with cloud implementation.

License

Notifications You must be signed in to change notification settings

vivinprabhu/NoteX-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

  • This project is developed using the frontend of ReactJS, backend of NodeJS, middleware of ExpressJs and for database MongoDB.
  • This project helps to take your notes and save it on the cloud and access at anytime anywhere with your credentials.
  • Passwords are stored in encrypted format in MongoDB database
  • CRUD operations will be performed only with the JSON web token (Stateless session management).
  • The token will be stored in httpOnly cookie for security purposes inorder to avoid XSS attacks.

    Resources Used

  • MongoDB Atlas
  • ExpressJS
  • ReactJS
  • NodeJS
  • npm (Node Package Manager)
  • Backend

  • Storing JWT in httpOnly cookie ensures security.
  • Facilitated two distinct roles with role-based permissions.
  • Implemented relational mapping between collections.
  • To run the project

  • Make a git clone or fork the project to the local system.
  • Navigate to the project location and open the terminal and type the following command.
  • npm start

    Add .env file

    PORT = [your_port_number]
    
    DB = [mongoDB_link]
    
    JWTPRIVATEKEY = []your_key] eg.Vivin#2004
    
    SALT = [number] eg.14

    Sample screenshots

    Screenshot 2024-05-08 113437

    Screenshot 2024-05-08 113739

    Screenshot 2024-05-08 113148

    Hosting issues

  • Hosted in render website with minimal resources. So somestimes website will be slow. But when you run locally it will work faster you expect.
  • Can't able to make the httpOnly cookie sameSite:'strict' or 'lax'. If strict CRUD operations are not performing and while with lax the cookie may disappear while refreshing.
  • So while run this project loaclly make sure your cookie property change to sameSite: 'strict' from sameSite: 'none'.


  • If anyone knows the solution for the above mentioned issues mail me at [email protected]

    About

    Backend Repo - A simple application for saving and sharing our notes with cloud implementation.

    Topics

    Resources

    License

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published