An open API service indexing awesome lists of open source software.

https://github.com/gmartins-dev/seller-console


https://github.com/gmartins-dev/seller-console

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          

# ๐ŸŽฏ Seller Console

![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)
![React](https://img.shields.io/badge/React-19.x-61DAFB.svg?logo=react)
![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178C6.svg?logo=typescript)
![Vite](https://img.shields.io/badge/Vite-7.x-646CFF.svg?logo=vite)
![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-4.x-38B2AC.svg?logo=tailwind-css)
![License](https://img.shields.io/badge/license-MIT-green.svg)

*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