Coder Social home page Coder Social logo

easylauncher_assignment's Introduction

Easy Launcher Assignment

project-image

This README provides detailed instructions for setting up and using a full-stack application built with Node.js for the backend and React.js for the frontend. The application includes a RESTful API for managing 'Users' and 'Books' with a many-to-many relationship and a user interface for interacting with the API.

Project Screenshots:

image

image

๐Ÿ› ๏ธ Installation Steps:

1. Initialize a Node.js project:

mkdir easylauncher_assignment 
cd easylauncher_assignment 
mkdir server 
cd server 
npm init -y

4. Install necessary npm packages:

npm install express sequelize pg pg-hstore bcryptjs jsonwebtoken cors dotenv

5. Edit the config/config.json file to configure your database credentials.

6. Create models for 'Users' and 'Books':

7. Create a join table for the many-to-many relationship:

8. Update the associations in your models (models/user.js models/book.js and models/userBook.js).

9. Create RESTful API routes in app.js or separate route files for 'Users' and 'Books'.

10. Implement JWT-based authentication in your user routes.

11. Secure your REST API by verifying the JWT in subsequent requests using middleware.

12. Set up a React.js application

cd .. 
mkdir frontend 
cd frontend
npx create-react-app library_management 

14. Install necessary npm packages:

npm install axios react-router-dom

15. Develop the user interface components for managing users and books.

16. Implement forms for adding new users and books.

17. Create lists or tables to display existing users and books.

18. Implement authentication mechanisms using hooks or context to manage state and provide a secure way to authenticate API calls.

19. Implement JWT-based authentication on the backend by creating routes for user registration and login.

20. Upon successful authentication generate and return a JWT to the client.

21. Secure your REST API by creating middleware to verify the JWT on protected routes.

22. Start the backend server:

cd ..
cd backend
npm start

24. Start the frontend React application:

cd frontend
npm start

26. Access the application in your browser at http://localhost:3000.

27. Use the user interface to interact with the backend API and perform CRUD operations on users and books.

๐Ÿฐ Architecture Explanation :

The backend of this application is built using Node.js and Express. Sequelize is used as an ORM to interact with the MySQL or PostgreSQL database. The database schema consists of two main entities: 'Users' and 'Books' with a many-to-many relationship managed through a join table. The frontend of this application is built using React.js. Axios is used to make API calls to the backend server. The user interface includes forms for adding new users and books as well as lists or tables to display existing entries. Authentication mechanisms are implemented on the frontend to ensure that API calls are authenticated. JWT-based authentication is implemented on the backend to handle user registrations and logins. Tokens are generated upon successful authentication and are used to secure subsequent requests to protected routes.

๐Ÿ’ป Built with

Technologies used in the project:

  • Node.js
  • React.js
  • npm
  • jwt

easylauncher_assignment's People

Contributors

kushagrasaxena-13 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.