RetailSync is a revolutionary SaaS platform that leverages multi-agent AI technology to optimize retail inventory management. By creating a collaborative ecosystem between stores, warehouses, suppliers, and customers, RetailSync eliminates stockouts, reduces excess inventory, and maximizes profitability through intelligent data synchronization and predictive analytics.
- Multi-Agent AI Architecture: Intelligent agents collaborate across the retail ecosystem
- Real-time Inventory Synchronization: Seamless data sync between multiple systems
- Advanced Demand Forecasting: AI-powered predictions to optimize stock levels
- Google Sheets Integration: Easy data import/export and management
- Automated Replenishment: Smart ordering suggestions based on historical data
- Performance Analytics: Comprehensive dashboards and ROI tracking
- Webhook Support: Real-time notifications and integrations
- Multi-tenant Architecture: Secure, isolated environments for each client
- Stock efficiency optimization (up to 94.3%)
- Demand pattern recognition
- Supplier performance analysis
- Customer behavior prediction
- Seasonal trend analysis
- Waste reduction algorithms
- React 18 with TypeScript
- Vite for fast development and building
- Tailwind CSS for styling
- Shadcn/ui component library
- React Router for navigation
- Firebase for authentication and real-time features
- Google Generative AI for chat functionality
- Node.js with Express.js
- Passport.js for Google OAuth authentication
- Google APIs (Sheets, Drive) for data integration
- Express Handlebars for server-side rendering
- Multer for file uploads
- Axios for HTTP requests
- RESTful API design
- Session-based authentication
- Environment-based configuration
- CORS enabled
- Webhook endpoints
Before running this application, make sure you have the following installed:
- Node.js (v18 or higher)
- npm or bun package manager
- Google Cloud Console account for API credentials
- Firebase project for frontend authentication
-
Clone the repository
git clone https://github.com/SkyRex06/RetailSync_saas.git cd RetailSync_saas -
Install frontend dependencies
npm install # or bun install -
Install backend dependencies
cd backend npm install cd ..
-
Frontend (.env)
VITE_FIREBASE_API_KEY=your_firebase_api_key VITE_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain VITE_FIREBASE_PROJECT_ID=your_firebase_project_id VITE_FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket VITE_FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id VITE_FIREBASE_APP_ID=your_firebase_app_id VITE_FIREBASE_MEASUREMENT_ID=your_firebase_measurement_id
-
Backend (backend/.env)
GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret GOOGLE_CALLBACK_URL=http://localhost:3000/auth/google/callback SESSION_SECRET=your_random_session_secret WEBHOOK_TOKEN=your_webhook_token PORT=3000
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Google Sheets API and Google Drive API
- Create OAuth 2.0 credentials
- Add authorized redirect URIs:
http://localhost:3000/auth/google/callback
- Copy Client ID and Client Secret to backend/.env
- Go to Firebase Console
- Create a new project
- Enable Authentication and Firestore
- Go to Project Settings > General > Your apps
- Add a web app and copy the config to frontend/.env
-
Start the backend server
cd backend npm start # or node src/server.js
Backend will run on http://localhost:3000
-
Start the frontend development server
npm run dev
Frontend will run on http://localhost:8080
-
Access the application
- Open http://localhost:8080 in your browser
- The backend API is available at http://localhost:3000
-
Build the frontend
npm run build
-
Start production server
npm run preview
GET /auth/google- Initiate Google OAuthGET /auth/google/callback- OAuth callbackGET /auth/logout- Logout user
POST /api/sheets/copy- Copy a Google SheetPOST /api/sheets/upload- Upload spreadsheet fileGET /api/sheets/list- List user's sheetsPOST /api/sheets/create- Create new sheet
POST /webhook/data- Receive data updatesGET /webhook/status- Check webhook status
GET /- Main application page
RetailSyncSaaS/
βββ backend/ # Node.js backend
β βββ src/
β β βββ config/
β β β βββ passport-setup.js
β β βββ controllers/
β β β βββ authController.js
β β β βββ sheetController.js
β β β βββ webhookController.js
β β βββ routes/
β β β βββ apiRoutes.js
β β β βββ authRoutes.js
β β β βββ webhookRoutes.js
β β βββ services/
β β β βββ googleService.js
β β βββ views/
β β β βββ index.html
β β βββ server.js
β βββ package.json
β βββ .env
βββ src/ # React frontend
β βββ components/
β β βββ ui/ # Shadcn/ui components
β β βββ chat/ # Chat widget
β β βββ HeroSection.tsx
β β βββ FeaturesSection.tsx
β β βββ ...
β βββ pages/
β β βββ Index.tsx
β β βββ FeaturesPage.tsx
β β βββ PricingPage.tsx
β β βββ ...
β βββ context/
β β βββ ChatContext.tsx
β βββ data/
β β βββ pricing.ts
β βββ hooks/
β βββ lib/
β β βββ firebase.ts
β β βββ gemini.ts
β β βββ utils.ts
β βββ main.tsx
βββ public/ # Static assets
βββ package.json
βββ vite.config.ts
βββ tailwind.config.ts
βββ .env
- User Authentication: Users authenticate via Google OAuth
- Data Integration: Connect Google Sheets for inventory data
- AI Processing: Multi-agent system analyzes data patterns
- Optimization: Generate recommendations for inventory management
- Real-time Sync: Automated updates across all connected systems
- Reporting: Comprehensive analytics and performance metrics
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Use ESLint configuration
- Write meaningful commit messages
- Test your changes thoroughly
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
For support, email support@retailsync.com or join our Discord community.
- Mobile app development
- Advanced ML models for forecasting
- Integration with major POS systems
- Real-time collaboration features
- API marketplace for third-party integrations
Built with β€οΈ for the retail industry