Skip to content

eDonec/boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

logo

The Ultimate boilerplate

A Boilerplate for Microservices NodeJS Architecture

Note

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

πŸ“” Table of Contents

🌟 About the Project

πŸ“· Screenshots

screenshot

πŸ‘Ύ Tech Stack

Client
Server
MongoDB available Databases per microservice
DevOps

πŸ‘Ύ Available Microservices

Front end
Back end
Packages

🎯 Features (so far)

  • Eventing with Apache Kafka

  • Authentication

    • Role management
    • Token management
  • Forms

    • React hook form components
    • Raw form components

πŸ”‘ Environment Variables

To run this project, you will need to add the following environment variables to your .env file for every app

PORT

πŸ”‘ Environment Variables per project

CRA

PORT

express

PORT DATABASE_URI ACCESS_TOKEN_SECRET_KEY REFRESH_TOKEN_SECRET_KEY TOKEN_EXPIRES_IN REFRESH_TOKEN_EXPIRES_IN NUMBER_OF_AUTH_TRIALS KAFKA_BROKERS MICROSERVICE_NAME

Eventing

For eveventing this project uses the open source project Apache Kafka

For the client we use the one made by Confluent the co-authors of apache kafka Apache Kafka Node.js client

For each microservice a package under the packages/node/events folder is created that exposes a Producer class and a Consumer class.

Further details can be found at the README.md

πŸ› οΈ Getting Started

‼️ Prerequisites

This project uses Yarn as package manager and docker for development.

npm install --global yarn

βš™οΈ Installation

Install project with yarn

yarn

βš™οΈ Adding dependency to a project

Install project with yarn

yarn workspace <project-name> add [-D] <dependency>

πŸ”¬ Running global Tests

To run tests, run the following command

yarn test

πŸ”¬ Running project Tests

To run tests, run the following command

yarn workspace <project> test -watch

βš™οΈ Run Locally

Clone the project

Go to the project directory

Install dependencies

Start the docker containers

make compose-dev

Start the server

yarn start

πŸ“₯ Adding Package to app

To add a package to an app, please follow this guide.

🚩 Deployment and build

Follow this guide to build all apps in projects.

πŸ‘€ Usage

Work in progress...

🌍 Roadmap

Work in progress...

⚠️ License

All code in this repository is licensed under the MIT License.