Git Product home page Git Product logo

nick121212 / nestjs-bff Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ablestack/nestjs-bff

0.0 1.0 0.0 31.38 MB

A full-stack TypeScript solution, and starter project. Includes an API, CLI, and example client webapp. Features include production grade logging, authorization, authentication, MongoDB migrations, and end-to-end testing.

License: MIT License

TypeScript 99.80% JavaScript 0.20%

nestjs-bff's Introduction

Nestjs-BFF

Overview     Frontend     Backend     CLI     DevOps

Overview

NestJS-BFF is a full-stack TypeScript solution, and starter project. It is intended for developers who are looking to fast-track building a strongly typed, enterprise-grade, modern NodeJs application, with supporting tooling.

This implementation uses the BFF pattern, leveraging NestJS as the primary framework for the backend. The frontend example is in Angular, although any client-side Javascript framework can easily be used, including React, or Vue js.

Contents

This is a Mono-repo project containing a Backend, companion CLI, Frontend, and companion NPM packages. Follow the README navigation links for details on each of these. The core infrastructure is contained in NPM packages, so that projects build using this boilerplate can easily benefit from future updates though a simple NPM update command.

Installation & Usage

See the DevOps documentation and folder for instructions and scripts to install, run, and maintain nestjs-bff applications

Key Features

  • Strongly Typed backend, leveraging the power of TypeScript, NestJS and Express
  • DDD style layered architecture with Application Services and composable Domain objects
  • Comprehensive authentication and authorization system in-the-box
  • JWT Authentication for robust and flexible security
  • Social Login with Facebook (complete), Google, and Twitter (under development), using the more secure Authorization Code Grant flow
  • Secured-by-default with 'allow list' approach
  • Flexible Caching leveraging the powerful cache-manager library
  • Repository Pattern in-the-box for simple data-access
  • MongoDB Migrations for easy database seeding and management
  • Winston and Console Logger Service in-the-box
  • Configuration pattern simple and strongly types
  • e2e Testing pattern leveraging Jest

Structure

  • Frontend Frontend Layer example, built with Angular
  • Global Global Layer layer that can be shared between the backend and the frontend
  • Backend Hosting Layer for exposing Application and Domain Services over a multiple transports
  • Backend Application Services Layer for composing Domain Services
  • Backend Domain Services Layer for encapsulating core domain logic
  • Backend Infrastructure Layer packages, for building and supporting the layered architecture

Architecture Overview

NestJS-BFF Architecture Overview

Developer Benefits

There are a number of benefits that make NestJs and Angular a very compelling web development stack:

  • Core technologies NestJS and Angular are both versatile and highly compatible frameworks, that provide a great developer experience
  • Consistent technology and development patterns for both frontend and backend development
    • Results in significant increase in development efficiency
    • TypeScript language for both the backend and frontend
    • Strongly type on both the backend and frontend
    • Leverages the Node JavaScript framework for both backend and frontend development
    • Incredibly similar architecture and design patterns
  • Backend framework can be leveraged for other execution contexts, including CLI (example included) or even Desktop
  • Leverages fully open source technology
  • Hosting options are broad, and flexible, with multiple value-options, and broad native cloud hosting support (including Heroku)

Background

NestJS is a fantastic project, and a pleasure to develop with. However, it is a framework by design, and not a complete production-ready web-application solution. Features such as logging, configuration management, data-base migrations, and even authentication need to be learned, assembled, and configured before they can be used.

This project aims to provide an enterprise-ready web-application skeleton, out-of-the-box, and built on top of the nest-js framework.

Notes

  • The Backend can run independently from the CLI
  • The CLI requires the Backend to compile and run
  • The Frontend can run independently, but requires the Backend to be running to complete requests, including for authentication

Contributions

Contributions are not only welcome, but encouraged. Please help make this better! See the Contributions Guide for details.

Attributions

See the Attributions section.

Readme Navigation

Further details on each of the systems contained in this project can be found via the following links:

nestjs-bff's People

Contributors

jamshally avatar

Watchers

 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.