Smart Wedge Limited: Technical Infrastructure Documentation
1. Server & Network Architecture
Host: Oracle Cloud Infrastructure (OCI) - Ubuntu 24.04 LTS.

Public IP: 92.5.63.25

Web Server: Apache 2.4 with mod_rewrite enabled.

Firewall: OCI Security Lists & iptables (Ports 80, 443, 22 open).

SSL/Security: Global .htpasswd protection on all /dev/ URL paths via Apache <Location> block.

2. Application Suite (7 Services)
All apps are built on CodeIgniter 4 and share a unified directory structure:

smart-school

smart-hospital

smart-hotel

smart-restaurant

smart-retail

smart-society

smart-test

3. Environment Environments
Development (Mirror): Located at /var/www/dev/[app-name].

Access: http://92.5.63.25/dev/[app-name] (Password Required).

Database: dev_[app_name] on TiDB Cloud.

Mode: CI_ENVIRONMENT = development (Debug toolbar active).

Production (Live Demo): Located at /var/www/apps/[app-name].

Access: http://92.5.63.25/[app-name] (Public).

Database: [app_name] on TiDB Cloud.

Mode: CI_ENVIRONMENT = production.

4. Database: TiDB Cloud Cluster
Driver: MySQLi (Port 4000).

SSL Requirement: All connections must use the CA bundle at /etc/ssl/certs/ca-certificates.crt.

Config Fix: app/Config/Database.php contains the manual 'encrypt' array fix for TiDB SSL handshake.

5. DevOps & Version Control
Remote: GitHub (trunedu).

Auth: SSH Key-based (Ed25519) authentication between OCI and GitHub.

Workflow: 1.  Code/Test in /var/www/dev/.
2.  git push origin main from Dev.
3.  git pull origin main from /var/www/apps/ to update live demos.

Security: .env files are globally ignored by Git to prevent credential leaks.