A modern, production-ready platform for tracking coffee and cocoa from farm to buyer with comprehensive traceability, AI insights, and real-time logistics tracking.
- π Secure Authentication: Google OAuth 2.0 integration
- π₯ Role-Based Access: Admin, Manager, Buyer, and Farmer roles
- πΊοΈ Interactive Mapping: Farm plot visualization with Leaflet/OpenStreetMap
- π Batch Traceability: Complete harvest tracking from farm to buyer
- π€ AI Insights: Gemini-powered farm analysis and recommendations
- π Multi-Language: i18next internationalization (English, French, Spanish)
- π± Responsive Design: Mobile-first, works on all devices
- π Offline Indicator: Real-time connection status
- πΌ Subscription Tiers: Free, Professional, Enterprise
- π Analytics Dashboard: Real-time metrics and KPIs
- π Live Logistics: Satellite shipment tracking (Enterprise)
- π Export Capabilities: CSV export for reports
- π¨ Customizable: Theme colors per crop type
- Docker 20.10+
- Docker Compose 2.0+
- 2GB+ RAM available
# 1. Clone repository
git clone https://github.com/YOUR_ORG/beanspath.git
cd beanspath
# 2. Configure environment
cp .env.example .env.local
# Edit .env.local with your credentials
# 3. Start services
docker-compose up -d
# 4. Access platform
open http://localhost:3000First Login: Use Google OAuth to create your admin account.
| Document | Description |
|---|---|
| DEPLOYMENT.md | Complete production deployment guide |
| TESTING.md | Testing framework and guidelines |
| CODE_QUALITY.md | Development standards and best practices |
| COMMIT_GUIDELINES.md | Git commit conventions |
| CHANGELOG.md | Version history and release notes |
| SECURITY.md | Security policy and vulnerability reporting |
| Privacy Policy | GDPR/CCPA compliance |
| Terms of Service | User agreements |
Frontend:
- React 18 + TypeScript
- Vite (build tool)
- Tailwind CSS (styling)
- Leaflet (maps)
- Recharts (data visualization)
- i18next (internationalization)
Backend/Infrastructure:
- PostgreSQL 15 + PostGIS (database)
- Nginx (web server)
- Docker + Docker Compose (containerization)
Third-Party Services:
- Google OAuth (authentication)
- Google Maps API (geocoding)
- Gemini AI (insights generation)
- Sentry (error tracking)
beanspath/
βββ components/ # React components
β βββ __tests__/ # Component tests
β βββ Layout.tsx
β βββ MapComponent.tsx
β βββ ...
βββ services/ # Business logic
β βββ __tests__/ # Service tests
β βββ authService.ts
β βββ geminiService.ts
β βββ logger.ts
β βββ errorTracking.ts
βββ database/ # Database schema
β βββ init.sql
βββ docs/ # Documentation
βββ public/ # Static assets
βββ tests/ # Test configuration
βββ .github/workflows/ # CI/CD pipelines
βββ docker-compose.yml
βββ Dockerfile
βββ nginx.conf
βββ vite.config.ts
# Run all tests (in Docker)
docker-compose exec web npm test
# With coverage
docker-compose exec web npm run test:coverage
# Watch mode
docker-compose exec web npm run test:watch
# Interactive UI
docker-compose exec web npm run test:ui- Minimum: 80% for lines, functions, statements
- Target: 85%+ across all metrics
- Current: 85%+ for core services
- β TLS/SSL encryption
- β Content Security Policy (CSP)
- β Security headers (HSTS, X-Frame-Options)
- β Rate limiting
- β Role-based access control
- β Session timeout
- β Audit logging
- β Docker security hardening
See SECURITY.md for our responsible disclosure policy.
Contact: security@beanspath.com
# Install dependencies (in Docker)
docker-compose run --rm web npm install
# Start development server
docker-compose up
# Run type checking
docker-compose exec web npm run type-check
# Run linting
docker-compose exec web npm run lint
# Format code
docker-compose exec web npm run formatPre-commit hooks automatically run:
- TypeScript type checking
- ESLint validation
- Prettier formatting
- Unit tests (if test files changed)
To initialize hooks:
docker-compose exec web npm run prepare- Create feature branch:
git checkout -b feat/my-feature - Make changes following CODE_QUALITY.md
- Write tests for new features
- Commit with conventional commits
- Push and create pull request
- CI/CD runs automatically
- Merge after approval
See docs/DEPLOYMENT.md for comprehensive deployment guide.
Quick Deploy:
# 1. Configure production environment
cp .env.example .env.local
# Edit .env.local
# 2. Build production images
docker-compose build --no-cache
# 3. Start services
docker-compose up -d
# 4. Verify deployment
docker-compose ps
docker-compose logs -f webGitHub Actions automatically:
- β Runs type checking
- β Runs linting
- β Executes all tests
- β Builds application
- β Scans Docker images (Trivy)
- β Checks dependencies (npm audit)
- β Deploys to staging (main branch)
See .env.example for complete list (50+ variables).
Essential Variables:
# Application
NODE_ENV=production
VITE_APP_URL=https://beanspath.com
VITE_API_URL=https://api.beanspath.com
# Google Services
VITE_GOOGLE_CLIENT_ID=your_client_id
VITE_GOOGLE_MAPS_API_KEY=your_maps_key
API_KEY=your_gemini_key
# Database
DB_USER=beansadmin
DB_PASSWORD=strong_password
DB_NAME=beanspath_prod
# Monitoring (Optional)
VITE_SENTRY_DSN=your_sentry_dsn| Phase | Status | Progress |
|---|---|---|
| Phase 1: Security & Infrastructure | β Complete | 100% |
| Phase 2: Testing Infrastructure | β Complete | 90% |
| Phase 3: Logging & Monitoring | β Complete | 100% |
| Phase 4: Code Quality | β Complete | 100% |
| Phase 5: Documentation & Compliance | β Complete | 100% |
Overall Production Readiness: 85% π
- Additional component tests (MapComponent, LandingPage)
- E2E tests for critical flows
- Performance optimization (code splitting)
- Backend API implementation
- Cookie consent banner
- Data export/deletion features
- Follow CODE_QUALITY.md standards
- Write tests for new features
- Use conventional commits
- Update documentation as needed
- Ensure CI/CD passes
- Self-review checklist in CODE_QUALITY.md
- Automated checks (CI/CD)
- Peer review (2 approvals required)
- Final approval from maintainer
Proprietary - All rights reserved.
For licensing inquiries: legal@beanspath.com
- Project Lead: [Your Name]
- Lead Developer: [Developer Name]
- DevOps: [DevOps Name]
- Security: security@beanspath.com
- General Support: support@beanspath.com
- Security Issues: security@beanspath.com
- Sales Inquiries: sales@beanspath.com
- Emergency Hotline: +XXX-XXX-XXXX (24/7)
- Documentation: ./docs
- GitHub Issues: Issues
- Status Page: https://status.beanspath.com
- Community Forum: https://community.beanspath.com
- OpenStreetMap for mapping data
- Google for OAuth and Maps API
- Sentry for error tracking
- All open-source contributors
- Backend API implementation
- Real-time notifications
- Mobile app (React Native)
- Advanced analytics
- Blockchain integration for certification
- IoT sensor integration
- ML-powered quality prediction
- Multi-tenant architecture
- Marketplace features
- Payment processing
- Contract management
- Supply chain financing
Built with β€οΈ by the BeansPath Team
Last Updated: November 2025