Skip to content

Repository files navigation

Coindashboard-frontend

ReactJS based web UI for Coindashboard SIP project.

Setup environment

Node.js

Install Node.js from official website, choose version 16.16.0LTS, install using defaults.

Verify using command:

> node -v
v16.16.0

Clone the repository

> git clone [--branch <branch-name>] https://github.com/CuttingEdgeCommunity/coindashboard-frontend

Install dependencies

> cd coindashboard-frontend
> npm install

run The local JSON server and the react Application

> cd coindashboard-frontend
> npm run start

run The react Application in production

> cd coindashboard-frontend
> npm run start:prod

run E2E Cypress Tests within a Browser interface

> cd coindashboard-frontend
> npm run test:browser

run E2E Cypress Tests within a CLI

> cd coindashboard-frontend
> npm run test

Editor setup (VS Code)

Download extensions:

  • Tailwind CSS IntelliSense
  • Tailwind Docs

In order to get tailwind specific autocomplete, do not use tab or enter completion before list of tailwind classes suggestions pops up

Not working:

(See the light highlight - you do not want this)

not working

Working:

working

Emmet code generation

Emmet allows to generate markups using css selector like syntax. To set it up, You need to include following settings to your editor's settings.json file. To acces it go to: CTRL+SHIFT+P > Open Settings (JSON)

{
  "tailwindCSS.emmetCompletions": true,
  "emmet.includeLanguages": { "javascript": "javascriptreact" }
}

To generate code specify an element, and chain classes using dot operator. You can chain multiple classes, as well as use quantity specifiers.

Once You finished, press TAB to generate.

emmet_source

Result:

emmet_outcome

Automatic tailwind classes sorting

Install Headwind VS Code plugin and formatting will occur automaticly on file save.

Technologies

  • Node.js
  • React
  • Tailwind CSS
  • TODO: add other technologies as needed (eg. test frameworks, ui kits)

About Tailwind CSS

Resources

Warning do not use "tailwindui" as it's not free!

Example UI Kits

How to use components

When adding new component or library, add it to the used technologies section with it's license (again, it should be MIT). License often can be found on Github repo or in footer/header/about sections of project's website.

HTML

First, convert HTML to JSX. You can use a online converter, for exampe Click or use "Html to JSX" VS Code plugin. Then create new file for the component and wrap it into class or function like you would do with your own HTML. For additional safety you can wrap the whole code in <> ... </> if there isn't one root element in the kit's code. Do not paste it in inside long markup as it would drastically reduce code readibility. Always create new component in a separate file.

React

As components are already created, you only need to add the library to dependencies using npm install command. Sometimes you will need add a plugin in the tailwind.config.js file. Always follow specific documentation. Examples: HeadlessUI and Flowbite-react.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages