npm package: @spaceandtimelabs/dapp-mi-space-time
Description: This project was bootstrapped with [Create Vite App](https://github.com/vitejs/vite-plugin-react).
Latest version: 0.0.1

This project was bootstrapped with [Create Vite App](https://github.com/vitejs/vite-plugin-react).

# Dapp-Space&Time

> Dapp is a decentralized analytics application for a radically futuristic interface for querying data.The user will have a new way to visually explore data sources and manage activity on the platform. It will enable users to quickly visualize results, set up new dashboards,and manage their systems.

## Prerequisites

This project requires NodeJS (version 16 or later), YARN (version 1.22 or later) and NPM.
[Node](http://nodejs.org/), [Yarn](https://classic.yarnpkg.com/en/) and [NPM](https://npmjs.org/) are really easy to install.
To make sure you have them available on your machine,
try running the following command.

```sh
$ npm -v && node -v && yarn -v
7.24.0
v16.10.0
1.22.22
```

## Table of contents

- [Project Name](#project-name)
  - [Prerequisites](#prerequisites)
  - [Table of contents](#table-of-contents)
  - [Getting Started](#getting-started)
  - [Installation](#installation)
  - [Usage](#usage)
    - [Serving the app](#serving-the-app)
    - [Running the tests](#running-the-tests)
    - [Building a distribution version](#building-a-distribution-version)
    - [Serving the distribution version](#serving-the-distribution-version)
  - [Folder Structure](#folder-structure)


## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

## Installation

**BEFORE YOU INSTALL:** please read the [prerequisites](#prerequisites)

Start with cloning this repo on your local machine:

```sh
$ git clone https://github.com/spaceandtimelabs/dapp.git
$ cd dapp
```

To install all dependency and set up the application, run:

```sh
$ yarn install
```

Make a copy of the `.env.staging` file to `.env`

## Usage
_Obs: you can use both `yarn` or `npm` on these steps_

### Serving the app

```sh
$ npm start
```

App will be available on http://localhost:5173/.

_Obs: when you access `/` it might still be a placeholder. Navigate on the right nav bar to go to working screens e.g. `/queries/new`_

_Obs: After you finish all your code changes, run `yarn tsc` to verify that when merging your PR the build CI will succeed (it will save you from needing to rework in case the build fails)._

### Building a distribution version

```sh
$ npm run build
```

This task will create a distribution version of the project
inside your local `build/` folder

### Serving the distribution version

```sh
$ npm run serve
```

This will use `lite-server` for serving your already
generated distribution version of the project.

*Note* this requires
[Building a distribution version](#building-a-distribution-version) first.

## Folder Structure

## src
The src folder contains various sub folders that are important in maintaining the good understandable code structure:

### assets
The assets folder further consist of images folder that is required to put images and other assets to be accessed within src.

### common
The common folder consist of the components that common for all other components and are frequently used, like header, footer and a common layout.

### constants
The constant folders has the file that consist logically grouped constants like static text and urls used in the app.

### stores
The stores folder consist of the app's core module like charts, dashboard, query, contract-utility etc... actions and its store.

### stories
The stories folder is created when we use storybook library, it contains all the story components which are generic and reusable.

### utilities
The utils folder consist of all the utility part of app that we would need frequently in different parts of app like it has history.ts utils that we might need to route logically between views,helper.ts that is collection of all helper functions required in application,chart.ts to provide all necessary helper functions related to charts.

### .env
This is the file where we write all our environment variables like the api base url and other keys.

### .gitignore
This is the file where we mention the files and folder to be ignored by our versioning tool like git.

### package.json
The package.json is used to store the metadata associated with the project as well as to store the list of dependency packages.