A powerful, real-time admin dashboard for managing your e-commerce operations. Monitor sales, track inventory, manage orders, and analyze customer dataβall in one beautiful interface.
- Features
- Tech Stack
- Getting Started
- Project Structure
- Available Scripts
- Dashboard Features
- Deployment
- Contributing
- License
- Contact
|
|
Before you begin, ensure you have the following installed:
- Node.js 18+ (Download)
- npm or yarn
- SwiftCart Backend (API endpoints required)
- Clone the repository
git clone https://github.com/mu7ammad-3li/SwiftDashboard.git
cd SwiftDashboard- Install dependencies
npm install- Create environment file (optional)
Create a .env file in the root directory:
# API Configuration
VITE_API_URL=http://localhost:3000/api
VITE_WS_URL=ws://localhost:3000
# App Configuration
VITE_APP_NAME=SwiftDashboard
VITE_APP_VERSION=1.0.0- Run the development server
npm run devThe dashboard will be running at: http://localhost:5173
- Build for production
npm run buildSwiftDashboard/
βββ π src/ # Source code
β βββ π components/ # React components
β β βββ π ui/ # shadcn/ui components
β β β βββ button.tsx
β β β βββ card.tsx
β β β βββ chart.tsx
β β β βββ table.tsx
β β β βββ ...
β β βββ π dashboard/ # Dashboard components
β β β βββ Overview.tsx
β β β βββ SalesChart.tsx
β β β βββ RecentOrders.tsx
β β β βββ Analytics.tsx
β β βββ π layout/ # Layout components
β β β βββ Sidebar.tsx
β β β βββ Header.tsx
β β β βββ MainLayout.tsx
β β βββ π orders/ # Order management
β β β βββ OrderList.tsx
β β β βββ OrderDetails.tsx
β β β βββ OrderStatus.tsx
β β βββ π products/ # Product management
β β β βββ ProductList.tsx
β β β βββ ProductForm.tsx
β β β βββ ProductTable.tsx
β β βββ π customers/ # Customer management
β β βββ CustomerList.tsx
β β βββ CustomerDetails.tsx
β βββ π pages/ # Page components
β β βββ Dashboard.tsx
β β βββ Orders.tsx
β β βββ Products.tsx
β β βββ Customers.tsx
β β βββ Analytics.tsx
β β βββ Settings.tsx
β βββ π lib/ # Utilities and configurations
β β βββ api.ts # API client
β β βββ utils.ts # Helper functions
β β βββ constants.ts # Constants
β βββ π hooks/ # Custom React hooks
β β βββ useOrders.ts
β β βββ useProducts.ts
β β βββ useAnalytics.ts
β βββ π types/ # TypeScript type definitions
β β βββ order.ts
β β βββ product.ts
β β βββ analytics.ts
β βββ App.tsx # Main application component
β βββ main.tsx # Application entry point
β βββ index.css # Global styles
βββ π public/ # Static assets
βββ .env # Environment variables (create this)
βββ .env.example # Environment template
βββ .gitignore # Git ignore rules
βββ package.json # Dependencies and scripts
βββ vite.config.ts # Vite configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ README.md # This file
# Start development server with hot reload
npm run dev
# Build for production
npm run build
# Preview production build locally
npm run preview
# Lint code with ESLint
npm run lint- Revenue Metrics: Total sales, revenue, and growth percentages
- Order Statistics: Pending, processing, and completed orders
- Customer Analytics: New customers, retention rates
- Quick Actions: Fast access to common tasks
- Order List: View all orders with filtering and sorting
- Order Details: Complete order information and timeline
- Status Updates: Change order status with notifications
- Order Search: Find orders by ID, customer, or date
- Product Catalog: View all products with images and details
- Add/Edit Products: Comprehensive product form
- Inventory Tracking: Stock levels and low-stock alerts
- Bulk Actions: Edit multiple products at once
- Sales Charts: Daily, weekly, monthly revenue trends
- Top Products: Best-selling items and categories
- Customer Insights: Purchase patterns and demographics
- Export Data: Download reports as CSV or PDF
- Profile Management: Update admin profile
- Notification Preferences: Configure alerts
- Theme Settings: Light/dark mode toggle
- API Configuration: Manage API endpoints
npm install -g vercel
vercelnpm install -g netlify-cli
netlify deploy --prodnpm run build
# Upload the 'dist' folder to your serverSwiftDashboard is designed to work seamlessly with the SwiftCart e-commerce platform. Ensure that:
- SwiftCart API is running and accessible
- CORS is configured to allow dashboard origin
- Authentication tokens are properly configured
- WebSocket connections are enabled for real-time updates
Contributions are what make the open-source community amazing! Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Muhammad Ali
- GitHub: @mu7ammad-3li
- Email: muhammad.3lii2@gmail.com
- LinkedIn: linkedin.com/in/muhammad-3lii
Project Link: https://github.com/mu7ammad-3li/SwiftDashboard
- React - UI library
- Vite - Build tool
- shadcn/ui - UI components
- Tailwind CSS - Styling
- Radix UI - Headless UI components
- Recharts - Chart library