Giter Site home page Giter Site logo

tomit4 / auther Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 1.21 MB

Auther is a Proof Of Concept project off of which to scaffold any application needing JWT authentication.

Home Page: https://auther.online

License: BSD 3-Clause Clear License

HTML 0.14% Vue 18.52% CSS 0.14% TypeScript 80.31% Dockerfile 0.19% Shell 0.70%

auther's Introduction

๐Ÿ‘‹ Welcome Traveler!

My Name's Brian!

Full Stack Web Developer

I'm a total nerd when it comes to Coding, Programming, Web Development, and Linux! ๐Ÿง Whether it's designing the next sleek website using the classic HTML, CSS, and JavaScript, or looking for cool new ways to collaborate, I'm always staying busy while the passion to better myself burns on into the midnight hour! ๐Ÿ”ฅ

Interested in working together? Take a look at my projects below as well as my resume.

Current Projects
  • CityStats - A Backend API For Querying USA City & States Statistics
  • Auther - A Full Stack JWT Authentication Application
  • brianhayes.dev - My Website/Blog
  • dyetide - A Bash Script For Converting Color Codes In CSS Files
  • bgit - A Bash Script That Automates Basic Git Commands And Routines
  • upnup - A Bash Script That Generates FOSS LICENSES

My GitHub Stats

My GitHub Language Stats

auther's People

Contributors

tomit4 avatar

Watchers

 avatar

auther's Issues

Docker Todos

Currently, we're learning docker networking to implement this application in production. This is my first time doing this, so here are some notes regarding how to proceed. Once all are checked, we can resolve this issue:

TODO:

  • Spin up a basic postgresql image/container on a custom network that cannot reach
    out to the host network, but can be seen by our fastify server. Get it to
    populate/interact via our fastify server before continuing on.
  • Same thing with the redis image/container.
  • Spin up a basic nodejs image/container for our fastify server. This is our
    point of failure. It can talk to our postgresql container, our redis container,
    and exposes its endpoints for our vuejs/frontend server to see. Again, get
    the vuejs/frontend still running on our host to talk to it first (package
    the vuejs app for production and serve it on our local HOST via
    nginx first before continuing on). Postgresql docker container, Redis
    container, and fastify/nodejs container should all be on the same docker
    network, but only the fastifyjs/nodejs can talk to the vuejs/frontend
    (which should be on their own network???).
  • UPDATE: Got this working, but had to expose a backend port. No worries, we
    will just have to change .env vars and code on front end to accommodate for
    directly routing to ip address/port.
  • Additionally, we'll need to rewrite our multiple docker-compose.yml files
    into one so that we can easily spin them up and down using the
    docker-compose command. See this helpful link for more info. Additionally, it appears that on reboot of the machine, the docker containers don't start up in the same order, assigning random ip addresses and throwing our configurations off. we'll need to use the links or depends_on keywords in the .yml file to ensure they start up in order, see this stack overflow post.
  • Spin up another nodejs server that encampsulates our vuejs/frontend
    application that is served inside the container via nginx, and exposes a port to
    the host machine nginx server. It should be able to query the fastify
    server as well.

NOTES

Ok, learned a lot. Our docker instances should all spin up accordingly. We have
created a dockerify script we can use like so to spin up or down our
backend/frontend accordingly (from the root of our project directory).

# Spin up
doas ./dockerify -u
# Spin down
doas ./dockerify -d

Now, because https is not enabled, and fastify attempts to set a secure cookie,
the browser rejects this because it is not sent over https, and instead is
sent over the local http via docker. There are two solutions for local
development of this. Both involve using openssl to generate a self signed
certificate.

One solution is where we set the .pem cert directly in fastify's configuration directly. As the author goes on though, setting ssl certs and having node process them directly is computationally expensive and is better handled from NGINX.

Thusly:

  • Set up a dockerized nginx reverse proxy that utilizes a self signed ssl certificate in its configuration file as well as proxies out the fastify/nodejs server instead of running it directly from the docker container.

V2 Refactors/Feature Requests

V2_TODOS:

  • Refactor remaining utility functions into their own classes (will require
    rewriting of some unit tests)
  • Integrate basic CI/CD using GH actions and drone.yml
  • set up separate db table that keeps track of last 5 passwords for user and
    throws this 409 reply if new password is in table (i.e. newPassword cannot be
    the same as last 5 passwords)

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.