Architecture Overview
The Envia Admin platform is organized as a monorepo containing two independent applications that work together to provide the administrative interface.
High-Level Architecture
admon-monorepo/
├── backend/ → Node.js REST API (Hapi.js)
├── frontend/ → Vue 3 SPA (Vite) + PHP Server (CodeIgniter 4)
└── documentation/ → This documentation site (VitePress)Technology Stack
| Layer | Technology | Version |
|---|---|---|
| Backend Runtime | Node.js | 18.x |
| Backend Framework | Hapi.js | 21.x |
| Database | MySQL | mysql2 |
| Cache & Queues | Redis + Bull | — |
| Frontend Framework | Vue 3 (Composition API) | 3.5 |
| Frontend Build | Vite | 7.x |
| State Management | Pinia | 3.x |
| Styling | Bootstrap 5 + SCSS | 5.3 |
| Frontend Server | CodeIgniter 4 (PHP 8.1+) | — |
| Observability | Datadog (dd-trace) | — |
Application Flow
The frontend Vue SPA communicates with the backend REST API over HTTP. The PHP server (CodeIgniter 4) handles server-side rendering and serves the Vue application.
Browser → CodeIgniter 4 (PHP) → Serves Vue 3 SPA
↓
Hapi.js REST API
↓
MySQL / Redis / S3Deployment
Both applications deploy independently to Heroku:
| Application | Process Types |
|---|---|
| Backend | web: node server.js / worker: node worker.js |
| Frontend | web: vendor/bin/heroku-php-apache2 ... |
Explore Further
- Backend Architecture — Project structure, patterns, and conventions
- Backend API — API conventions and endpoint design
- Backend Database — Models and schema design
- Frontend Architecture — Vue 3 project structure
- Frontend Components — Reusable component library
- Frontend State — Pinia store patterns
