Architecture and code map

Runtime and request flow

IIC net is a custom PHP application rather than a framework-based application with a single router. Apache serves public_html/; its .htaccess maps friendly URLs to individual PHP scripts. Examples include /home/ to home.php, /members/ to members.php, and /member/{id}/ to memberview.php.

Two overlapping initialization styles exist:

  1. Legacy pages include inc/dbcon.php, which loads database helpers and parameters, starts the IICSESSN session, and handles legacy sign-in state. The login page explicitly loads this before file_head.inc.php.
  2. Shared bootstrap/API code uses file_head.inc.php to locate constants.inc.php and base.inc.php. The bootstrap registers a custom class loader and uses $_SERVER['class'] for shared services and $_SERVER['return'] for response data.

Do not assume that changing one initializer updates every page. Follow the includes for the specific entry point being changed.

Repository map

Paths below are relative to the application repository root.

PathPurpose
public_html/Apache document root: pages, form handlers, browser assets, and APIs
public_html/inc/Legacy database helpers, configuration, session setup, menus, and layout
public_html/base.inc.php, public_html/constants.inc.phpShared bootstrap and runtime path/settings discovery
forbidden_dir/Shared PHP classes and settings outside the document root
public_html/API/forbidden_dir/Separate Composer project used by the Docker build
public_html/API/Versioned directory APIs, account/edit endpoints, and internal microservices
public_html/delivermail/Queued email sender and bundled mailer
public_html/scheduled_jobs/Job-triggering code and run-state files
public_html/login/, public_html/v2/Additional login and newer UI/bootstrap paths
public_html/notifications/Notification UI with a separate legacy webpack/React package
config/Apache/PHP configuration, cron schedule, and container entrypoint
db/Database initialization inputs referenced by the commented Compose database service
Dockerfile, docker-compose.ymlApplication image build and local service definition
.github/workflows/Production deployment workflow

The two forbidden directories are not interchangeable

The image copies root forbidden_dir/ to /var/www/forbidden_dir, while Composer dependencies are built from public_html/API/forbidden_dir/composer.json and copied to /var/www/html/API/forbidden_dir/vendor.

constants.inc.php discovers the shared settings directory. The legacy database helper separately searches several Composer autoload locations, starting with API/forbidden_dir/vendor/autoload.php. Preserve both paths when changing the container layout or local mounts.

Data and authentication

  • Legacy pages use MySQLi helpers from inc/dbcon_functions.php; shared classes also provide PDO access through forbidden_dir/classes/db.php.
  • Database-backed homepage configuration is read from homepage during legacy initialization. A database connection alone is not enough: required tables and views must also exist.
  • Directory API queries use tables/views such as members, firms, offices_all_visible, and members_ranked_all.
  • Legacy authorization uses session values such as memberid, accesslevel, firmid, and officeid. Some newer paths use JWT and CSRF classes. Enforcement differs by endpoint; do not infer a universal authorization rule from a shared header or a commented example.
  • Legacy sessions use a custom file-backed handler. Check the configured PHP session directory and its writability when investigating sign-in problems.

Dependencies and browser assets

The Docker build installs Composer dependencies from public_html/API/forbidden_dir/, including HTML Purifier, Mailgun, PHPMailer, GeoIP2, PhpSpreadsheet, Sentry, and reCAPTCHA libraries. Library presence is not proof that every integration is enabled.

Most browser assets are checked in alongside PHP pages. The notification UI has its own package manifest; there is no root application npm build in the Dockerfile. Docusaurus is a separate documentation project, not the application frontend.

Source references