@spaceandtimelabs/dapp-mi-space-time
v0.0.1
Published
This project was bootstrapped with [Create Vite App](https://github.com/vitejs/vite-plugin-react).
Readme
This project was bootstrapped with Create Vite App.
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, Yarn and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.
$ npm -v && node -v && yarn -v
7.24.0
v16.10.0
1.22.22Table of contents
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
Start with cloning this repo on your local machine:
$ git clone https://github.com/spaceandtimelabs/dapp.git
$ cd dappTo install all dependency and set up the application, run:
$ yarn installMake a copy of the .env.staging file to .env
Usage
Obs: you can use both yarn or npm on these steps
Serving the app
$ npm startApp 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
$ npm run buildThis task will create a distribution version of the project
inside your local build/ folder
Serving the distribution version
$ npm run serveThis will use lite-server for serving your already
generated distribution version of the project.
Note this requires 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.
