An open API service indexing awesome lists of open source software.

https://github.com/thelicato/bff-types

A generic template to provide types to both BE and FE (Best Friends Forever)
https://github.com/thelicato/bff-types

bff node types typescript

Last synced: 3 months ago
JSON representation

A generic template to provide types to both BE and FE (Best Friends Forever)

Awesome Lists containing this project

README

          

# BFF types


BFF types

## Table of Contents
- [🛸 Motivation](#-overview)
- [👾 Usage](#-usage)
- [🪪 License](#-license)

## 🛸 Motivation


schema

The motivation is simple: when working on a **Typescript** project usually we have common types shared between different projects (e.g. *backend* and *frontend*). What happens is that when something changes in one of the projects it becomes painful and time-consuming to find the source of the problem. ``bff-types`` is a simple template that you can **customize** and install into your projects to have everything aligned. For example I always like to work using the **monorepo** approach and my folder structure is the following:

```
.
├── backend
├── frontend
└── bff-types
```

## 👾 Usage
The usage is very simple. You just need to:
1. Clone the repo
2. Change the info in the ``package.json`` (like *name*, *description*, *version* and so on)
3. Remove unnecessary files (you may also use the ``yarn clean`` command)
4. Customize the ``index.d.ts`` with your own types
5. Install it in your projects!

To install a local package (using the directory structure presented before) you just need to run:
```
yarn add ../bff-types
```

Of course you need to **reinstall it** in your project every time there you make an update.

## 🪪 License
**BFF types** is an open-source and free software released under the [MIT License](https://github.com/thelicato/bff-types/blob/main/LICENSE).