{"id":30160266,"url":"https://github.com/programmersiam/ps-ecommerce","last_synced_at":"2026-05-15T12:09:26.932Z","repository":{"id":307649366,"uuid":"1030090538","full_name":"ProgrammerSiam/ps-Ecommerce","owner":"ProgrammerSiam","description":"A modern, full-featured e-commerce dashboard built with Next.js 15, TypeScript, Tailwind CSS, and React Context for state management.","archived":false,"fork":false,"pushed_at":"2025-08-02T12:28:17.000Z","size":354,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-11T15:41:01.618Z","etag":null,"topics":["nextjs","react-dom","tailwindcss","tanstack-query","typescript"],"latest_commit_sha":null,"homepage":"https://ps-ecommerce-sigma.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProgrammerSiam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-01T04:36:02.000Z","updated_at":"2025-08-02T12:54:19.000Z","dependencies_parsed_at":"2025-08-01T12:44:41.210Z","dependency_job_id":"0f5cc838-c527-4dad-ab25-e55a02ffa73d","html_url":"https://github.com/ProgrammerSiam/ps-Ecommerce","commit_stats":null,"previous_names":["programmersiam/ps-ecommerce"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ProgrammerSiam/ps-Ecommerce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgrammerSiam%2Fps-Ecommerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgrammerSiam%2Fps-Ecommerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgrammerSiam%2Fps-Ecommerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgrammerSiam%2Fps-Ecommerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProgrammerSiam","download_url":"https://codeload.github.com/ProgrammerSiam/ps-Ecommerce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgrammerSiam%2Fps-Ecommerce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33066197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nextjs","react-dom","tailwindcss","tanstack-query","typescript"],"created_at":"2025-08-11T15:38:26.527Z","updated_at":"2026-05-15T12:09:26.907Z","avatar_url":"https://github.com/ProgrammerSiam.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-Commerce Dashboard\n\nA modern, full-featured e-commerce dashboard built with Next.js 15, TypeScript, Tailwind CSS, and React Context for state management.\n\n## 🚀 Features\n\n### Core Functionality\n\n- **Product Listing**: Browse all products with responsive grid layout\n- **Product Details**: Comprehensive product pages with add-to-cart functionality\n- **Category Filtering**: Filter products by category with real-time updates\n- **Search Functionality**: Search products by title and description\n- **Sorting Options**: Sort by name, price (low/high), and rating\n- **Shopping Cart**: Add, remove, and update quantities with persistent state\n- **Add Products**: Form to add new products with validation\n- **Pagination**: Navigate through large product catalogs\n\n### Technical Features\n\n- **Next.js 15** with App Router for modern React development\n- **TypeScript** for type safety and better developer experience\n- **Tailwind CSS** for responsive, utility-first styling\n- **React Context** for global state management\n- **TanStack Query** for efficient data fetching and caching\n- **Image Optimization** with Next.js Image component\n- **Responsive Design** that works on all devices\n\n## 🛠️ Tech Stack\n\n- **Framework**: Next.js 15 (App Router)\n- **Language**: TypeScript\n- **Styling**: Tailwind CSS\n- **State Management**: React Context + TanStack Query\n- **API**: FakeStore API (https://fakestoreapi.com)\n- **Deployment**: Vercel-ready\n\n## 📦 Installation \u0026 Setup\n\n### Prerequisites\n\n- Node.js 18+\n- npm or yarn\n\n### Quick Start\n\n1. **Clone the repository**\n\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd yoooooo\n   ```\n\n2. **Install dependencies**\n\n   ```bash\n   npm install\n   ```\n\n3. **Run the development server**\n\n   ```bash\n   npm run dev\n   ```\n\n4. **Open your browser**\n   Navigate to [http://localhost:3000](http://localhost:3000)\n\n### Available Scripts\n\n- `npm run dev` - Start development server\n- `npm run build` - Build for production\n- `npm run start` - Start production server\n- `npm run lint` - Run ESLint\n\n## 🏗️ Project Structure\n\n```\nsrc/\n├── app/                    # Next.js App Router pages\n│   ├── layout.tsx         # Root layout with providers\n│   ├── page.tsx           # Home page\n│   ├── products/          # Product pages\n│   │   ├── page.tsx       # Product listing\n│   │   └── [id]/          # Dynamic product detail\n│   ├── cart/              # Cart page\n│   └── add-product/       # Add product form\n├── components/            # Reusable components\n│   └── Header.tsx         # Navigation header\n├── context/              # React Context providers\n│   └── CartContext.tsx    # Cart state management\n├── hooks/                # Custom React hooks\n│   └── useProducts.ts     # Data fetching hooks\n└── styles/               # Global styles\n    └── globals.css        # Tailwind CSS imports\n```\n\n## 🎨 Design Choices \u0026 Architecture\n\n### State Management\n\n- **React Context**: Used for cart state management due to its simplicity and built-in React support\n- **TanStack Query**: Implemented for server state management with caching, retries, and background updates\n\n### Component Architecture\n\n- **Functional Components**: Modern React with hooks\n- **TypeScript**: Full type safety for better development experience\n- **Responsive Design**: Mobile-first approach with Tailwind CSS\n\n### Data Fetching Strategy\n\n- **TanStack Query**: Provides caching, background updates, and error handling\n- **Optimistic Updates**: Cart updates are immediate for better UX\n- **Error Boundaries**: Graceful error handling with retry mechanisms\n\n### Performance Optimizations\n\n- **Image Optimization**: Next.js Image component with proper sizing\n- **Code Splitting**: Automatic with Next.js App Router\n- **Caching**: TanStack Query provides intelligent caching\n- **Lazy Loading**: Images and components load as needed\n\n## 🔧 Configuration\n\n### Environment Variables\n\nNo environment variables required for this demo. The app uses the public FakeStore API.\n\n### Tailwind Configuration\n\nCustom Tailwind config with:\n\n- Custom color palette\n- Responsive breakpoints\n- Custom utilities\n\n### Next.js Configuration\n\n- Image domains configured for FakeStore API\n- TypeScript strict mode enabled\n- ESLint configuration\n\n## 🚀 Deployment\n\n### Vercel (Recommended)\n\n1. Push your code to GitHub\n2. Connect your repository to Vercel\n3. Deploy automatically\n\n### Manual Deployment\n\n```bash\nnpm run build\nnpm run start\n```\n\n## 🎯 Features Breakdown\n\n### 1. Product Listing (`/products`)\n\n- **Search**: Real-time search by title and description\n- **Filtering**: Category-based filtering\n- **Sorting**: Multiple sort options (name, price, rating)\n- **Pagination**: 12 items per page with navigation\n- **Responsive Grid**: Adapts to screen size\n\n### 2. Product Details (`/products/[id]`)\n\n- **Comprehensive Info**: Title, price, description, category, rating\n- **Add to Cart**: Quantity selection and cart integration\n- **Image Gallery**: Optimized product images\n- **Error Handling**: Graceful 404 and error states\n\n### 3. Shopping Cart (`/cart`)\n\n- **Item Management**: Add, remove, update quantities\n- **Price Calculation**: Real-time total calculation\n- **Empty State**: Helpful messaging when cart is empty\n- **Order Summary**: Subtotal, shipping, and total\n\n### 4. Add Product (`/add-product`)\n\n- **Form Validation**: Client-side validation with error messages\n- **API Integration**: POST request to FakeStore API\n- **Success Feedback**: Success message with auto-redirect\n- **Category Selection**: Dropdown with predefined categories\n\n## 🔮 Future Improvements\n\n### Performance Enhancements\n\n- **Server-Side Rendering**: Implement SSR for better SEO\n- **Static Generation**: Pre-render product pages\n- **Incremental Static Regeneration**: Update content without full rebuild\n- **Bundle Optimization**: Code splitting and tree shaking\n\n### Feature Additions\n\n- **User Authentication**: Login/signup system\n- **Wishlist**: Save products for later\n- **Product Reviews**: User-generated reviews and ratings\n- **Advanced Search**: Filters, price range, ratings\n- **Checkout Process**: Payment integration\n- **Order History**: Track past purchases\n- **Admin Dashboard**: Manage products and orders\n\n### Technical Improvements\n\n- **Testing**: Unit and integration tests\n- **Error Monitoring**: Sentry or similar service\n- **Analytics**: User behavior tracking\n- **PWA**: Progressive Web App features\n- **Internationalization**: Multi-language support\n- **Accessibility**: WCAG compliance improvements\n\n### State Management\n\n- **Zustand**: Consider replacing Context for complex state\n- **Redux Toolkit**: For larger applications\n- **Server State**: Expand TanStack Query usage\n\n## 🐛 Known Issues\n\n- FakeStore API is for demo purposes only\n- No real backend integration\n- Cart state resets on page refresh (could be fixed with localStorage)\n\n## 📝 Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n## 📄 License\n\nThis project is open source and available under the [MIT License](LICENSE).\n\n## 🙏 Acknowledgments\n\n- [FakeStore API](https://fakestoreapi.com) for providing demo data\n- [Next.js](https://nextjs.org) for the amazing framework\n- [Tailwind CSS](https://tailwindcss.com) for the utility-first CSS framework\n- [TanStack Query](https://tanstack.com/query) for data fetching\n- [Vercel](https://vercel.com) for deployment platform\n\n---\n\nBuilt with ❤️ using Next.js, TypeScript, and Tailwind CSS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogrammersiam%2Fps-ecommerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogrammersiam%2Fps-ecommerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogrammersiam%2Fps-ecommerce/lists"}