diff --git a/admin-dashboard/.gitignore b/.gitignore similarity index 100% rename from admin-dashboard/.gitignore rename to .gitignore diff --git a/admin-dashboard/.prettierignore b/.prettierignore similarity index 100% rename from admin-dashboard/.prettierignore rename to .prettierignore diff --git a/admin-dashboard/.prettierrc b/.prettierrc similarity index 100% rename from admin-dashboard/.prettierrc rename to .prettierrc diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..bb65606 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Shubham Patidar + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..9ddd781 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# Admin Dashboard + +A modern, responsive **Admin Dashboard** built with **React**, **Tailwind CSS**, and **PWA** features. This dashboard includes a customizable theme (dark, light, blue), real-time charts, and a user-friendly interface for managing and visualizing data. This app is designed with the flexibility to be used in various real-world applications. + +## Features + +- **Themes**: Toggle between Dark, Light, and Blue themes +- **Charts**: + - Line Chart: Displays sales data over time + - Bar Chart: Shows user activity +- **Responsive Design**: Fully responsive across devices (mobile, tablet, desktop) +- **Progressive Web App (PWA)**: Supports offline mode and "Add to Home Screen" functionality +- **Mock Data**: Local state used for chart data and visual elements during development +- **Service Worker**: Automatically caches assets for offline use + +## Technologies Used + +- **Frontend**: React, Tailwind CSS +- **PWA**: Service Worker, Web App Manifest +- **Charts**: Chart.js (for rendering line and bar charts) +- **State Management**: React Context API (for theme state and PWA service) +- **Design**: Tailwind CSS for utility-first styling and custom themes + +## Getting Started + +### Prerequisites + +- Node.js (v14 or higher) +- npm (or yarn) + +### Installation + +1. **Clone the repository**: + + ```bash + git clone https://github.com/letswriteaprogram/admin-dashboard.git + cd admin-dashboard diff --git a/admin-dashboard/README.md b/admin-dashboard/README.md deleted file mode 100644 index 7059a96..0000000 --- a/admin-dashboard/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# React + Vite - -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh - -## Expanding the ESLint configuration - -If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project. diff --git a/admin-dashboard/eslint.config.js b/eslint.config.js similarity index 100% rename from admin-dashboard/eslint.config.js rename to eslint.config.js diff --git a/admin-dashboard/index.html b/index.html similarity index 100% rename from admin-dashboard/index.html rename to index.html diff --git a/admin-dashboard/manifest.json b/manifest.json similarity index 100% rename from admin-dashboard/manifest.json rename to manifest.json diff --git a/admin-dashboard/package-lock.json b/package-lock.json similarity index 100% rename from admin-dashboard/package-lock.json rename to package-lock.json diff --git a/admin-dashboard/package.json b/package.json similarity index 100% rename from admin-dashboard/package.json rename to package.json diff --git a/admin-dashboard/public/vite.svg b/public/vite.svg similarity index 100% rename from admin-dashboard/public/vite.svg rename to public/vite.svg diff --git a/admin-dashboard/service-worker.js b/service-worker.js similarity index 100% rename from admin-dashboard/service-worker.js rename to service-worker.js diff --git a/admin-dashboard/src/App.jsx b/src/App.jsx similarity index 100% rename from admin-dashboard/src/App.jsx rename to src/App.jsx diff --git a/admin-dashboard/src/assets/chart-icon.svg b/src/assets/chart-icon.svg similarity index 100% rename from admin-dashboard/src/assets/chart-icon.svg rename to src/assets/chart-icon.svg diff --git a/admin-dashboard/src/assets/home-icon.svg b/src/assets/home-icon.svg similarity index 100% rename from admin-dashboard/src/assets/home-icon.svg rename to src/assets/home-icon.svg diff --git a/admin-dashboard/src/assets/react.svg b/src/assets/react.svg similarity index 100% rename from admin-dashboard/src/assets/react.svg rename to src/assets/react.svg diff --git a/admin-dashboard/src/components/Dashboard.jsx b/src/components/Dashboard.jsx similarity index 100% rename from admin-dashboard/src/components/Dashboard.jsx rename to src/components/Dashboard.jsx diff --git a/admin-dashboard/src/components/Header.jsx b/src/components/Header.jsx similarity index 100% rename from admin-dashboard/src/components/Header.jsx rename to src/components/Header.jsx diff --git a/admin-dashboard/src/components/SalesChart.jsx b/src/components/SalesChart.jsx similarity index 100% rename from admin-dashboard/src/components/SalesChart.jsx rename to src/components/SalesChart.jsx diff --git a/admin-dashboard/src/components/Sidebar.jsx b/src/components/Sidebar.jsx similarity index 100% rename from admin-dashboard/src/components/Sidebar.jsx rename to src/components/Sidebar.jsx diff --git a/admin-dashboard/src/components/StatCard.jsx b/src/components/StatCard.jsx similarity index 100% rename from admin-dashboard/src/components/StatCard.jsx rename to src/components/StatCard.jsx diff --git a/admin-dashboard/src/components/ThemeToggle.jsx b/src/components/ThemeToggle.jsx similarity index 100% rename from admin-dashboard/src/components/ThemeToggle.jsx rename to src/components/ThemeToggle.jsx diff --git a/admin-dashboard/src/components/UserActivityChart.jsx b/src/components/UserActivityChart.jsx similarity index 100% rename from admin-dashboard/src/components/UserActivityChart.jsx rename to src/components/UserActivityChart.jsx diff --git a/admin-dashboard/src/components/UserTable.jsx b/src/components/UserTable.jsx similarity index 100% rename from admin-dashboard/src/components/UserTable.jsx rename to src/components/UserTable.jsx diff --git a/admin-dashboard/src/index.css b/src/index.css similarity index 100% rename from admin-dashboard/src/index.css rename to src/index.css diff --git a/admin-dashboard/src/main.jsx b/src/main.jsx similarity index 100% rename from admin-dashboard/src/main.jsx rename to src/main.jsx diff --git a/admin-dashboard/src/pages/DashboardPage.jsx b/src/pages/DashboardPage.jsx similarity index 100% rename from admin-dashboard/src/pages/DashboardPage.jsx rename to src/pages/DashboardPage.jsx diff --git a/admin-dashboard/src/pages/ReportsPage.jsx b/src/pages/ReportsPage.jsx similarity index 100% rename from admin-dashboard/src/pages/ReportsPage.jsx rename to src/pages/ReportsPage.jsx diff --git a/admin-dashboard/src/pages/UsersPage.jsx b/src/pages/UsersPage.jsx similarity index 100% rename from admin-dashboard/src/pages/UsersPage.jsx rename to src/pages/UsersPage.jsx diff --git a/admin-dashboard/src/services/api.js b/src/services/api.js similarity index 100% rename from admin-dashboard/src/services/api.js rename to src/services/api.js diff --git a/admin-dashboard/src/styles/tailwind.css b/src/styles/tailwind.css similarity index 100% rename from admin-dashboard/src/styles/tailwind.css rename to src/styles/tailwind.css diff --git a/admin-dashboard/src/utils/formatDate.js b/src/utils/formatDate.js similarity index 100% rename from admin-dashboard/src/utils/formatDate.js rename to src/utils/formatDate.js diff --git a/admin-dashboard/src/utils/useTheme.js b/src/utils/useTheme.js similarity index 100% rename from admin-dashboard/src/utils/useTheme.js rename to src/utils/useTheme.js diff --git a/admin-dashboard/vite-env.d.js b/vite-env.d.js similarity index 100% rename from admin-dashboard/vite-env.d.js rename to vite-env.d.js diff --git a/admin-dashboard/vite.config.js b/vite.config.js similarity index 100% rename from admin-dashboard/vite.config.js rename to vite.config.js