Code Monkey home page Code Monkey logo

usermanagement's Introduction

to start use npx tsc && npm start. in this we have used "nodemon": "^3.1.2" ----> for development "bcryptjs": "^2.4.3", "connect-mongo": "^5.1.0", "ejs": "^3.1.10", "express": "^4.19.2", "express-session": "^1.18.0", "method-override": "^3.0.0", "mongoose": "^8.4.1"

model only have username, password routes-> register, login, edit, delete, logout

features -> contains session feature, encrypted password.


added more fileds to the model added custom id field which needed extra model counter


used crypto for random no. use nodemailer --> to send email --> by using gmail --> settings-> app password --> generate forgot password and reset password option created. https://medium.com/@y.mehnati_49486/how-to-send-an-email-from-your-gmail-account-with-nodemailer-837bf09a7628


dotenv for .env files

PORT=3000 MONGODB_URI=mongodb+srv://:@freecluster.jsszj6p.mongodb.net/ EMAIL_USER=[email protected] EMAIL_PASS=*****(from appPassword setting in settings.accoung.google.com )


refactored the whole code routes( index, authRoutes, userRoutes) controllers (userController, authController) middleware( auth) config (database,mailer,session) app.js server.js


used winston to add the logging services.

reduced the console logs.


converted to typescript

publiced by localhost. npm install -g localtunnel npm run build npm start lt --port 3000

password is your ip address

google sso integrated

npm install passport passport-google-oauth20 npm install @types/passport @types/passport-google-oauth20

created passport.js for google oauth setup --> than created the routes and added logger service to it

NOTE: uri you will use should be fixed if it is changing than it will create trouble. i am using localtunnel -> everytime you restart --> you will get new url

so in this case you can use lt --port 3000 --subdomain mycustomsubdomain

this can give you atleast 3-4 restart the same uri.

also to make things run concurrently not in different terminals use

npm install concurrently.


member/user/admin role based system added automatic membership management. using node-cron.

used websoket to create chat one to one here admin to member only but its insecure since any one can play with the frontend and get all the messgae.


added the contactUs, all webpages, and google translate api


work need to do http --> https payment gateway (my own and phonepay integrate) donate ammount (custom money option) receipt logo redesign


usermanagement's People

Contributors

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