Giter Site home page Giter Site logo

brianhague_dev_be's Introduction

Hi there ๐Ÿ‘‹, my name is Brian Hague

I am a full stack senior developer at Nexient

You will find something for everyone here, I have quite a few repos with example code, and solutions for common issues.

Skills: Node / React / Vue / Express / JS / HTML / CSS

  • ๐Ÿ”ญ Iโ€™m currently working on Car-Control in my spare time
  • ๐ŸŒฑ Iโ€™m currently learning Vue and Vuex
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on controling automotive electrical systems via REST APIs
  • ๐Ÿ’ฌ Ask me about React or Express
  • ๐Ÿ“ซ How to reach me: [email protected]
  • ๐Ÿ˜„ Pronouns: He/Him/Hey You
  • โšก Fun fact: I have built my own 8 bit sound card for an XT class IBM compatible, and can network stream movies at over 30FPS on CGA's 480x200 2 bit mode

github linkedin YouTube website

trophy

GitHub stats

Top Langs

Profile views

brianhague_dev_be's People

Contributors

alphaseinor avatar dependabot[bot] avatar

Watchers

 avatar  avatar

Forkers

chukalicious

brianhague_dev_be's Issues

Make admin route

/api/admin

ideas for this:
all crud operations on all users.
make sure at least one user is admin before deleting or changing an admin
should be able to allow single field edits

add nodemailer and make registration send email

add nodemailer

when user registers, send message with confirmation code
update documentation with .env and environment variables
make env for front end confirmation link
make env for email and server for sending email

add knex for users

Users should have the following fields:
id - auto generated by
username - text field, normalize to lower case, no special characters - required
email - text field, validated via regex - required
password - text field, minimum of 8 characters - required
is_confirmed - after email confirmation this will be set to true
confirmation_num - This will be a UUID that is set to /api/confirmation/$id and will be sent via get request in the body, checks confirmation is false, must match. example front end will have brianhague.dev/confirmation/uuid_number send the param to the back end. then sets confirmed to true
is_active - deleted or not - defaults to true
is_twofactor - defaults to false
twofactor_num - not used until two factor is figured out
twofactor_type - not used until two factor is figured out
phone - not required, used in two factor auth
is_admin - defaults to false - unless this is the first user in the database, then it will be changed to true automatically.

need base server

just have a root endpoint

update dotenv

documentation for dotenv and installing project in readme.md file.

make endpoints for login and register with jwt and bcrypt

/api/users/login

Front end should only have access to the following fields to login.
username - text field, normalize to lower case, no special characters - required min 2 characters max 50 characters
password - text field, minimum of 8 characters - required max 255 characters

returns

{token:"jwt"}

jwt will decode to

id:"string",
is_confirmed: boolean,
twofactor_type: "string",
username:"string",
email: "string",
is_active: boolean

/api/users/register

Front end should only have access to the following fields to register.
username - text field, normalize to lower case, no special characters - required min 2 characters max 50 characters
email - text field, validated via regex - required max 255 characters
password - text field, minimum of 8 characters - required max 255 characters

returns

{token:"jwt"}

jwt will decode to

id:"string",
is_confirmed: boolean,
twofactor_type: "string",
username:"string",
email: "string",
is_active: boolean

on register only

id - auto generated by db

is_confirmed - after email confirmation this will be set to true, default to false
confirmation_num - This will be a UUID that is set to /api/confirmation/$id in future releases

is_active - deleted or not - defaults to true, freezes any crud operations

is_twofactor - defaults to false

twofactor_num - not used until two factor is figured out v4 UUID

twofactor_type - not used until two factor is figured out. empty string, will be email or phone

phone - not required, used in two factor auth. empty string

is_admin - defaults to false - unless this is the first user in the database, then it will be changed to true automatically.

dependencies for backend

Need dependencies for backend

{
  "name": "backend-recipe",
  "version": "1.0.0",
  "description": "",
  "apidoc": {
    "name": "recipe-be",
    "version": "1.0.0",
    "description": "Back end for recipe app",
    "title": "Recipes",
    "url": "https://sfr-backend.herokuapp.com"
  },
  "main": "index.js",
  "scripts": {
    "start": "node index.js",
    "server": "nodemon index.js",
    "doc": "apidoc -i apidocs -o apidoc-out && apidoc-markdown -p apidoc-out -o README.md && rm -rf apidoc-out"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/alphaseinor/backend-recipe.git"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/alphaseinor/backend-recipe/issues"
  },
  "homepage": "https://github.com/alphaseinor/backend-recipe#readme",
  "dependencies": {
    "bcryptjs": "^2.4.3",
    "cors": "^2.8.5",
    "dotenv": "^8.2.0",
    "express": "^4.17.1",
    "helmet": "^3.23.2",
    "jsonwebtoken": "^8.5.1",
    "knex": "^0.21.1",
    "pg": "^7.12.1"
  },
  "devDependencies": {
    "nodemon": "^2.0.4"
  }
}

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.