Complete field operations management platform with real-time tracking, route optimization, inventory management, KYC, surveys, analytics & commission tracking.
π Live Demo: https://ss.gonxt.tech
- Features
- Demo Credentials
- Tech Stack
- Quick Start
- Architecture
- Deployment
- API Documentation
- Development
- Executive Dashboard with KPIs
- Advanced Analytics with customizable date ranges
- Real-time performance metrics
- Revenue, conversion & growth tracking
- Route planning & optimization
- Inventory tracking in real-time
- Order management
- Mobile-friendly agent interface
- Live GPS tracking & mapping
- Visit management & scheduling
- Photo capture for verification
- Activity timeline tracking
- Board placement management
- Brand activation campaigns
- Product distribution tracking
- Commission calculation & tracking
- Customer KYC collection
- Custom survey builder
- Response analytics
- Approval workflows
- Invoice generation & management
- Payment collection tracking
- Multi-currency support
- Financial reports
- Role-based access control (RBAC)
- Multi-tenant architecture
- Audit logging
- User activity tracking
- Toast notifications (success/error/warning/info)
- Skeleton loaders for smooth loading
- Error boundaries with fallback UI
- Responsive mobile design
- Dark mode support (coming soon)
Tenant: demo
Email: [email protected]
Password: admin123
Tenant: demo
Email: [email protected]
Password: agent123
- Framework: React 18.3.1 + TypeScript
- Build Tool: Vite 5.4
- Routing: React Router v6
- State Management: Zustand
- UI Components: Custom + Tailwind CSS
- Charts: Recharts
- Icons: Lucide React
- HTTP Client: Axios
- PWA: Vite PWA Plugin
- Runtime: Node.js v18.20.8
- Framework: Express.js
- Database: SQLite (production) / PostgreSQL ready
- Authentication: JWT
- Process Manager: systemd
- Reverse Proxy: Nginx
- Hosting: AWS EC2 (Ubuntu 24.04)
- SSL: Let's Encrypt (Certbot)
- Domain: ss.gonxt.tech
- CI/CD: GitHub Actions ready
- Node.js >= 18.0.0
- npm >= 9.0.0
-
Clone the repository
git clone https://github.com/Reshigan/SalesSync.git cd SalesSync -
Backend Setup
cd backend-api npm install # Create .env file cp .env.example .env # Start development server npm run dev # Server runs on http://localhost:3001
-
Frontend Setup
cd frontend-vite npm install # Start development server npm run dev # App runs on http://localhost:5173
-
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
- API Health: http://localhost:3001/api/health
SalesSync/
βββ backend-api/ # Express.js API server
β βββ src/
β β βββ server.js # Main entry point
β β βββ routes/ # API routes
β β βββ middleware/ # Auth, CORS, etc.
β β βββ db/ # Database models & migrations
β βββ database/ # SQLite database files
β βββ package.json
β
βββ frontend-vite/ # React + Vite frontend
β βββ src/
β β βββ pages/ # 63+ lazy-loaded pages
β β βββ components/ # Reusable UI components
β β βββ store/ # Zustand stores
β β βββ services/ # API service layer
β β βββ utils/ # Helper functions
β β βββ App.tsx # Main app with routing
β βββ public/ # Static assets
β βββ package.json
β
βββ README.md # This file
- Lazy Loading: All 63 pages are code-split for optimal performance
- Suspense: Smooth loading transitions with skeleton loaders
- Error Boundaries: Page-level error handling with fallback UI
- Protected Routes: Role-based access control
- Toast System: Global notification management with Zustand
- API Client: Centralized Axios instance with interceptors
- RESTful API: Standard HTTP methods (GET, POST, PUT, DELETE)
- JWT Authentication: Secure token-based auth
- Multi-tenant: Tenant isolation in database
- SQLite: Embedded database for simplicity (PostgreSQL ready)
- Systemd: Auto-restart on failure
- CORS: Configured for cross-origin requests
- Host: [email protected]
- Domain: https://ss.gonxt.tech
- SSL: Let's Encrypt (expires 2026-01-09)
- Frontend: /var/www/salessync
- Backend: /var/www/salessync-api
- Database: /var/www/salessync-api/database/salessync.db
cd frontend-vite
npm run build
# Output: dist/ folder (~2MB gzipped)# Create tarball
tar -czf salessync-dist.tar.gz dist/
# Upload to server
scp salessync-dist.tar.gz [email protected]:/tmp/
# Extract on server
ssh [email protected]
cd /var/www/salessync
sudo tar -xzf /tmp/salessync-dist.tar.gz
sudo chown -R www-data:www-data dist# Upload backend files
rsync -avz backend-api/ [email protected]:/var/www/salessync-api/
# SSH to server
ssh [email protected]
cd /var/www/salessync-api
npm install --production
# Restart service
sudo systemctl restart salessync-api.service
sudo systemctl status salessync-api.service# Check frontend
curl -I https://ss.gonxt.tech
# Check backend
curl https://ss.gonxt.tech/api/healthFile: /etc/systemd/system/salessync-api.service
[Unit]
Description=SalesSync API Server
After=network.target
[Service]
Type=simple
User=ubuntu
WorkingDirectory=/var/www/salessync-api
Environment=NODE_ENV=production
Environment=PORT=3001
ExecStart=/usr/bin/node /var/www/salessync-api/src/server.js
Restart=always
RestartSec=10s
StandardOutput=append:/var/www/salessync-api/logs/stdout.log
StandardError=append:/var/www/salessync-api/logs/stderr.log
[Install]
WantedBy=multi-user.targetFile: /etc/nginx/sites-available/salessync
server {
listen 80;
server_name ss.gonxt.tech;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name ss.gonxt.tech;
ssl_certificate /etc/letsencrypt/live/ss.gonxt.tech/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ss.gonxt.tech/privkey.pem;
# Frontend
location / {
root /var/www/salessync/dist;
try_files $uri $uri/ /index.html;
}
# Backend API
location /api {
proxy_pass http://localhost:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}Production: https://ss.gonxt.tech/api
Development: http://localhost:3001/api
All protected endpoints require JWT token in Authorization header:
Authorization: Bearer <your-jwt-token>POST /api/auth/login # User login
POST /api/auth/register # User registration
POST /api/auth/logout # Logout
GET /api/auth/me # Get current userGET /api/users # List users (admin)
GET /api/users/:id # Get user details
PUT /api/users/:id # Update user
DELETE /api/users/:id # Delete userGET /api/customers # List customers
POST /api/customers # Create customer
GET /api/customers/:id # Get customer details
PUT /api/customers/:id # Update customerGET /api/orders # List orders
POST /api/orders # Create order
GET /api/orders/:id # Get order details
PUT /api/orders/:id # Update order statusGET /api/products # List products
POST /api/products # Create product
GET /api/products/:id # Get product details
PUT /api/products/:id # Update productGET /api/analytics/dashboard # Dashboard KPIs
GET /api/analytics/revenue # Revenue analytics
GET /api/analytics/sales # Sales metricsGET /api/health # Server health status{
"success": true,
"data": { ... },
"message": "Operation successful"
}{
"success": false,
"error": "Error message",
"code": "ERROR_CODE"
}npm run dev # Start dev server (port 5173)
npm run build # Production build
npm run preview # Preview production build
npm run lint # Run ESLint
npm run type-check # TypeScript type checkingnpm run dev # Start with nodemon
npm start # Start production server
npm run test # Run tests (coming soon)
npm run migrate # Run database migrationsVITE_API_URL=http://localhost:3001/api
VITE_APP_ENV=developmentNODE_ENV=production
PORT=3001
JWT_SECRET=your-secret-key
DATABASE_PATH=./database/salessync.db
CORS_ORIGIN=https://ss.gonxt.tech- Initial Chunk: ~142 KB (vendor)
- Route Chunks: 3-94 KB each (63+ chunks)
- Total Build: ~2 MB (uncompressed)
- Gzipped: ~600 KB
- Build Time: ~13 seconds
- Performance: 90+
- Accessibility: 95+
- Best Practices: 90+
- SEO: 95+
- Response Time: <100ms average
- Uptime: 99.9%
- Database: SQLite (5ms avg query)
- Memory: <100 MB usage
- Enhanced meta descriptions
- Open Graph tags
- Twitter Card tags
- Canonical URLs
- E2E test suite
- API integration tests
- Performance testing
- Security audit
- README.md
- API documentation (Swagger)
- Deployment guide
- Contributing guidelines
- Dark mode UI
- Real-time notifications (WebSocket)
- Mobile app (React Native)
- Advanced reporting
- Multi-language support
- Automated tests (Vitest + Playwright)
- PostgreSQL migration
- Docker containerization
- Kubernetes deployment
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
Lead Developer: Reshigan
GitHub: https://github.com/Reshigan
- β Fixed backend systemd service conflicts
- β‘ Added lazy loading & code splitting (63+ chunks)
- π‘οΈ Added PageErrorBoundary component
- π Enhanced SEO meta tags
- π Comprehensive README documentation
- β Added Toast notification system
- β Added Skeleton loader components
- β Deployed Analytics & Finance modules
- β SSL certificate installed
- β Initial production deployment
- β 13 business modules completed
- β Multi-tenant architecture
- β JWT authentication
Built with β€οΈ by the SalesSync Team
Visit Production β
Visit Production β