Giter Site home page Giter Site logo

dashboard-material-nextjs-ts's Introduction

dashboard-material-nextjs-ts

A minimal dashboard with taskbar and mini variant draw. The chart is courtesy of Recharts, but it is simple to substitute an alternative.

Tech Stack

Project Structure

This branch has an express server that serves the dashboard data and the static web application once it's built. The source for the entire application (Server/Client) is in the ./src folder and is written to the ./build folder during build.

The project source is organized as follows:

  • ./pages contains the required react app base files
  • ./pages/app contains the react app dashboard code
  • ./pages/api source for the api server
  • ./pages/structs contains the shared data structures used by the client and server

Getting started

Install dependencies

> npm install

To run the application in development mode with live rebuild and reload

> npm run dev

Bootstrapped

The following steps were used to bootstrap the project

> npm init -y
> npm install --save react react-dom next lodash @material-ui/core @material-ui/icons recharts
> npm i -D typescript tslint tslint-react @types/lodash @types/react @types/react-dom @types/recharts @types/node
> mkdir pages

Then open the package.json file and replace scripts with the following:

"scripts": {
  "dev": "next",
  "build": "next build",
  "start": "next start"
}

Configuring tslint

Initialize tslint config file

> ./node_modules/.bin/tslint --init

by replacing the extends block of tslint.json

    "extends": [
        "tslint:recommended",
        "tslint:react"
    ],

We'll also need a page to render, let's create pages/index.tsx with the following content:

const Home = () => <h1>Hello world!</h1>;

export default Home;

Now everything is ready. Run the following command to start the dev server:

npm run dev

dashboard-material-nextjs-ts's People

Contributors

nnance avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.