https://github.com/gmartins-dev/seller-console
https://github.com/gmartins-dev/seller-console
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gmartins-dev/seller-console
- Owner: gmartins-dev
- Created: 2025-08-18T19:57:16.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-18T22:00:16.000Z (11 months ago)
- Last Synced: 2025-08-18T22:29:42.332Z (11 months ago)
- Language: TypeScript
- Size: 85 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ฏ Seller Console






*A modern, professional lead and opportunity management system built with React, TypeScript, and cutting-edge UI frameworks.*
[๐ Live Demo](#-live-demo) โข [โจ Features](#-features) โข [โก Getting Started](#-getting-started) โข [๐ Usage Guide](#-usage-guide) โข [๐๏ธ Architecture](#-architecture) โข [๐จ UI Components](#-ui-components) โข [๐ Deployment](#-deployment)
## ๐ Overview
Seller Console is a powerful CRM application designed for sales teams to efficiently manage leads and convert them into opportunities. Built with modern web technologies and best practices, it provides a seamless experience across all devices.
## ๐ Live Demo
Try it live: https://seller-console-fawn.vercel.app/
*Experience the complete functionality in action.*
What to explore:
- ๐ Browse and filter leads in real-time
- ๐ Search through lead data with instant results
- ๐ Convert leads to opportunities with optimistic updates
- ๐ฑ Responsive design on mobile/desktop
- ๐ Toggle between dark and light themes
- ๐ฏ Navigate through the complete UI workflow
## โจ Features
### ๐ฏ Key Highlights
- ๐ Complete MVP implementation (core requirements fulfilled)
- โก Optimistic updates with automatic rollback on errors
- ๐ฑ Mobile-first, responsive across all screen sizes
- ๐ Real-time state management with Zustand and TanStack Query
- ๐ก๏ธ Type-safe with TypeScript and Zod validation
- ๐จ Modern UI with Shadcn UI and Tailwind CSS
- ๐ Dark/Light mode with system preference detection
### ๐ช Core Functionality
#### ๐ Lead Management
- ๐ฅ Load leads from local JSON data source
- ๐ Search leads by name or company
- ๐ท๏ธ Filter leads by status (New, Contacted, Qualified, etc.)
- ๐ Sort leads by score, name, company, or creation date
- ๐ View detailed lead information in slide-over panel
- ๐ฑ Mobile-optimized dual layout (cards + tables)
- ๐ Advanced pagination controls (5, 10, 20, 30, 50 items per page)
- ๐ข Smart page navigation with ellipsis for large datasets
- ๐ Real-time pagination stats (showing X-Y of Z items)
- ๐พ Persistent data across browser refreshes
#### โ๏ธ Lead Editing
- โ
Inline edit lead status and email
- ๐ Real-time email format validation
- ๐พ Save/Cancel actions with comprehensive error handling
- ๐ Optimistic updates with automatic rollback on failure
- ๐ฝ Auto-save to localStorage for data persistence
#### ๐ฏ Opportunity Conversion
- ๐ Convert qualified leads to opportunities
- ๐ Create opportunities with name, stage, amount, and account details
- ๐๏ธ Comprehensive form validation
- ๐ Track opportunity pipeline and stages
- ๐ Advanced pagination controls for opportunities table
- ๐ Search opportunities by name or account
- ๐ท๏ธ Filter opportunities by stage (Prospecting, Qualification, etc.)
- ๐ Sort opportunities by stage, amount, or creation date
- ๐ฑ Responsive opportunity cards for mobile viewing
- ๐ข Real-time pagination with customizable items per page
- ๐พ Persistent conversions that survive browser refreshes
#### ๐ Dashboard & Analytics
- ๐ Real-time statistics cards
- ๐ฏ Conversion rate tracking
- ๐ฐ Pipeline value calculations
- ๐ฑ Responsive navigation with mobile sidebar
- ๐ Paginated tables with mobile card layouts
- ๐ Advanced pagination controls for both leads and opportunities
- ๐ข Customizable page sizes (5, 10, 20, 30, 50 items)
- ๐ Intelligent page navigation with ellipsis for large datasets
- ๐ Real-time pagination statistics and item counts
### ๐ Advanced Features
#### ๐ฆ Data Persistence
- ๐ฝ Comprehensive localStorage integration via Zustand persist
- ๐พ Auto-backup mechanism (every 30 minutes)
- ๐ค Data export/import functionality (JSON format)
- ๐ก๏ธ Data validation with Zod schemas
- ๐ Storage monitoring and management tools
- ๐ Lead conversion persistence across browser sessions
#### ๐ฑ Mobile Responsiveness
- ๐ฏ Dual-layout design (mobile cards + desktop tables)
- ๐ฑ Mobile-first responsive breakpoints
- ๐จ Optimized card layouts for small screens
- ๐ Touch-friendly pagination controls
- ๐ Responsive pagination component with adaptive sizing
- ๐ช Progressive enhancement for all device sizes
- ๐ญ Conditional rendering based on screen size
#### ๐ State Management
- ๐พ Persistent filters (localStorage)
- โก Optimistic updates with rollback capability
- ๐ Real-time sync with automatic persistence
- ๐ก๏ธ Error boundaries for graceful recovery
- ๐ **Multi-layer storage strategy** (Zustand + API service)
#### ๐จ User Experience
- ๐ Responsive design (mobile-first)
- โณ Loading states (skeletons, progress)
- ๐ซ Empty states with helpful messaging
- โ Error states with retry options
- ๐ญ Smooth transitions and micro-interactions
#### ๐ง Developer Experience
- ๐ TypeScript throughout the application
- ๐งช Schema validation with Zod
- ๐ฏ Custom hooks for reusable logic
- ๐ฆ Component architecture for maintainability
### ๐ Pagination System
Seller Console features a comprehensive pagination system designed for optimal performance and user experience:
#### ๐ Key Features
- ๐ **Smart Pagination Controls** โ Navigate large datasets efficiently
- ๐ข **Customizable Page Sizes** โ Choose from 5, 10, 20, 30, or 50 items per page
- ๐ **Real-time Statistics** โ Shows "X-Y of Z items" for clear context
- ๐ฏ **Intelligent Navigation** โ Ellipsis pattern for large page counts
- โก **Performance Optimized** โ Only renders visible items for fast performance
- ๐ฑ **Mobile Responsive** โ Touch-friendly controls on all devices
- ๐พ **State Persistence** โ Page preferences maintained across sessions
#### ๐ ๏ธ Implementation Details
- **Auto-reset**: Automatically resets to page 1 when filters change
- **Boundary Handling**: Prevents navigation beyond valid page ranges
- **Visual Feedback**: Clear active page indication and disabled states
- **Accessibility**: Keyboard navigation and screen reader support
- **Consistent API**: Same pagination interface for leads and opportunities
#### ๐ Coverage
- โ
**Leads Table** โ Full pagination with filtering and sorting
- โ
**Opportunities Table** โ Complete pagination functionality
- โ
**Mobile Cards** โ Paginated card layouts for small screens
- โ
**Test Coverage** โ Comprehensive unit and integration tests
### ๐ Theme System
Seller Console features a sophisticated dark/light mode toggle that enhances user experience:
- ๐ฏ One-click toggle in the dashboard header
- ๐พ Persistent preference across sessions
- ๐ฅ๏ธ System detection on first visit
- โจ Smooth transitions (sun/moon icon transforms)
- โฟ Accessibility: screen readers and keyboard navigation
- ๐จ Professional design following shadcn/ui and Tailwind best practices
## โก Getting Started
### ๐ Prerequisites
- Node.js (v18 or higher)
- pnpm (recommended) or npm/yarn
### ๐ Quick Start
1) Clone the repository
```bash
git clone https://github.com/gmartins-dev/seller-console
cd seller-console
```
2) Install dependencies
```bash
pnpm install
# or
npm install
```
3) Start the development server
```bash
pnpm dev
# or
npm run dev
```
4) Open your browser at http://localhost:5173
## ๐ Usage Guide
### ๐ฏ Managing Leads
1. ๐ View leads in the main sortable, paginated table
2. ๐ Search by name or company
3. ๐ท๏ธ Filter by status to narrow the list
4. ๐ Click column headers to sort
5. ๐ Navigate through pages using pagination controls
6. ๐ข Adjust items per page (5, 10, 20, 30, 50) as needed
7. ๐ฑ Mobile users: Swipe through card layouts on small screens
### โ๏ธ Editing Lead Details
1. ๐ฑ๏ธ Click any lead row to open the detail panel
2. โ๏ธ Click "Edit" to modify information
3. ๐พ Save changes or cancel to revert
4. โ
Validation ensures data integrity
5. ๐ฝ Changes automatically persist across browser sessions
### ๐ฏ Converting to Opportunities
1. ๐ฏ Open details for a qualified lead
2. ๐ Click "Convert to Opportunity"
3. ๐ Fill in opportunity details (name, stage, amount, account)
4. โ
Submit to create the opportunity
5. ๐พ Conversions persist even after browser refresh
### ๐ Tracking Opportunities
1. ๐ Navigate to the Opportunities tab
2. ๐ View paginated pipeline with all active opportunities
3. ๐ Search opportunities by name or account
4. ๐ท๏ธ Filter by stage (Prospecting, Qualification, Proposal, etc.)
5. ๐ Sort by stage, amount, or creation date
6. ๐ Navigate through pages with advanced pagination controls
7. ๐ข Customize items per page for optimal viewing
8. ๐ Monitor stages and pipeline value
9. ๐ Analyze distribution across stages
10. ๐ฑ Mobile-optimized opportunity cards for small screens
### ๐พ Data Management
1. ๐ค Export data: Download all leads and opportunities as JSON
2. ๐ฅ Import data: Upload JSON files to restore data
3. ๐ Auto-backup: Data automatically backs up every 30 minutes
4. ๐๏ธ Clear data: Reset all data when needed
5. ๐ Storage info: Monitor localStorage usage and data size
## ๐ง Development
### ๐ Available Scripts
```bash
# Development
pnpm dev # Start dev server
pnpm build # Build for production
pnpm preview # Preview production build
# Code Quality
pnpm lint # Run ESLint
pnpm lint:fix # Fix ESLint issues
pnpm type-check # TypeScript type checking
pnpm format # Format code with Prettier
pnpm format:check # Check code formatting
# Testing
pnpm test # Run tests in watch mode
pnpm test:run # Run tests once
pnpm test:coverage # Run tests with coverage report
```
## ๐ Deployment
### ๐ Live Production
The application is deployed and running live on Vercel:
- ๐ Production URL: https://seller-console-fawn.vercel.app/
- ๐ Hosting Platform: Vercel (optimal for React/Vite)
- โก Performance: Edge network with global CDN
- ๐ Auto Deployment: Continuous deployment from `main` branch
## ๐๏ธ Architecture
### ๐๏ธ Project Structure
```
seller-console/
โโโ ๐ src/
โ โโโ ๐ components/ # Reusable UI components
โ โ โโโ ๐ leads/ # Lead-specific components
โ โ โโโ ๐ opportunities/ # Opportunity-specific components
โ โ โโโ ๐ ui/ # Base UI components (Shadcn)
โ โ โโโ ๐ __tests__/ # Component unit tests
โ โโโ ๐ data/ # Mock data and static assets
โ โโโ ๐ hooks/ # Custom React hooks
โ โ โโโ ๐ __tests__/ # Hook unit tests
โ โโโ ๐ lib/ # Utilities and configurations
โ โ โโโ ๐ __tests__/ # Utility function tests
โ โโโ ๐ pages/ # Page components
โ โโโ ๐ stores/ # Zustand state stores
โ โ โโโ ๐ __tests__/ # Store unit tests
โ โโโ ๐ test/ # Test setup and configuration
โ โโโ ๐ types/ # TypeScript type definitions
โโโ ๐ vitest.config.ts # Test configuration
โโโ ๐ eslint.config.js # Linting configuration
โโโ ๐ README.md # Project documentation
โโโ ๐ package.json # Dependencies and scripts
```
### ๐ ๏ธ Technology Stack
#### ๐จ Frontend Core
- โ๏ธ React 19 โ latest React with concurrent features
- ๐ TypeScript 5.8 โ static type checking and enhanced DX
- โก Vite 7 โ lightning-fast build tool and dev server
- ๐จ Tailwind CSS 4 โ utility-first CSS framework
#### ๐งฉ UI & Components
- ๐ญ Shadcn UI โ high-quality, accessible component library
- ๐จ Radix UI โ unstyled, accessible UI primitives
- ๐ฏ Lucide React โ beautiful & consistent icon library
#### ๐ State Management
- ๐ป Zustand โ lightweight state management
- ๐ TanStack Query โ server state management & caching
- ๐พ Persistent storage โ localStorage integration
- ๐ Zustand persist middleware โ automatic state persistence
- ๐ Multi-layer storage strategy โ store + API service persistence
#### ๐ Forms & Validation
- ๐ React Hook Form โ performant forms with minimal re-renders
- โ
Zod โ TypeScript-first schema validation
#### ๐งช Code Quality & Testing
- ๐ Vitest โ fast, modern test runner with native TypeScript support
- ๐งช React Testing Library โ simple and complete React testing utilities
- ๐ ESLint โ code linting with React and TypeScript rules
- โจ Prettier โ consistent code formatting
- ๐ฏ 52 tests across 11 test files โ comprehensive coverage
- ๐งช Integration testing โ data persistence, API layer, and pagination
- ๐ฑ Responsive testing โ dual-layout component verification
- ๐ State management testing โ Zustand store and custom hooks
- ๐ Pagination testing โ comprehensive pagination functionality coverage
### ๐๏ธ Architecture Patterns
- ๐งฑ Atomic design โ scalable component hierarchy
- ๐ Composition over inheritance โ flexible component patterns
- ๐ญ Render props & custom hooks โ logic sharing and reuse
- ๐ Global state (Zustand), ๐ server state (TanStack Query), ๐ local state (useState), ๐ form state (React Hook Form)
- ๐ก๏ธ Error boundaries, ๐ retry logic with backoff, ๐ clear user feedback
- ๐งช Unit test coverage across components, hooks, API layer, and business logic
- ๐พ Multi-layer persistence โ Zustand store + API service storage
- ๐ฑ Responsive architecture โ dual-layout patterns for mobile/desktop
- ๐ State synchronization โ real-time updates with localStorage backup
## ๐จ UI Components
### ๐งฉ Component Library
Our application uses a carefully curated set of components built on top of Shadcn UI:
#### ๐ Data Display
- ๐ Table โ sortable, filterable data tables with pagination
- ๐ฏ Badge โ status indicators and labels
- ๐ Card โ content containers with consistent spacing
- ๐ Tabs โ organized content sections
- ๐ Pagination โ advanced pagination controls with customizable page sizes
#### ๐ Form Elements
- ๐ Input โ text inputs with validation states
- ๐ Select โ dropdown selections with search
- ๐ Button โ primary, secondary, and icon variants
- ๐ Form โ integrated form components with error handling
#### ๐ Feedback
- โณ Loading states โ skeleton loaders and spinners
- โ Error states โ user-friendly error messages
- ๐ Sheet/Dialog โ modal and slide-over panels
### ๐จ Design System
#### ๐จ Color Palette
- Primary: modern blue tones for actions and highlights
- Success: green for positive actions and completed states
- Warning: amber for caution and pending states
- Destructive: red for errors and dangerous actions
- Muted: subtle grays for secondary content
#### ๐ Typography
- Headings: clear hierarchy with appropriate weight
- Body text: optimized for readability across devices
- Captions: subtle text for metadata and descriptions
#### ๐ Spacing & Layout
- 4px grid system โ consistent spacing throughout
- Responsive breakpoints โ mobile-first approach
- Flexbox & Grid โ modern layout techniques