{"id":48586662,"url":"https://github.com/flexycode/ecommerce-analytics","last_synced_at":"2026-04-08T18:12:55.396Z","repository":{"id":332032577,"uuid":"1131722783","full_name":"flexycode/ecommerce-analytics","owner":"flexycode","description":"🤖 Real-time analytics platform for e-commerce businesses with AI-powered sales predictions and inventory management.","archived":false,"fork":false,"pushed_at":"2026-01-12T04:20:52.000Z","size":1991,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-12T13:44:12.769Z","etag":null,"topics":["docker","docker-compose","flask","kubernetes","nestjs","nextjs14","numpy","pandas","posgresql","python","redis","socket-io","tailwindcss","typeorm","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flexycode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-10T15:17:11.000Z","updated_at":"2026-01-12T04:25:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"a15c3a4e-cbfd-46fd-b168-558deab8f56b","html_url":"https://github.com/flexycode/ecommerce-analytics","commit_stats":null,"previous_names":["flexycode/ecommerce-analytics"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/flexycode/ecommerce-analytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexycode%2Fecommerce-analytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexycode%2Fecommerce-analytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexycode%2Fecommerce-analytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexycode%2Fecommerce-analytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flexycode","download_url":"https://codeload.github.com/flexycode/ecommerce-analytics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexycode%2Fecommerce-analytics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31567639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"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":["docker","docker-compose","flask","kubernetes","nestjs","nextjs14","numpy","pandas","posgresql","python","redis","socket-io","tailwindcss","typeorm","typescript"],"created_at":"2026-04-08T18:12:53.977Z","updated_at":"2026-04-08T18:12:55.389Z","avatar_url":"https://github.com/flexycode.png","language":"TypeScript","readme":"# E-commerce Analytics Dashboard\n\n\u003e Real-time analytics platform for e-commerce businesses with AI-powered sales predictions and inventory management.\n\n[![Next.js](https://img.shields.io/badge/Next.js-14+-black?style=flat-square\u0026logo=next.js)](https://nextjs.org/)\n[![NestJS](https://img.shields.io/badge/NestJS-10+-red?style=flat-square\u0026logo=nestjs)](https://nestjs.com/)\n[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-16-blue?style=flat-square\u0026logo=postgresql)](https://postgresql.org/)\n[![Redis](https://img.shields.io/badge/Redis-7-red?style=flat-square\u0026logo=redis)](https://redis.io/)\n[![Kubernetes](https://img.shields.io/badge/Kubernetes-ready-blue?style=flat-square\u0026logo=kubernetes)](https://kubernetes.io/)\n\n## ✨ Features\n\n- **📊 Real-time Analytics Dashboard** - Monitor sales, revenue, and inventory with sub-second latency\n- **🤖 AI-Powered Predictions** - Machine learning models for sales forecasting and inventory optimization\n- **📦 Inventory Management** - Real-time stock tracking with automated low-stock alerts\n- **🎨 Customizable Dashboards** - Drag-and-drop widgets to build personalized analytics views\n- **🔒 GDPR/CCPA Compliant** - Built-in privacy controls for data export, deletion, and consent management\n- **⚡ WebSocket Real-time Updates** - Live data streaming for instant dashboard updates\n\n## 🎯 Key Outcomes\n\n| Metric | Target |\n|--------|--------|\n| Sales Conversion Increase | **30%** |\n| Inventory Tracking | **Real-time** (\u003c1s latency) |\n| Dashboard Customization | **100%** user personalization |\n\n## � Screenshots\n\n### Landing Page\n![Landing Page](public/screenshots/landing-page.png)\n*Premium landing page with animated gradients, feature highlights, and technology stack showcase*\n\n### Analytics Dashboard\n![Dashboard Overview](public/screenshots/dashboard.png)\n*Real-time dashboard with metrics cards, sales charts, recent orders, low stock alerts, and AI predictions*\n\n\n## �🛠️ Technology Stack\n\n| Layer | Technology |\n|-------|------------|\n| **Frontend** | Next.js 14+, TypeScript, Tailwind CSS |\n| **Backend** | NestJS, TypeORM, Socket.io |\n| **Database** | PostgreSQL 16 |\n| **Cache** | Redis 7 |\n| **ML Service** | Python, Flask, NumPy, Pandas |\n| **Container** | Docker, Docker Compose |\n| **Orchestration** | Kubernetes |\n\n## 📁 Project Structure\n\n```\necommerce-analytics/\n├── src/                        # Next.js Frontend\n│   ├── app/                    # App Router pages\n│   │   ├── dashboard/          # Dashboard pages\n│   │   └── ...\n│   └── components/             # React components\n│       └── dashboard/          # Dashboard-specific components\n├── backend/                    # NestJS Backend\n│   └── src/\n│       ├── modules/\n│       │   ├── analytics/      # Real-time analytics\n│       │   ├── auth/           # JWT authentication\n│       │   ├── cache/          # Redis caching\n│       │   ├── inventory/      # Stock management\n│       │   ├── predictions/    # AI forecasting\n│       │   ├── privacy/        # GDPR compliance\n│       │   └── sales/          # Sales data\n│       └── common/             # Shared utilities\n├── ml-service/                 # Python ML Service\n├── k8s/                        # Kubernetes manifests\n├── docker-compose.yml          # Local development\n└── docs/                       # Documentation\n```\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Node.js 18+\n- Docker \u0026 Docker Compose\n- PostgreSQL 16 (or use Docker)\n- Redis 7 (or use Docker)\n\n### 1. Clone and Install\n\n```bash\n# Clone the repository\ngit clone https://github.com/yourusername/ecommerce-analytics.git\ncd ecommerce-analytics\n\n# Install frontend dependencies\nnpm install\n\n# Install backend dependencies\ncd backend \u0026\u0026 npm install \u0026\u0026 cd ..\n```\n\n### 2. Environment Setup\n\n```bash\n# Copy environment files\ncp backend/env.example backend/.env\n\n# Edit .env with your configuration\n# See env.example for all options\n```\n\n### 3. Start with Docker Compose (Recommended)\n\n```bash\n# Start all services\ndocker-compose up -d\n\n# View logs\ndocker-compose logs -f\n```\n\n### 4. Or Start Manually\n\n```bash\n# Terminal 1: Start PostgreSQL and Redis\ndocker run -d -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres:16-alpine\ndocker run -d -p 6379:6379 redis:7-alpine\n\n# Terminal 2: Start backend\ncd backend \u0026\u0026 npm run start:dev\n\n# Terminal 3: Start frontend\nnpm run dev\n\n# Terminal 4: Start ML service\ncd ml-service \u0026\u0026 python app.py\n```\n\n### 5. Access the Application\n\n- **Frontend Dashboard:** http://localhost:3000\n- **Backend API:** http://localhost:4000\n- **API Documentation:** http://localhost:4000/api/docs\n- **ML Service:** http://localhost:5000\n\n## 📖 API Documentation\n\nThe API is documented with Swagger/OpenAPI. Access the documentation at:\n\n```\nhttp://localhost:4000/api/docs\n```\n\n### Key Endpoints\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| POST | `/api/auth/register` | Register new user |\n| POST | `/api/auth/login` | User login |\n| GET | `/api/analytics/dashboard` | Get dashboard metrics |\n| GET | `/api/sales` | List sales with pagination |\n| GET | `/api/sales/metrics` | Get sales metrics |\n| GET | `/api/inventory/products` | List products |\n| GET | `/api/predictions/forecast` | Get AI predictions |\n| GET | `/api/privacy/export` | Export user data (GDPR) |\n\n## ☸️ Kubernetes Deployment\n\n```bash\n# Apply all manifests\nkubectl apply -f k8s/\n\n# Check deployments\nkubectl get pods\n\n# Check services\nkubectl get services\n\n# View HPA status\nkubectl get hpa\n```\n\n## 🧪 Testing\n\n```bash\n# Frontend tests\nnpm run test\n\n# Backend tests\ncd backend \u0026\u0026 npm run test\n\n# E2E tests\nnpm run test:e2e\n```\n\n## 📊 Performance Targets\n\n| Metric | Target |\n|--------|--------|\n| Dashboard Load Time | \u003c 2 seconds |\n| Real-time Update Latency | \u003c 1 second |\n| API Response Time (95th) | \u003c 200ms |\n| System Uptime | 99.9% |\n\n## 🔐 Security \u0026 Compliance\n\n- **Authentication:** JWT-based with secure token management\n- **Authorization:** Role-based access control (RBAC)\n- **Data Encryption:** TLS 1.3 in transit, encrypted at rest\n- **GDPR Compliance:** Data export, deletion, consent management\n- **CCPA Compliance:** Privacy rights dashboard\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit changes (`git commit -m 'Add amazing feature'`)\n4. Push to branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\nBuilt with ❤️ by Jay Arre P. Talosig for data-driven e-commerce success\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexycode%2Fecommerce-analytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflexycode%2Fecommerce-analytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexycode%2Fecommerce-analytics/lists"}