Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

90 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

TextileFactory

Finally, the factory has a user management system.

Architecture and Datbase:

  • Included Modularity for RBAC - direction of role change as well as making sure the CEO is the actor who changes the roles (can be easily changed if we decide to add VP or COO), front end has conditional rendering for routes with shared user ranks, and for the access to those routes to begin with. with the addition of a pre-render check for role.
    • User roles are stored as an integer, to allow for future ranks to be added and make it so if we deviate from CEO being the only one who can commit most actions - they are also stored as an ENUM to allow for better logs, code readabilty and front end communication (althought at this point, I chose to replicate the enum on the FE)
  • Users are attached to managing users on many to one, one way connection. they are loaded based on a query for all users with the manager's id in the managing user field - which is indexed
  • indexed manager_id, user_id, and username since they will be called often.
  • added test ENV to allow for testing on an altenate DB
  • pagination (not yet impleneted on the front end)

Security:

  • Assume client (or all incoming api calls) are malicious

  • Prevent timing attacks - though this isn't as important considering signup notifies if the user exists.

  • Hash password asap and make sure the real password only ever shows up on server RAM

  • Impleneted rate limiting for fast api package, since fastapi ratelimiter requires redis.

  • -TO RUN Backend- when in server/src 'poetry run uvicorn main:app' (add --reload tag if developing), make sure to fill ENV with server details and relveant keys. Client - pnpm run dev - no production build tested yet. Seed the DB using seed.py

    • FOR TESTS Make sure test ENV is set to true, and that test DB name is also filled.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages