HoneyGrid Architecture

Overview
Section titled “Overview”HoneyGrid is a distributed system built around a central REST API that coordinates various microservices using RPC communication patterns.
Core Components
Section titled “Core Components”HoneyGrid Web App
Section titled “HoneyGrid Web App”The frontend application is built using the following libraries:
- React for building UI components
- Material UI for UI components
- Redux Toolkit for global state management
- RTK Query for data fetching and client-side caching
- React Router for routing
- h3-js js bindings for the H3 geospatial indexing system
- mapbox-gl for map rendering
- victory for data visualization
The frontend is deployed to Firebase Hosting, but will be migrated to Cloudflare Workers soon. It is a client-rendered single-page application (SPA) that uses the HoneyGrid REST API to fetch data. Single-page applications are great for admin applications such as HoneyGrid because, once the js bundle has been loaded, the user can navigate around the application without having to wait for the server to respond to each request. Combining this with client-side caching, single-page applications can be very fast and responsive.
HoneyGrid REST API
Section titled “HoneyGrid REST API”The central API gateway that:
- Routes requests to appropriate microservices
- Handles authentication and authorization
- Manages cross-service communication
The REST API is built using the following libraries:
- Hono for API routing and middleware
- Firebase Auth for authentication
Service Layer
Section titled “Service Layer”Data Services
Section titled “Data Services”- Custom Data Service (RPC): Manages core data operations
- Grid Service (RPC): Handles grid-specific operations
- Workspace Service (RPC): Manages workspace-related functionality
Integration Services
Section titled “Integration Services”- Google Services
- Places Service (RPC)
- Ads Service (RPC)
- Call Rail Service (RPC): Phone system integration
- Connection Service (RPC): Manages external connections
- Placekey Service (RPC): Location data handling
- Salesforce Service (RPC): CRM integration
- Slack Service (RPC): Communication integration
- Lead Service (RPC): Lead management
Data Storage
Section titled “Data Storage”Persistent Storage
Section titled “Persistent Storage”- Workspace Durable Objects: Long-term workspace data storage
- Grid: Grid-specific data storage
- Contact: Contact information storage
- HoneyGrid: Main application data store
TODO Items
Section titled “TODO Items”The following components are marked for future implementation:
- Data Source integration
- Grid service extensions
- Lead service integrations
Communication Patterns
Section titled “Communication Patterns”- Primary communication between services uses RPC (Remote Procedure Call)
- The REST API acts as the central coordinator
- Dashed lines in the architecture indicate planned/future integrations