secular12 / joist Goto Github PK
View Code? Open in Web Editor NEWGraphQL Boilerplate
GraphQL Boilerplate
Requires #2
A way to sign-up/create a user
This would also create a token in the tokens db
requires use of bcrypt for encrypting passwords
schema & resolver set up
validations set up
IP address is not a useful way of telling if something is suspicious, especially due to mobile devices, remove IP addresses to basically rely on the user-agent rather than the IP address.
Add a tokens table migration. First, figure out what columns are required.
Create a scopes seeder starting with the following:
Initial dataloaders for users and roles
For role/permissions
columns:
module_id [reference to the modules table, is the namespace for the token]
scope_id [reference to the scopes table, is the namespace for the token]
action [string / int, action identifier provided by the module, unique in the scope of the module]
name [string, human readable name]
Primary Key: [module_id, action]
Add auth to the app config folder.
pass the config into the context, as a provider
First add jwtTokenExpiration and implement it into the login resolver
In the ContextModule take out the jwt.verify and place it into a provider
A table to represent the various types of modules for role/permission purposes.
Columns:
Add seeder for modules
Start with the following modules:
Create the roles schema, with name field and the resolver for roles.
Change roles and roles permissions seeders to set up seeder rather than testData
Requires being logged in
updatePassword
input of password and confirmPassword
delete/revoke refreshToken?
returns message that it was complete
Add permissions seeder as part of the set up seeding
Start with the following permissions
action: read, module: users, scope: all
action: create, module: permissions, scope: all
action: delete, module: permissions, scope: all
action: update, module: permissions, scope: all
action: read, module: permissions, scope: own
action: read, module: permissions, scope: all
action: create, module: roles, scope: all
action: delete, module: roles, scope: all
action: update, module: roles, scope: all
action: read, module: roles, scope: own
action: read, module: roles, scope: all
...scopes and modules are included as part of permissions since they go hand in hand
Add ability for a user to basically cancel new user verification and delete their account.
Requires issue #40
Apply admin role to admin id 1
Apply customer role to all other users
For roles/permissions
columns:
Use a unit testing library to test the api. Set up the initial unit tests to test the various endpoints and compositions.
Make a roles migration. With the following initial name column
Add role_id to the users table as a foreign key
Apply all 'all' scopes permissions to admin role and all 'own' to customer role
Requires #20
For roles/permissions
Columns:
PK: [role_id, module_id, action, scope]
Start with the following roles:
For role/permissions
Columns:
Perhaps it is GUI capable for, but usually with a disclaimer that adding a new permissions is intended for Dev access only as it should only appear as an option if it is actually in affect.
Could also be a separate GUI build.
Possibility is a permissions file that is scanned and added, modified, etc. to the database.
Could also have Scopes/Modules/Permissions "tables" as part of a flat file rather than DB tables.
pass iterator to help with iterated ids
forgotPassword
accepts uid
This should create a new token
with the same expiration time as other verification expiration
verifyForgotPassword
accepts token, password, and confirmPassword
Updates the password and deletes the token
login
deletes any forgot password token
Add cors middleware, and possibly config
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.