Skip to content

Latest commit

 

History

History
63 lines (48 loc) · 1.02 KB

README.md

File metadata and controls

63 lines (48 loc) · 1.02 KB

Node OAuth JWT

Simple project implementing OAuth 2.0 and JWT.

Schema

User {
  id: bigint, primary key, auto increment
  email: int, key
  name: varchar
  auth_provider: varchar
  password: varchar, nullable
}

Role {
  id: bigint, primary key, auto increment
  name: varchar, key
  description: varchar
}

UserRole {
  user_id: bigint, foreign key(User), primary key
  role_id: bigint, foreign key(Role), primary key
}

Mantra {
  id: bigint,
  message: string,
  user_id: bigint, foreign key(User)
}

Flow

  1. Anyone who visits is a visiter
  2. A visitor can register via google, twitter or email to become a user
  3. Some users are admin
  4. A user can create, update and delete their mantra
  5. A user can view mantras of all other users
  6. An admin can delete any users mantra
  7. An admin can make another user admin

TODO

  • Logging
  • Unit Testing

Features

Frontend

  • Typescript
  • NextJs

Backend

  • Typescript
  • JWT
  • OAuth 2.0
  • joi
  • Jest Unit Testing
  • Sequelize