Giter Site home page Giter Site logo

chewtoys / daily-gateway Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 26.0 2.63 MB

API gateway service responsible also for authentication and user management

License: GNU Affero General Public License v3.0

JavaScript 97.80% Dockerfile 0.15% TypeScript 1.53% Shell 0.53%

daily-gateway's Introduction

Daily Gateway

API gateway service also for authentication and user management

Build Status License StackShare

The core concept of this service was to serve a gateway to all the incoming traffic. As the traffic grew the service introduced some performance spikes so I decided to distribute the traffic through the main load balancer. Now, this service is focused on user management. Registration, login, logout, referrals, and other user oriented functionality.

Stack

  • Node v16.15.0 (a .nvmrc is presented for nvm users).
  • Yarn for managing dependencies.
  • Koa as the web framework
  • MySQL and knex as a database layer

Project structure

  • test - There you can find all the tests and fixtures. Tests are written using mocha.
  • helm - The home of the service helm chart for easily deploying it to kubernetes.
  • seeds - JSON files with seed data for local development.
  • migrations - Knex migrations folder.
  • src - This is obviously the place where you can find the source files.
    • middlewares - Custom Koa middlewares.
    • models - Database layer functions split by entity type.
    • routes - Koa endpoints.
    • scripts - Utility scripts for administration tasks.
    • workers - Pub/Sub message handlers.

Local environment

Daily Gateway requires a running instance of MySQL.

Make sure to apply the latest migrations by running: yarn db:migrate:latest

Check out the config.js file to see the environment variables list. Some of the variables have a default value preconfigured.

Finally run yarn watch to run the service and listen to port 4000.

Want to Help?

So you want to contribute to Daily Gateway and make an impact, we are glad to hear it. ๐Ÿ˜

Before you proceed we have a few guidelines for contribution that will make everything much easier. We would appreciate if you dedicate the time and read them carefully: https://github.com/dailydotdev/.github/blob/master/CONTRIBUTING.md

daily-gateway's People

Contributors

ageblade avatar budhirajamadhav avatar dependabot-preview[bot] avatar dependabot[bot] avatar idoshamun avatar ombratteng avatar rebelchris avatar sshanzel avatar vpol avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.