Official enterprise web portal for Alpha Premier Group — Vite + React SPA with Native PHP 8+ REST API & MySQL
See the code
The Enterprise Conglomerate Web Portal & Digital Ecosystem.
A high-performance Single Page Application across 7 diversified subsidiaries in real estate, construction, logistics, and venture incubation.
Modern Vite 7 + React 18 frontend with Native PHP 8+ PDO backend on Hostinger Web Hosting.
About • Subsidiaries • Features • Architecture • API • Tech Stack • Getting Started • Deployment
Enterprise conglomerate portal featuring interactive 3D luxury aesthetic, dynamic subsidiary showcases, and instant visitor triage.
Consolidated multi-enterprise grid connecting 7 autonomous Philippine business operations under a unified identity.
Commercial real estate brokerage showcase with property inventory filters, virtual tours, and direct lead acquisition.
Secure administrative command shell for talent ATS pipeline, live concierge, listing management, and site settings.
Alpha Premier Group (APG) is the official web portal for Alpha Premier Group of Companies OPC, a diversified Philippine conglomerate. The platform unifies seven autonomous business units—ranging from commercial real estate and civil construction to customs freight forwarding and venture incubation—into a single, high-performance web experience.
Rather than maintaining fragmented, disconnected microsites, APG provides a cohesive luxury brand presence backed by a unified administrative engine and direct SMTP dispatch.
.htaccess SPA routing on Hostinger Web Hosting/legacyThe platform houses interactive showcases and dedicated portals for all 7 subsidiary enterprises:
| Subsidiary | Route | Industry | Core Capabilities |
|---|---|---|---|
| Alpha Premier Realty | /subsidiaries/realty | Real Estate Brokerage | Commercial sales, leasing, property acquisition, asset portfolios |
| Alpha Premier Construction | /subsidiaries/construction | General Contracting | Civil engineering, commercial fit-outs, interior design, renovations |
| Swift Clear | /subsidiaries/swiftclear | Logistics & Customs | Customs brokerage, international freight forwarding, cargo clearing |
| Dynamic Tree | /subsidiaries/dynamic-tree | Business Incubation | Corporate advisory, digital transformation, creative consulting |
| Luxe Prime | /subsidiaries/luxe-prime | Luxury Property | High-end estates, executive penthouses, VIP concierge investments |
| Alta Venture | /subsidiaries/alta-venture | Private Equity & Capital | Venture incubation, startup capital, financial engineering, M&A |
| 88 Prime | /subsidiaries/88prime | Supply Chain & Trade | Warehousing, commercial distribution, fleet delivery, logistics |
api/lib/Mailer.php) ┌────────────────────────────────────────────────────────┐
│ Vite 7 + React 18 SPA │
│ Tailwind CSS v4 • React Router 7 • Framer Motion │
└──────────────┬─────────────────────────┬───────────────┘
│ │
Public Client / Admin UI REST API Calls
│ │
▼ ▼
┌────────────────────────────┐ ┌─────────────────────────┐
│ Apache Web Server │ │ Native PHP 8+ API │
│ (.htaccess SPA Rewrite) │ │ (PDO Prepared / REST) │
└──────────────┬─────────────┘ └─────────┬───────────────┘
│ │
┌───────────┴───────────┐ ▼
│ │ ┌─────────────────────────┐
▼ ▼ │ MySQL Relational DB │
┌───────────────┐ ┌───────────┤ (Schema & Migrations) │
│ Dist Assets │ │ /legacy │ └─────────────────────────┘
│ (Production) │ │ (Archive) │ │
└───────────────┘ └───────────┘ ▼
┌─────────────────────────┐
│ Titan Email / SMTP │
│ (Inquiry Dispatch) │
└─────────────────────────┘
The backend exposes a JSON REST API under /api/ with unified CORS handling, status codes, and input sanitization.
# Ingest visitor message or trigger FAQ intent
curl -X POST http://localhost:8000/api/chat/message.php \
-H "Content-Type: application/json" \
-d '{"session_id": "sess_123", "message": "What commercial offices are available in Ortigas?"}'
# Submit enterprise lead inquiry
curl -X POST http://localhost:8000/api/inquire.php \
-H "Content-Type: application/json" \
-d '{"name": "Jane Doe", "email": "jane@example.com", "subsidiary": "realty", "message": "Inquiring for 500sqm office space."}'
# Retrieve active property listings
curl "http://localhost:8000/api/listings.php?subsidiary=realty&type=commercial"
# Fetch published blog articles
curl "http://localhost:8000/api/blogs.php?limit=6"
/api/admin/)Admin endpoints require authenticated session cookies ($_SESSION['admin_logged_in']):
# Admin login
curl -X POST http://localhost:8000/api/admin/auth.php?action=login \
-H "Content-Type: application/json" \
-d '{"username": "admin@alphapremiergroup.com", "password": "AlphaPremier2026!"}'
# Live chat queue and message claiming
curl http://localhost:8000/api/admin/chat.php?action=list_active
# Candidate ATS management
curl http://localhost:8000/api/admin/applicants.php
| Layer | Technology | Purpose |
|---|---|---|
| Frontend Framework | React 18 | Declarative component UI and virtual DOM |
| Build Tooling | Vite 7 | Lightning-fast HMR and optimized production bundling |
| Routing | React Router 7 | Client-side routing across portal and 7 subsidiaries |
| Styling & Theme | Tailwind CSS v4 | Utility-first styling, CSS variables, and luxury themes |
| Animations | Motion & AOS | Smooth transitions, entrance animations, and micro-interactions |
| Icons & Charts | Lucide React & Recharts | Modern UI iconography and data visualization dashboards |
| Backend Runtime | Native PHP 8.2+ | Lightweight serverless REST API without framework overhead |
| Database | MySQL 8.0+ / MariaDB | Relational schema with strict foreign keys and indexed queries |
| Database Access | PDO (Prepared Statements) | SQL-injection immune parameterized transactions |
| Email Dispatcher | Custom Socket SMTP | Direct SSL/TLS mail delivery via Titan Email |
| Web Server | Apache (.htaccess) | Production SPA route rewrites and security header enforcement |
| Deployment Target | Hostinger Web Hosting | Shared and cloud hosting compatibility via public_html |
>= 18.x (Recommended: 20.x or 22.x)>= 8.1 with pdo, pdo_mysql, mbstring, openssl enabled# 1. Clone the repository
git clone https://github.com/Deign86/apg-website.git
cd apg-website
# 2. Install dependencies
npm install
# 3. Configure environment
cp .env.example .env
# 4. Provision database schema & admin account
php api/setup.php
# 5. Start Vite development server
npm run dev
Visit http://localhost:5173 to browse the portal.
To run the PHP API locally in parallel:
php -S localhost:8000 -t .
├── .github/
│ ├── assets/ # README screenshots and branding graphics
│ └── workflows/ci.yml # GitHub Actions CI pipeline
├── api/ # Native PHP 8+ REST API
│ ├── admin/ # Protected administrative endpoints
│ ├── chat/ # Live chat triage and visitor polling
│ ├── lib/Mailer.php # Standalone socket-level SMTP mailer
│ ├── config.php # Environment loader and database constants
│ ├── db.php # PDO database connection factory
│ ├── inquire.php # Customer inquiry submission & mail dispatcher
│ ├── listings.php # Property catalog API
│ ├── schema.sql # Relational database schema definition
│ └── setup.php # Automated schema migrator & seeder
├── public/ # Static public assets & legacy archive
│ ├── assets/ # Subsidiary media and brand marks
│ ├── legacy/ # Preserved legacy website accessible at /legacy
│ └── .htaccess # Production Apache rewrite directives
├── src/ # React frontend source
│ ├── components/ # UI components, headers, footers, chat widget
│ ├── routes/ # Route definitions, admin views, subsidiary sub-apps
│ ├── views/ # Top-level views (Home, Enterprises, Careers, Blogs)
│ ├── App.jsx # Application shell and routing configuration
│ └── main.jsx # Application entry point
├── package.json # Frontend dependencies & npm scripts
├── tsconfig.json # TypeScript strict configuration
└── vite.config.js # Vite configuration with Tailwind CSS v4
Full runbook: DEPLOY.md.
Quick version:
cp .env.deploy.example .env.deploy # fill in SFTP_HOST / SFTP_USER / SFTP_PATH
npm run deploy -- --dry-run # preview the upload plan
npm run deploy -- --with-migrations # build, stage, upload, include migration files
Then run the token-gated migration and delete the migration files:
https://<domain>/api/setup.php?token=<SETUP_TOKEN>
https://<domain>/api/migrate.php?token=<SETUP_TOKEN>
npm run deploy -- --purge-migrations
public_html/
index.html assets/ imports/ images/ legacy/
.htaccess <- required for SPA routing
api/ <- PHP backend, sibling of index.html
.env <- created on the server, never uploaded
Note that dist/ alone is not deployable — Vite does not copy api/ into it. The
deploy script stages both together.
The official hostinger-api-mcp cannot deploy this project. Its only upload tool,
agency-hosting_deployNodeStaticWebsite, is restricted to Agency Plan node-static sites
and overwrites all existing site contents. It also cannot create databases or run SQL.
This project deploys over SFTP. See DEPLOY.md section 0 for the details.
Run the verification pipeline to ensure zero errors before deploying:
# Production build check
npm run build
# Code linting
npm run lint
# Backend PHP syntax checks
php -l api/config.php
php -l api/db.php
php -l api/inquire.php
php -l api/setup.php
All rights reserved. © 2026 Alpha Premier Group of Companies OPC.
Unpublished proprietary software. Unauthorized copying, distribution, or reproduction is strictly prohibited.
Hack
39.6%
TypeScript
28.2%
JavaScript
15.8%
PHP
6.7%
HTML
5.8%
CSS
3.9%
Official enterprise web portal for Alpha Premier Group — Vite + React SPA with Native PHP 8+ REST API & MySQL
See the code
The Enterprise Conglomerate Web Portal & Digital Ecosystem.
A high-performance Single Page Application across 7 diversified subsidiaries in real estate, construction, logistics, and venture incubation.
Modern Vite 7 + React 18 frontend with Native PHP 8+ PDO backend on Hostinger Web Hosting.
About • Subsidiaries • Features • Architecture • API • Tech Stack • Getting Started • Deployment
Enterprise conglomerate portal featuring interactive 3D luxury aesthetic, dynamic subsidiary showcases, and instant visitor triage.
Consolidated multi-enterprise grid connecting 7 autonomous Philippine business operations under a unified identity.
Commercial real estate brokerage showcase with property inventory filters, virtual tours, and direct lead acquisition.
Secure administrative command shell for talent ATS pipeline, live concierge, listing management, and site settings.
Alpha Premier Group (APG) is the official web portal for Alpha Premier Group of Companies OPC, a diversified Philippine conglomerate. The platform unifies seven autonomous business units—ranging from commercial real estate and civil construction to customs freight forwarding and venture incubation—into a single, high-performance web experience.
Rather than maintaining fragmented, disconnected microsites, APG provides a cohesive luxury brand presence backed by a unified administrative engine and direct SMTP dispatch.
.htaccess SPA routing on Hostinger Web Hosting/legacyThe platform houses interactive showcases and dedicated portals for all 7 subsidiary enterprises:
| Subsidiary | Route | Industry | Core Capabilities |
|---|---|---|---|
| Alpha Premier Realty | /subsidiaries/realty | Real Estate Brokerage | Commercial sales, leasing, property acquisition, asset portfolios |
| Alpha Premier Construction | /subsidiaries/construction | General Contracting | Civil engineering, commercial fit-outs, interior design, renovations |
| Swift Clear | /subsidiaries/swiftclear | Logistics & Customs | Customs brokerage, international freight forwarding, cargo clearing |
| Dynamic Tree | /subsidiaries/dynamic-tree | Business Incubation | Corporate advisory, digital transformation, creative consulting |
| Luxe Prime | /subsidiaries/luxe-prime | Luxury Property | High-end estates, executive penthouses, VIP concierge investments |
| Alta Venture | /subsidiaries/alta-venture | Private Equity & Capital | Venture incubation, startup capital, financial engineering, M&A |
| 88 Prime | /subsidiaries/88prime | Supply Chain & Trade | Warehousing, commercial distribution, fleet delivery, logistics |
api/lib/Mailer.php) ┌────────────────────────────────────────────────────────┐
│ Vite 7 + React 18 SPA │
│ Tailwind CSS v4 • React Router 7 • Framer Motion │
└──────────────┬─────────────────────────┬───────────────┘
│ │
Public Client / Admin UI REST API Calls
│ │
▼ ▼
┌────────────────────────────┐ ┌─────────────────────────┐
│ Apache Web Server │ │ Native PHP 8+ API │
│ (.htaccess SPA Rewrite) │ │ (PDO Prepared / REST) │
└──────────────┬─────────────┘ └─────────┬───────────────┘
│ │
┌───────────┴───────────┐ ▼
│ │ ┌─────────────────────────┐
▼ ▼ │ MySQL Relational DB │
┌───────────────┐ ┌───────────┤ (Schema & Migrations) │
│ Dist Assets │ │ /legacy │ └─────────────────────────┘
│ (Production) │ │ (Archive) │ │
└───────────────┘ └───────────┘ ▼
┌─────────────────────────┐
│ Titan Email / SMTP │
│ (Inquiry Dispatch) │
└─────────────────────────┘
The backend exposes a JSON REST API under /api/ with unified CORS handling, status codes, and input sanitization.
# Ingest visitor message or trigger FAQ intent
curl -X POST http://localhost:8000/api/chat/message.php \
-H "Content-Type: application/json" \
-d '{"session_id": "sess_123", "message": "What commercial offices are available in Ortigas?"}'
# Submit enterprise lead inquiry
curl -X POST http://localhost:8000/api/inquire.php \
-H "Content-Type: application/json" \
-d '{"name": "Jane Doe", "email": "jane@example.com", "subsidiary": "realty", "message": "Inquiring for 500sqm office space."}'
# Retrieve active property listings
curl "http://localhost:8000/api/listings.php?subsidiary=realty&type=commercial"
# Fetch published blog articles
curl "http://localhost:8000/api/blogs.php?limit=6"
/api/admin/)Admin endpoints require authenticated session cookies ($_SESSION['admin_logged_in']):
# Admin login
curl -X POST http://localhost:8000/api/admin/auth.php?action=login \
-H "Content-Type: application/json" \
-d '{"username": "admin@alphapremiergroup.com", "password": "AlphaPremier2026!"}'
# Live chat queue and message claiming
curl http://localhost:8000/api/admin/chat.php?action=list_active
# Candidate ATS management
curl http://localhost:8000/api/admin/applicants.php
| Layer | Technology | Purpose |
|---|---|---|
| Frontend Framework | React 18 | Declarative component UI and virtual DOM |
| Build Tooling | Vite 7 | Lightning-fast HMR and optimized production bundling |
| Routing | React Router 7 | Client-side routing across portal and 7 subsidiaries |
| Styling & Theme | Tailwind CSS v4 | Utility-first styling, CSS variables, and luxury themes |
| Animations | Motion & AOS | Smooth transitions, entrance animations, and micro-interactions |
| Icons & Charts | Lucide React & Recharts | Modern UI iconography and data visualization dashboards |
| Backend Runtime | Native PHP 8.2+ | Lightweight serverless REST API without framework overhead |
| Database | MySQL 8.0+ / MariaDB | Relational schema with strict foreign keys and indexed queries |
| Database Access | PDO (Prepared Statements) | SQL-injection immune parameterized transactions |
| Email Dispatcher | Custom Socket SMTP | Direct SSL/TLS mail delivery via Titan Email |
| Web Server | Apache (.htaccess) | Production SPA route rewrites and security header enforcement |
| Deployment Target | Hostinger Web Hosting | Shared and cloud hosting compatibility via public_html |
>= 18.x (Recommended: 20.x or 22.x)>= 8.1 with pdo, pdo_mysql, mbstring, openssl enabled# 1. Clone the repository
git clone https://github.com/Deign86/apg-website.git
cd apg-website
# 2. Install dependencies
npm install
# 3. Configure environment
cp .env.example .env
# 4. Provision database schema & admin account
php api/setup.php
# 5. Start Vite development server
npm run dev
Visit http://localhost:5173 to browse the portal.
To run the PHP API locally in parallel:
php -S localhost:8000 -t .
├── .github/
│ ├── assets/ # README screenshots and branding graphics
│ └── workflows/ci.yml # GitHub Actions CI pipeline
├── api/ # Native PHP 8+ REST API
│ ├── admin/ # Protected administrative endpoints
│ ├── chat/ # Live chat triage and visitor polling
│ ├── lib/Mailer.php # Standalone socket-level SMTP mailer
│ ├── config.php # Environment loader and database constants
│ ├── db.php # PDO database connection factory
│ ├── inquire.php # Customer inquiry submission & mail dispatcher
│ ├── listings.php # Property catalog API
│ ├── schema.sql # Relational database schema definition
│ └── setup.php # Automated schema migrator & seeder
├── public/ # Static public assets & legacy archive
│ ├── assets/ # Subsidiary media and brand marks
│ ├── legacy/ # Preserved legacy website accessible at /legacy
│ └── .htaccess # Production Apache rewrite directives
├── src/ # React frontend source
│ ├── components/ # UI components, headers, footers, chat widget
│ ├── routes/ # Route definitions, admin views, subsidiary sub-apps
│ ├── views/ # Top-level views (Home, Enterprises, Careers, Blogs)
│ ├── App.jsx # Application shell and routing configuration
│ └── main.jsx # Application entry point
├── package.json # Frontend dependencies & npm scripts
├── tsconfig.json # TypeScript strict configuration
└── vite.config.js # Vite configuration with Tailwind CSS v4
Full runbook: DEPLOY.md.
Quick version:
cp .env.deploy.example .env.deploy # fill in SFTP_HOST / SFTP_USER / SFTP_PATH
npm run deploy -- --dry-run # preview the upload plan
npm run deploy -- --with-migrations # build, stage, upload, include migration files
Then run the token-gated migration and delete the migration files:
https://<domain>/api/setup.php?token=<SETUP_TOKEN>
https://<domain>/api/migrate.php?token=<SETUP_TOKEN>
npm run deploy -- --purge-migrations
public_html/
index.html assets/ imports/ images/ legacy/
.htaccess <- required for SPA routing
api/ <- PHP backend, sibling of index.html
.env <- created on the server, never uploaded
Note that dist/ alone is not deployable — Vite does not copy api/ into it. The
deploy script stages both together.
The official hostinger-api-mcp cannot deploy this project. Its only upload tool,
agency-hosting_deployNodeStaticWebsite, is restricted to Agency Plan node-static sites
and overwrites all existing site contents. It also cannot create databases or run SQL.
This project deploys over SFTP. See DEPLOY.md section 0 for the details.
Run the verification pipeline to ensure zero errors before deploying:
# Production build check
npm run build
# Code linting
npm run lint
# Backend PHP syntax checks
php -l api/config.php
php -l api/db.php
php -l api/inquire.php
php -l api/setup.php
All rights reserved. © 2026 Alpha Premier Group of Companies OPC.
Unpublished proprietary software. Unauthorized copying, distribution, or reproduction is strictly prohibited.
Hack
39.6%
TypeScript
28.2%
JavaScript
15.8%
PHP
6.7%
HTML
5.8%
CSS
3.9%