MesaChain revolutionizes the restaurant and café industry by seamlessly integrating comprehensive management tools with the Stellar blockchain. Our platform addresses critical challenges facing food service establishments while leveraging blockchain technology to reduce costs and enhance customer experiences.
The restaurant industry currently faces multiple pain points that impact profitability and growth:
- 💸 High payment processing fees (2-4% per transaction)
- 🧩 Fragmented management systems (inventory, staff, sales)
- 🎁 Ineffective and costly loyalty programs
- ⏱️ Slow financial processes (settlements, payments to employees/suppliers)
- 📊 Limited data visibility for decision-making
- 🍕 Independent restaurant, bar, and café owners and managers
- 🏢 Medium-sized establishment chains (5-50 locations)
- 👨🍳 Service staff (waiters, cashiers, chefs)
- 🧑💼 Frequent customers of these establishments
- 🚚 Suppliers for the food service sector
-
Backend:
- 🖥️ Node.js/Deno.js
- 🌐 Express
- 🗄️ PostgreSQL
- ⚡ Redis
-
Frontend:
- ⚛️ React (Web/Desktop)
- 📱 React Native (Mobile)
-
Blockchain:
- 🌟 Stellar SDK
- 🔄 Horizon API
- 🔒 Stellar Consensus Protocol
-
Security:
- 🛡️ HSM for key custody
- 🔐 Multi-factor authentication
-
Data Analysis:
- 🧠 TensorFlow for predictions
- 📈 Tableau for visualizations
-
Infrastructure:
- ☁️ AWS/Azure
- 🐳 Docker
- ⛵ Kubernetes
MesaChain's architecture consists of three main components:
- REST API for communication between components
- Microservices for different functionalities (inventory, payments, etc.)
- Direct integration with the Stellar network via Horizon API
- Responsive web/desktop application for administrators
- Mobile application for customers (Android/iOS)
- Simplified POS terminal for staff
- Stellar private key custodian
- Custom token issuance and management
- Anchoring system for fiat-crypto conversion
- 🔄 Integrated Payment System: Process payments with minimal fees (<$0.001) via Stellar
- 📱 Customer Mobile App: Order, pay, and manage loyalty points
- 📦 Inventory Management: Track stock levels and predict future needs
- 👥 Staff Management: Scheduling, payroll, and performance analytics
- 🎁 Tokenized Loyalty Program: Create and manage custom loyalty tokens
- 📊 Advanced Analytics: Make informed decisions with data visualizations
- 🌐 Multi-location Support: Manage multiple establishments from one dashboard
- 🔌 Supplier Integration: Streamline ordering and payment processes
Create a .env file in the root directory with the following variables:
# Stellar Network Configuration
STELLAR_NETWORK=testnet # Options: testnet | mainnet
HORIZON_URL=https://horizon-testnet.stellar.org # Testnet URL
API_BASE_URL_BACKEND=http://localhost:3000
API_BASE_URL_FRONTEND=http://localhost:5173For the frontend, create a .env file in the apps/frontend directory with the same variables:
NEXT_PUBLIC_STELLAR_NETWORK=testnet
NEXT_PUBLIC_HORIZON_URL=https://horizon-testnet.stellar.org
NEXT_PUBLIC_API_BASE_URL_BACKEND=http://localhost:3000
NEXT_PUBLIC_API_BASE_URL_FRONTEND=http://localhost:5173The application uses Zod for environment variable validation. Missing or malformed variables will cause the application to fail fast with descriptive error messages.
To switch between testnet and mainnet:
- Update
STELLAR_NETWORKto eithertestnetormainnet - Update
HORIZON_URLaccordingly:- Testnet:
https://horizon-testnet.stellar.org - Mainnet:
https://horizon.stellar.org
- Testnet:
- Never commit real
.envfiles to version control - Store production secrets in GitHub Secrets & Variables
- Use
.env.exampleas a template for required variables
To run the frontend application:
# Navigate to the frontend directory
cd MesaChain-FE
# Install dependencies (if not already done)
pnpm install
# Start the development server
pnpm run devThe frontend will be available at http://localhost:3000 by default.
To run the backend application:
# Navigate to the backend directory
cd MesaChain-BE
# Install dependencies (if not already done)
pnpm install
# Start the development server
pnpm run devThe backend API will be available at http://localhost:4000 by default.
For full application functionality, you'll need both services running. Open two terminal windows and follow these steps:
Terminal 1 (Backend):
cd MesaChain-BE
pnpm run devTerminal 2 (Frontend):
cd MesaChain-FE
pnpm run devMake sure you have all the required environment variables set up as described in the Environment Setup section above.
- Node.js 18 or higher
- pnpm
- Docker and Docker Compose
- Start PostgreSQL database:
pnpm docker:up- Install dependencies:
pnpm install- Generate Prisma client:
cd packages/database
pnpm prisma generate
cd ../..- Apply migrations:
cd packages/database
pnpm prisma migrate deploy
cd ../..- Start development server:
pnpm dev-
GET /reservations/availability?startTime&endTime&partySize- Get available tables for a specific time slot and party size
- Parameters:
startTime: Start date and time (ISO string)endTime: End date and time (ISO string)partySize: Number of people
-
POST /reservations- Create a new reservation
- Body:
{ "userId": "uuid", "tableId": "uuid", "startTime": "ISO string", "endTime": "ISO string", "partySize": number }
-
PATCH /reservations/:id/cancel- Cancel an existing reservation
- Parameters:
id: Reservation ID
Run tests:
pnpm testRun tests in watch mode:
pnpm test:watchView test coverage:
pnpm test:covAfter the initial setup, you can use the following commands for development:
npm run dev- Start the application in development mode with hot reloadingnpm run test- Run the test suitenpm run lint- Run the linter to check code quality
If you encounter any dependency issues, try deleting the node_modules folder and the pnpm-lock.yaml file, then run pnpm install again.
Make sure you have the correct versions of Node.js and pnpm installed.
Check the project documentation for any specific environment variables that need to be set.
MesaChain uses Prometheus, Grafana, and the ELK stack for comprehensive monitoring and centralized logging. See MONITORING.md for full onboarding and playbook details.
- Prometheus: http://localhost:9090
- Grafana: http://localhost:3000 (admin/admin)
- Kibana: http://localhost:5601
- Alertmanager: http://localhost:9093
To onboard a new service or respond to alerts, see the quick reference in README_MONITORING_SNIPPET.md and the full guide in MONITORING.md.