A comprehensive geospatial SaaS platform for restaurant market analysis and business intelligence.
- Node.js 18+
- npm or yarn
- Docker (optional)
-
Clone the repository
git clone https://github.com/khiwniti/beta-bitebase.git cd beta-bitebase -
Install dependencies
# Frontend cd apps/frontend npm install # Backend cd ../backend npm install
-
Environment Configuration
# Copy environment template cp .env.production .env.local # Update with your configuration
-
Start Development Servers
# Terminal 1 - Backend cd apps/backend npm run dev # Terminal 2 - Frontend cd apps/frontend npm run dev
-
Access the Application
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- Framework: Next.js 14 with App Router
- UI: Tailwind CSS + Radix UI components
- State Management: React Query
- Maps: Leaflet with React Leaflet
- Charts: Chart.js + Recharts
- Framework: Express.js
- API: RESTful endpoints
- CORS: Configured for cross-origin requests
- Data: Mock data with extensible structure
# Build and run with Docker Compose
docker-compose -f docker-compose.production.yml up --build# Run the deployment script
./deploy.sh
# Deploy the generated dist/ folder to your hosting platformcd apps/frontend
vercel --prodcd apps/backend
# Follow platform-specific deployment instructionsNEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_ENVIRONMENT=development
NEXT_PUBLIC_FIREBASE_API_KEY=your-key
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=your-tokenNODE_ENV=development
PORT=3001
CORS_ORIGIN=http://localhost:3000- Market Analysis: Interactive maps and market metrics
- Restaurant Explorer: Browse and analyze restaurant data
- AI Insights: Market opportunities and recommendations
- Dashboard: Comprehensive business intelligence
- Multi-language: English and Thai support
beta-bitebase/
βββ apps/
β βββ frontend/ # Next.js application
β βββ backend/ # Express.js API
βββ database/ # Database schemas
βββ agent/ # AI agent services
βββ deploy.sh # Deployment script
GET /health- Health checkGET /api/restaurants- Restaurant dataGET /api/market-analyses- Market analysis data
- Backend: Add routes in
apps/backend/minimal-server.js - Frontend: Create components in
apps/frontend/components/ - API: Update client in
apps/frontend/lib/api-client.ts
-
CORS Errors
- Check backend CORS configuration
- Verify frontend API URL
-
Build Failures
- Clear node_modules:
rm -rf node_modules && npm install - Check TypeScript errors:
npm run check-types
- Clear node_modules:
-
Port Conflicts
- Frontend: Change PORT in package.json
- Backend: Update PORT environment variable
MIT License - see LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
For support and questions, please open an issue in the GitHub repository.