Skip to content

Project Structure

Vasileios Drosatos edited this page Sep 6, 2021 · 6 revisions

This section outlines the structure of the Forest Restoration project.

The repository is structured as a Monorepo, i.e., it contains multiple projects that are combined in a single code repository. In order to facilitate it, we rely on specific external packages: Lerna and Yarn Workspaces

Following, we briefly discuss the configuration files of this Monorepo project.

lerna.json

This file contains the configurations for the Lerna tool. Note that, the npmClient is defined as “yarn” in order to enable the use of Yarn Workspaces.

package.json

This is the root package.json that contains the project dependencies, scripts, and configurations that apply for every other package. Also, we define the workspaces (same as packages in lerna.json) as

"workspaces": [ "packages/*" ],

packages/

This folder contains every different project that is part of the Monorepo. The root package.json dependencies will be included in every different package and each package must contain its own package.json

packages/firebase

This folder contains firebase-related files. Firebase is our backend service. The authentication, database (Cloud Firestore) rules, etc. are located here.

packages/pwa

The main web application that it is deployed in (https://forestrestore.app, https://forestrestoration.gr, https://αποκατάστασηδασών.ελ)

It uses Next.JS, TailwindCSS and it is deployed using Vercel and Github Actions

packages/shared

This package includes everything that can be shared to other packages. A very good example is the UI library that should be used by other packages too.

You can find the code of this UI Library in packages/shared/ui

It utilizes the React.jS, TailwindCSS, HeadlessUI technologies

packages/ui

This package includes the documentation of the UI library using Storybook. It is located in (https://ui.forestrestore.app/)

It is deployed using Vercel ang Github Actions