Skip to content

Node.js + Prisma ORM REST API with SQLite featuring user authentication (login, register, change password/email, delete account). Users can create, edit, and delete titles with descriptions. A "same" section allows users to view the count of similar titles created and access emails of users with identical titles.

Notifications You must be signed in to change notification settings

diegoperea20/Nodejs-Prisma-ORM-and-React-vite-with-Login-create-Tasks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Nodejs Prisma ORM and React vite with Login create Tasks

Nodejs Prisma ORM REST API with sqlite where there is a login and register (you can change password and email, delete account) where each user can create titles and descriptions (you can edit and delete them) and in 'same' section the user can select the count of how many people have the same title he has created and see the emails of those people who have the same title.

Step1

First create an account where you must create a username, password ("Must include at least one number.", "Must include at least one lowercase letter,"Must include at least one lowercase letter.", "Must include at least one uppercase letter.", "Must include at least one uppercase letter.","Must include at least one uppercase letter.", "Must include at least one uppercase letter.", "Must include at least one uppercase letter.","Must include at least one special character.", "Must include at least one special character.", "Must include at least one special character.","The length of the password must be equal to or greater than 8 characters.","Must not contain blank spaces.") Confirm your password and enter an email address.

Step2

After entering the data correctly, click on the "Register" button.

Step3

In login enter your username and password, click on the "Login" button.

Step4

After logging in you will see the home screen where you will see your user name and registration id, in this section you can log out, change your password, delete your account (delete your account and tasks), and create a new task.

Step5

In change password you can change your password and email if required.

Step6

In task, you can create a title and a description of your choice, you can edit and delete it, and with the "home" button you go back to home and the "same" button to the same section.

Step7

Once you have created your task you can edit it with the "Edit" button where you will see the title and description, you only have to modify it by clicking on the "Update" button. If you don't want to make the modification click on the "Cancel Edit" button.

Step8

Step9

Step10

In this same section there are three buttons in which "Task" to return to Task, the button "Count People Same titile" once clicked counts how many users have the same title of the titles that the user has created in his account and these are shown in a table, the button "People Emails same title" once clicked shows the emails of the users that have the same title that the user has created in his account in a table form.

Step11

If there are no matching titles, a message will appear where it says: No title matches with other users.

Step12

But if there are the same titles, the table of the selected button appears, in this case "Count People Same title":

Step13

But if there are the same titles, the table of the selected button appears, in this case "People Emails same title":

Step14

Note

When using Prisma as a backend, the routes can overlap if they are the same, unlike the Flask backend.example

# in flask you can use the routes :
@app.route('/tasks/<id>/<user>')
@app.route('/tasks/countsames/<user>')
#but in Nodejs Prisma and Go you cannot use these routes, because if you use them they overlap and do not work, that is why you must modify them like this:
router.get("/tasks/:id/:user", async (req, res)...
#change one 
router.get('/tasksi/countsames/:user', async (req, res)...

Steps to implement it

Backend Prisma Options for do it:

npm install 
npm run dev

Fronted React Options for do it:

  1. Use Dockerfile or docker-compose.yml
  2. Download dependencies and libraries
#Download dependencies
 npm install 

 npm run dev 

#or download dependencies for yourself

#you can use the useRoutes function of the wouter library. Next I will show you how to configure and use wouter in a React application with Vite:

npm install wouter 


#const API_URL = import.meta.env.VITE_REACT_APP_API;
npm install dotenv

About

Node.js + Prisma ORM REST API with SQLite featuring user authentication (login, register, change password/email, delete account). Users can create, edit, and delete titles with descriptions. A "same" section allows users to view the count of similar titles created and access emails of users with identical titles.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages