# tokslaw.com — Personal Portfolio & Professional Website A containerized portfolio website for **Toks Lawal**, a Product Architect and Senior Software Engineer specializing in microservices architecture, event-driven systems, and full-stack development. Built with CodeIgniter 4 and deployed via Docker. --- ## About This site serves as the central hub for Toks Lawal's professional presence, featuring: - **Portfolio** — Curated showcase of projects and engineering work - **About / Experience** — Career history across MyFit.ai, Intralot, Float Mobility, and ChiefSoft Works - **Services** — Software architecture, microservices design, and full-stack development offerings - **Blog** — Dynamically pulled from an external blog data API (`blogdata.chiefsoft.net`) Live at: **[tokslaw.com](https://tokslaw.com)** --- ## Tech Stack | Layer | Technology | |---|---| | Framework | CodeIgniter 4 (PHP 8.1+) | | Web Server | Apache 2.4 with `mod_rewrite` | | Containerization | Docker + Docker Compose | | Frontend | HTML5, CSS3, JavaScript (Hub Template by LiquidThemes) | | Fonts | Google Fonts — Be Vietnam Pro, Libre Baskerville, Space Grotesk | | External API | `https://blogdata.chiefsoft.net/blogdata/tokslaw` | | Image Registry | `registry.chiefsoft.net` (private) | | Extensions | MongoDB, Redis, xDebug (dev), GD, mysqli, pgsql | --- ## Project Structure ``` TokslawMain/ ├── app/ │ ├── Controllers/ │ │ ├── BaseController.php # Shared APIcall() cURL helper │ │ ├── Home.php # Homepage — fetches live blog data │ │ ├── About.php # Experience timeline (hardcoded) │ │ ├── Portfolio.php # Portfolio page │ │ ├── Services.php # Services offered │ │ └── Project.php # Project detail view │ ├── Views/ │ │ ├── welcome_message.php # Homepage template │ │ ├── about.php # About/Experience template │ │ ├── portfolio.php # Portfolio template │ │ ├── services.php # Services template │ │ ├── project.php # Project detail template │ │ └── styles.css # Custom overrides │ └── Config/ │ ├── Routes.php # URL routing │ └── App.php # App-level configuration ├── public/ # Web root — point your server here │ ├── index.php # Application entry point │ ├── .htaccess # URL rewriting rules │ └── assets/ # CSS, JS, images, fonts, vendors ├── docker/ │ └── apache/ │ ├── Dockerfile # PHP 8.1-Apache image definition │ └── 000-default.conf # Apache VirtualHost config ├── docker-compose.yml # Container orchestration ├── writable/ # Cache, logs, sessions (auto-generated) ├── apache_log/ # Apache access and error logs (mounted) ├── composer.json # PHP dependency manifest ├── env # Environment variable template └── spark # CodeIgniter CLI ``` --- ## Routes | Method | URL | Controller | Description | |---|---|---|---| | GET | `/` | `Home::index()` | Homepage with live blog feed | | GET | `/portfolio` | `Portfolio::index()` | Portfolio showcase | | GET | `/about` | `About::index()` | Experience & background | | GET | `/services` | `Services::index()` | Services offered | | GET | `/project` | `Project::index()` | Project detail page | --- ## Getting Started ### Prerequisites - [Docker](https://docs.docker.com/get-docker/) and Docker Compose installed - Git ### Local Setup ```bash # 1. Clone the repository git clone TokslawMain cd TokslawMain # 2. Copy environment template cp env .env # 3. Set your local container port and UID (edit .env) # CONTAINER_PORT=7083 # UID=1000 # 4. Build and start the container docker-compose up -d --build # 5. Install PHP dependencies (inside the container) docker-compose exec tokslaw-main composer install ``` The site will be available at: **http://localhost:7083** --- ## Environment Variables Copy `env` to `.env` and configure as needed: ```env CONTAINER_PORT=7083 # Port to expose the site locally UID=1000 # Host user UID for file permission mapping ``` No database credentials are required — the site does not use a local database. Blog content is fetched at runtime from the external API. --- ## Docker Details - **Base image**: `php:8.1-apache` - **Published image**: `registry.chiefsoft.net/tokslawcom-web:latest` - **Exposed port**: 80 (mapped to `CONTAINER_PORT` on host) - **Document root**: `/var/www/html/public` - **Restart policy**: `unless-stopped` - **Volumes**: - `./ → /var/www/html` (source code, live-mounted) - `./apache_log → /var/log/apache2` (persistent logs) **PHP Extensions installed in image:** `bcmath`, `bz2`, `calendar`, `curl`, `exif`, `gd`, `gettext`, `iconv`, `intl`, `mysqli`, `pgsql`, `pdo_mysql`, `pdo_pgsql`, `soap`, `tidy`, `xsl`, `zip` + PECL: `xdebug`, `mongodb`, `redis` --- ## Deployment Images are built and pushed to the private ChiefSoft registry: ```bash # Build the image docker build -t registry.chiefsoft.net/tokslawcom-web:latest -f docker/apache/Dockerfile . # Push to registry docker push registry.chiefsoft.net/tokslawcom-web:latest # On the server — pull and restart docker-compose pull && docker-compose up -d ``` > **Note:** `xdebug` is active in the Docker image by default. Disable it in production for performance. --- ## Development ```bash # Run tests composer test # PHP CodeSniffer / CS-Fixer ./vendor/bin/php-cs-fixer fix app/ # CodeIgniter CLI (spark) php spark # View application logs tail -f writable/logs/log-$(date +%Y-%m-%d).log # View Apache logs tail -f apache_log/error.log ``` --- ## PHP Requirements - PHP **8.1 or higher** - Required extensions: `intl`, `mbstring`, `curl`, `json` - Optional: `mysqlnd` (MySQL), `libcurl` (HTTP requests) --- ## License MIT License — see [LICENSE](LICENSE) for details. --- *Built and maintained by Toks Lawal — [tokslaw.com](https://tokslaw.com)*