Code Monkey home page Code Monkey logo

proapplicant's Introduction

files

svgs -- public/images buttons, input fields, --- src/components (models)schemas -- src/models (owner, customer, admin, pro) signin, signup, notfound.jsx -- src/pages server routes -- src/server/server.js App routes -- src/routes.jsx

server.js has express routes and mongo connection

Admin Schema |-- To be sent : name, email, phnum, password, status |-- will be generated : admin_id (AD123456), customers - [PA12345, PA98765, other customers under this admin]

Customer Schema |-- To be sent : cust_name, email, password, Reference(who referred) , admin_name, phnum |-- will be generated : Unique Cust_id, Reference_id, add_to_referred_customers_list, add_to_admins_owning_list, Referred_by.

Owner Schema |-- {name, email, password, phnum}

pro Schema (included in Customers Schema) |--JoinedAt, prodays,expirydate

routes available - ------ POST -- /add-admin - send {name,email,phnum,status,password}
- returns : status

----- PUT(or POST) -- /update-admin - send - {just send whatever details needed to be updated}
- returns : status

----- POST -- /toggle-admin-status/:admin_id - send - {admin_id}
- returns : status

----- GET -- /available-admins - send a get request{} - returns all available admins (required for signup page)

----- POST -- /add- - send {cust_name, email, phnum, password, Reference, admin_name} - returns status

------ POST -- /login - send(email, password) --cookies will be handled in signin page.(Remember Status) - returns { userType: 'owner', username: owner.username } if matches with owner details and corresponding to admin and user else, Invalid credentials(401) if doesnt matches and internal server error if 500

------- POST -- /addNewTool - send {toolname} - added to all users with default values as empty. -returns status

-------POST -- /usersByTool/:toolName - send {toolname} - returns all users with a joining date.(all users will have all tools but no joining date unless admin adds. if joining date is available even without pro days left, it will be shown.)

-------POST -- /deleteUser/:custId - send {user_id} - returns status of user deletion

-------POST -- /editUser/:custId - send {user_id} - returns status of user deletion

proapplicant's People

Contributors

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