Coder Social home page Coder Social logo

nextjs-auth's Introduction

Getting Started

  • First understand the project directory structure. All the api logic and front end logic will go inside the app folder.
  • Second make the user model. The models folder and the app folder will be on the same level.
  • Define the userSchema. Export the userSchema by checking if the connection is made for the first time or connection has already been made.
  • Make a config folder inside the src directory. It contains the dbConfig connection method. Export the function.
  • Make a utils folder inside the src directory. It contains the mailer.ts file.
  • Inside the mailer.ts file, make the sendEmail function defining the mailing logic.
  • Write the logic for Signup api and after adding the user to the DB, send the verification mail.
  • Write the logic of sending verification mail in the mailer.ts file.
  • Test the signup route using postman. Make a separate postman collection for your project.
  • Next make apis for other routes in the project - login, logout, verifyEmail, aboutme. Write the api logic in each file's route.tsx.
  • Test the routes
  • Make the front-end page for SignUp, VerifyEmail, Login and ProfilePage.
  • Inside the ProfilePage only handle the logout functionality.
  • Make the ProfilePage parameters page. [id] Dynamic Routes.
  • Make the middleware.ts for protected routes.
  • This completes the project but....
  • NEED TO CHECK THE PROJECT ONCE AGAIN.

nextjs-auth's People

Contributors

shadabiiitnr20 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.