Code Monkey home page Code Monkey logo

nest-settings's Introduction

Nest Settings

Description

An implementation of Feature Flags using Nest framework, PostgreSQL, Redis and Vue.js.

Requirements

Installation - API

Navigate to API directory

$ cd api/
$ npm install

Run Docker-Compose to launch the Postgres, Redis & app containers

$ docker-compose up

Run migrations to provision your database schema

$ npm run build
$ npm run migrations

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Project goals

This project was created to explore Nest framework and create an application which can be applied in a production setting. It should demonstrate best-practice in creating fully-featured, testable APIs.

  • REST APIs with OpenApi support
  • Validate requests
  • Use ORM and Repository pattern
  • Database transactions
  • Support database migration
  • Shape responses to support JSend or similar
  • Apply CQRS patterns
  • Support caching
  • Test coverage at the right levels
  • API key Authentication and route guarding
  • Logging requests
  • Request serialization / transformation

So what is it then?

Settings is basically a persisted string dictionary where each key/value can represent an application setting. These settings can be anything from simple flags to urls or even serialized json strings.

Settings are typically stored in dedicated settings or configuration files or even environment variables. In this case we have chosen to store settings in a database so that they can be changed frequently.

This project will develop APIs to be able manage Settings.

So what are feature flags?

Feature flags is an important concept in software development allowing system behaviour to be changed without modifying the code.

Feature flags can be complex because system behaviour can change at the system level, or an a per user basis or for many other reasons.

In the context of this project, Feature flags is a subset of Settings which deals only with simple on/off flags or toggles.

This project aims to demonstrate the application of Feature flags covering typical use cases.

For further information see.

License

Nest and this source code is MIT licensed.

nest-settings's People

Contributors

k-ong avatar nad-au avatar

Watchers

 avatar  avatar

Forkers

k-ong

nest-settings's Issues

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.