Skip to content

khiwniti/beta-bitebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BiteBase - Restaurant Intelligence Platform

A comprehensive geospatial SaaS platform for restaurant market analysis and business intelligence.

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Docker (optional)

Development Setup

  1. Clone the repository

    git clone https://github.com/khiwniti/beta-bitebase.git
    cd beta-bitebase
  2. Install dependencies

    # Frontend
    cd apps/frontend
    npm install
    
    # Backend
    cd ../backend
    npm install
  3. Environment Configuration

    # Copy environment template
    cp .env.production .env.local
    # Update with your configuration
  4. Start Development Servers

    # Terminal 1 - Backend
    cd apps/backend
    npm run dev
    
    # Terminal 2 - Frontend
    cd apps/frontend
    npm run dev
  5. Access the Application

πŸ—οΈ Architecture

Frontend (Next.js)

  • 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

Backend (Node.js)

  • Framework: Express.js
  • API: RESTful endpoints
  • CORS: Configured for cross-origin requests
  • Data: Mock data with extensible structure

πŸ“¦ Deployment

Option 1: Using Docker

# Build and run with Docker Compose
docker-compose -f docker-compose.production.yml up --build

Option 2: Manual Deployment

# Run the deployment script
./deploy.sh

# Deploy the generated dist/ folder to your hosting platform

Option 3: Platform-Specific

Vercel (Frontend)

cd apps/frontend
vercel --prod

Railway/Heroku (Backend)

cd apps/backend
# Follow platform-specific deployment instructions

πŸ”§ Configuration

Environment Variables

Frontend (.env.local)

NEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_ENVIRONMENT=development
NEXT_PUBLIC_FIREBASE_API_KEY=your-key
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=your-token

Backend (.env)

NODE_ENV=development
PORT=3001
CORS_ORIGIN=http://localhost:3000

πŸ“Š Features

  • 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

πŸ› οΈ Development

Project Structure

beta-bitebase/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ frontend/          # Next.js application
β”‚   └── backend/           # Express.js API
β”œβ”€β”€ database/              # Database schemas
β”œβ”€β”€ agent/                 # AI agent services
└── deploy.sh             # Deployment script

API Endpoints

  • GET /health - Health check
  • GET /api/restaurants - Restaurant data
  • GET /api/market-analyses - Market analysis data

Adding New Features

  1. Backend: Add routes in apps/backend/minimal-server.js
  2. Frontend: Create components in apps/frontend/components/
  3. API: Update client in apps/frontend/lib/api-client.ts

πŸ” Troubleshooting

Common Issues

  1. CORS Errors

    • Check backend CORS configuration
    • Verify frontend API URL
  2. Build Failures

    • Clear node_modules: rm -rf node_modules && npm install
    • Check TypeScript errors: npm run check-types
  3. Port Conflicts

    • Frontend: Change PORT in package.json
    • Backend: Update PORT environment variable

πŸ“ License

MIT License - see LICENSE file for details.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“ž Support

For support and questions, please open an issue in the GitHub repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors