npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vs-admin-fe

v1.5.2

Published

Admin Boot Lib is a comprehensive library designed to accelerate the development of robust and feature-rich admin panels. By providing a foundation of essential components and tools, it significantly streamlines the development process.

Downloads

3,175

Readme

FE Admin boot Project

Admin Boot Lib is a comprehensive library designed to accelerate the development of robust and feature-rich admin panels. By providing a foundation of essential components and tools, it significantly streamlines the development process.

Environment Variables

To run this project, you will need to add the following environment variables to your .env.development file

VITE_API_KEY

VITE_AUTH_DOMAIN

VITE_DATABASE_URL

VITE_PROJECT_ID

VITE_STORAGE_BUCKET

VITE_MESSAGING_SENDER_ID

VITE_APP_ID

Tech Stack

Client: React, Zod + react-hook-form,@tanstack/react-query,@mui/material

Server: Mockapi (for demo)

Usage/Examples


import { FieldEnum } from 'components/form/AdminForm';
import { z } from 'zod';

import { IJsonData } from '@types';

import { InputPresets } from '../../constants/input-field-constants';

const schema = z.object({
  role: z.string().min(1, { message: 'Role is required' })
});
// write schema for validation in add/edit form

export type ISubmittedDataType = z.infer<typeof schema> | { id: string };

export const DATA: IJsonData<ISubmittedDataType> = {
  key: 'users', // used for api calls. Please update the BASE url in `api-contant.ts`
  title: 'Users', // will be shown  as page title
  columnVisibility: {. // control will fields will not be visible in the table
    availableOfficeTiming: false,
    interviewScheduleDates: false,
  },
  columns: [
    { field: 'id', // unique id and it should present in schema
     headerName: 'ID', // whill be used as for title in form and table header
      sortable: true // make it true for the fields which need to apply sorting. It will be server based sorting
       },
    {
      field: 'role',
      headerName: 'Role',
      fieldProps: { // this is for add/edit form. You can pass its fieldType and its props from here.
        fieldType: FieldEnum.Dropdown, // type of field.
        data: [
          { id: 'admin', label: 'Admin' },
          { id: 'guest', label: 'Guest' },
        ],
      },
    },
    {
      field: 'rating',
      headerName: 'value',
      fieldProps: {
        fieldType: FieldEnum.Text,
        preset: InputPresets.Number,
      },
      filterProps: { // you customize like in this scenario you need a slider for filter. if not given field props is applicable on filter as well.
        fieldType: FieldEnum.Slider,
      },
      sortable: true,
    },
  ],
  enableExport: true,
  actions: { // control the action from here. for an item.
    edit: true,
    delete: true,
    view: true,
    add: true,
    filter: true,
  },
  pagination: true,
  schema: schema,
  defaultValues: {
    role: '',
  },
};



import { Layout } from '@components';

import { DATA } from './userPage-data';

const UserPage = () => {
  return <Layout data={DATA} />;
};

export default UserPage;

Add Detail page

For adding detail page for any layout based page. Go to common-contant.ts and add your detail page component there. That component will get row that your clicked or want to view.

// Add your detail page here
export const DetailsPageComponents = {
  users: UserDetailPage, // component with the same key you provided as `key` in data.
};

App json

By using this your can control the following. Make required changes in app-config.ts

export const APP_CONFIG = {
  appName: 'VS Admin Panel',
  loginMessageTitle: 'Welcome',
  loginMessage:
    'Please log in to access, manage, and monitor the administrative features of the system securely.',
  LoginIcon: AdminPanelSettingsIcon,
  loginTitle: 'Admin Login',
};

Dashbaord

Your can manipulate order of charts in dashboard using this json. Written in dashboard-data.ts:

import { ChartType, StatCardAlignment } from './constants';

export const DASHBOARD_DATA = {
  key: 'dashboard',
  title: 'Analytics Dashboard',
  statsData: [
    {
      alignment: StatCardAlignment.Horizontal,
      icon: BarChart,
      title: '200',
      subtitle: 'Total Users',
      stat: '10% increase in activity',
      color: '#fff',
    },
    {
      alignment: StatCardAlignment.Horizontal,
      color: '#fff',
      icon: MonetizationOn,
      title: '300',
      subtitle: 'Total Order',
      stat: '+ 5% from yesterday',
    },
    {
      alignment: StatCardAlignment.Horizontal,
      color: '#FFFBF5',
      icon: Tour,
      title: '20',
      subtitle: 'New Users',
      stat: '+ 15% from yesterday',
    },
    {
      alignment: StatCardAlignment.Horizontal,
      color: '#FFFBF5',
      icon: TrendingUp,
      title: '100',
      subtitle: 'Products Sold',
      stat: '10% from yesterday',
    },
    {
      alignment: StatCardAlignment.Horizontal,
      color: '#FFE5E5',
      icon: TrendingUp,
      title: '$ 1000',
      subtitle: 'Total Revenue',
      stat: '10% from yesterday',
    },
    {
      alignment: StatCardAlignment.Horizontal,
      color: '#FFE5E5',
      icon: TrendingUp,
      title: '$ 1000',
      subtitle: 'Total Revenue',
      stat: '10% from yesterday',
    },
  ],
  totalActivity: 75,
  charts: [
    {
      chartLabel: 'Bar Chart',
      chartType: ChartType.Bar,
    },
    {
      chartLabel: 'Composed Chart',
      chartType: ChartType.Composed,
    },
    {
      chartLabel: 'Area Chart',
      chartType: ChartType.Area,
    },
    {
      chartLabel: 'Radar Chart',
      chartType: ChartType.Radar,
    },
    {
      chartLabel: 'Line Chart',
      chartType: ChartType.Line,
    },
    {
      chartLabel: 'Pie Chart',
      chartType: ChartType.Pie,
    },
  ],
};