Coder Social home page Coder Social logo

estevanmaito / windmill-dashboard-react Goto Github PK

View Code? Open in Web Editor NEW
953.0 11.0 212.0 1.79 MB

❄ A multi theme, completely accessible, ready for production dashboard.

Home Page: https://windmillui.com/dashboard-react

License: MIT License

JavaScript 97.72% HTML 2.21% CSS 0.07%
dashboard admin-panel admin-dashboard react react-router dark-theme tailwindcss windmill-dashboard

windmill-dashboard-react's Introduction

Windmill Dashboard React
Four 100 scores and PWA ready. Just connect your data.

🚀 See it live

This is not a template. This is a complete application, built on top of React, with all tiny details taken care of so you just need to bring the data to feed it.

Accessibility is a priority in my projects and I think it should be in yours too, so this was developed listening to real screen readers, focus traps and keyboard navigation are available everywhere.

📦 Features

  • 🦮 Throughly accessible (developed using screen readers)
  • 🌗 Dark theme enabled (load even different images based on theme)
  • 🧩 Multiple (custom) components
  • ⚡ Code splitting
  • Tailwind CSS
  • Windmill React UI
  • React Router
  • Heroicons
  • Chart.js
  • PWA delivering offline-first and app-like experience

📚 Docs

General components

Windmill Dashboard React is built on top of Windmill React UI. You will find the documentation for every small component there.

Routing

Routes in Windmill Dashboard are separated into two categories, sidebar (routes/sidebar.js) and general (routes/index.js).

Sidebar routes

These are the routes that will show in the sidebar. They expect three properties:

  • path: the destination;
  • name: the name to be shown;
  • icon: an icon to illustrate the item

Item that are used as dropdowns, like the Pages option, don't need a path, but expect a routes array of objects with path and name:

