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)
- Host: GitHub
- URL: https://github.com/thelicato/bff-types
- Owner: thelicato
- License: mit
- Created: 2022-09-29T09:24:23.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-29T10:31:56.000Z (about 3 years ago)
- Last Synced: 2025-07-20T00:44:52.440Z (3 months ago)
- Topics: bff, node, types, typescript
- Language: JavaScript
- Homepage:
- Size: 96.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BFF types
![]()
## Table of Contents
- [🛸 Motivation](#-overview)
- [👾 Usage](#-usage)
- [🪪 License](#-license)## 🛸 Motivation
![]()
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).