// sidebar.js
{
  path: '/app/tables',
  icon: 'TablesIcon',
  name: 'Tables',
},
{
  icon: 'PagesIcon', // <-- this is used as a submenu, so no path
  name: 'Pages',
  routes: [
    // submenu
    {
      path: '/login',
      name: 'Login', // <-- these don't have icons
    },
    {
      path: '/create-account',
      name: 'Create account',
    },

General (Router) routes

These are internal (private) routes. They will be rendered inside the app, using the default containers/Layout.

If you want to add a route to, let's say, a landing page, you should add it to the App's router (src/App.js, exactly like Login, CreateAccount and other pages are routed.

How to add a new page to router?

  1. Create your page inside src/pages, say MyPage.js;
  2. Add it to the global router (src/routes/index.js)
const MyPage = lazy(() => import('../pages/MyPage'))

Then add it to the routes array:

{
  path: '/my-page', // the url that will be added to /app/
  component: MyPage, // the page component you jsut imported
}
  1. If you want to make this page accessible from the sidebar, you have to options:
  • add it to the root routes array
{
  path: '/app/my-page', // /app + the url you added in routes/index.js
  icon: 'HomeIcon', // the component being exported from src/icons/index.js
  name: 'My Page', // name that appear in Sidebar
},
  • add it as an option under a dropdown
{
  icon: 'PagesIcon',
  name: 'Pages',
  routes: [
    // submenu
    {
      path: '/app/my-page',
      name: 'My Page',
    },

If you're asking where does this /app come from, it is from this line inside src/App.js, that renders the app:

<Route path="/app" component={Layout} />

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

windmill-dashboard-react's People

Contributors

estevanmaito avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

windmill-dashboard-react's Issues

Purge breaks build

windmill-dashboard-react version: 0.1.0-alpha.1

Relevant code or config:

The content of the required theme: windmill-react-ui defaultTheme

This projects tailwind.config.js

const windmillTheme = require('windmill-react-ui/defaultTheme')

module.exports = {
  purge: ['src/**/*.js', windmillTheme],

What you did:

npm run build

What happened:

TypeError: Cannot read property 'match' of undefined
    at defaultExtractor (D:\windmill-dashboard-react\node_modules\tailwindcss\lib\lib\purgeUnusedStyles.js:93:36)
    at m (D:\windmill-dashboard-react\node_modules\purgecss\lib\purgecss.js:1:3149)
    at x.extractSelectorsFromString (D:\windmill-dashboard-react\node_modules\purgecss\lib\purgecss.js:1:5350)
    at D:\windmill-dashboard-react\node_modules\@fullhuman\postcss-purgecss\lib\postcss-purgecss.js:1:536

Problem description:

Apparently purge doesn't accept an object of styles, but the problem also persists when trying something like:

purge: ['src/**/*.js', 'node_modules/windmill-react-ui/lib/default.js'],

But in this case, instead of an Error, it results in a CSS build without the classes from the default.js files.

Nextjs Javascript and Typescript Support

I'm so glad if this dashboard is available for Nextjs, because of the Server Side Rendering Nextjs feature. And also greatly thanks if available for Nextjs using Javascript and Nextjs using Typescript.

How do I integrate it into an existing nextjs project?

I am wondering how I might be able to seamlessly use it
on an existing nextjs project.

I see you are using react-router and a couple of other stuffs that
comes by default in create-react-app

please advice, thanks!!!

I have problem , I can not run the project

windmill-dashboard-react version: ``

Relevant code or config:

<!-- your code here -->

What you did:

What happened:

Reproduction:

Problem description:

Suggested solution:

npm start issue

windmill-dashboard-react version: ``

Relevant code or config:

<!-- your code here -->

What you did:

i tried running npm start when i cloned the project

What happened:

The Application didn't start
2020-09-18T11_37_08_200Z-debug.log
issue

Reproduction:

Problem description:

Suggested solution:

Light theme not changing button colors

windmill-dashboard-react version: 0.4.0

Relevant code or config:

<div className="grid md:grid-cols-3 gap-1">
  <Button title="Edit" size="small" className="!bg-green-100 dark:bg-green-500">
    <MdModeEdit />
  </Button>
  <Button title="Delete" size="small" className="!bg-red-100 dark:bg-red-500">
    <MdDelete />
  </Button>
  <Button
    title="Open marketplace profile"
    size="small"
    className="!bg-blue-100 dark:bg-blue-500"
  >
    <MdOpenInNew />
  </Button>
</div>;

What happened:

I am switching to light theme and the button background colors is still colored purple

Problem description:

light theme does not change button colors

image
image

Screen is disabled after resizing to large size from small size if side bar nav is opened.

windmill-dashboard-react version: `` Release 0.4.0

What happened:

Screen is disabled after resizing to large size from small size if side bar nav is opened.

Reproduction:

1.Open : https://windmill-dashboard-react.vercel.app/app/dashboard
2. Resize to medium or small screen size
3. Open Sidebar Nav
4. Resize to screen to Large with out closing Sidebar Nav
5. Screen will be disable at a moment until click any area.

Problem description:

Screen is disabled after resizing to large size from small size, so user have to click any area before continue.

Tailwindcss Upgrade

How can we upgrade tailwind without breaking other dependencies and functionality

Authentication Support

Is your feature request related to a problem? Please describe.
The project is described as an application. An Application with just the view perspective on data isn't a real application in my eyes. There also should be a layer to work with the data including Authentication. So not anybody can access certain pages.
For example creating a new data entry or editing one. Maybe not every user should be allowed to do so.

Describe the solution you'd like
A good approach would be OpenID Connect and OAuth2.0. This offers many possibilities since this type of auth is very common in a microservice architecture. Also you can integrate third party auth providers like google and co.

I found some implementations using React:

https://identityserver4.readthedocs.io/en/latest/intro/big_picture.html#the-big-picture

Edit
It would be nice to use "Zustand" and "Immer" instead of Redux. It is more lightweigth and easier to use.

Weird looking Router Link on Ios

windmill-dashboard-react version: ``

What happened:

The Router Link button looks weird on IOS with Safari and Firefox

Reproduction:

Ran the website or open the demo and open it on ios with safari ore firefox.

Problem description:

The Router Link Button looks old and weird

Windows:

Windows Router Link

IOS:

Ios Router Link

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.