Context

To support the start of a freelance activity, the goal was to build a fast, maintainable, and secure professional website showcasing a clear home portal, a structured portfolio of past work, and a CV. The site needed a robust technical foundation (custom MVC, DI, middleware pipeline) and a clean content workflow: structured JSON data for non-linguistic fields and dedicated translations files for all FR/EN texts.

Objectives

  • Build a professional freelance portal to present services, CV and portfolio case studies
  • Implement a bilingual FR/EN routing strategy with automatic language detection and URL prefixes
  • Design a clean custom MVC architecture with DI, middleware pipeline and reusable templates
  • Deliver strong baseline security (CSRF, CSP nonce, rate limiting, validation, secure sessions and headers)

Approach

Implementation of a custom MVC architecture in PHP 8+ with a single front controller and a Kernel bootstrapping configuration, sessions and services. A middleware pipeline enforces cross-cutting concerns (maintenance mode, rate limiting, CSRF checks, security headers) before routing dispatch to controllers. A native PHP templating system with layouts/partials and helper functions ensures safe rendering (systematic escaping) and consistent URL generation with language prefixes. Content is split into structural JSON data (portfolios metadata: pillars/year/featured/stack/images) and FR/EN translation files for all texts, loaded via a DataLoader with in-memory caching, year-based sorting and filtering. A dynamic theming system loads custom CSS files and applies configuration variables (colors, spacing, typography) enabling instant theme switching without page reload. Development standards enforce strict types, PSR-4 autoloading, PSR-12 style, PSR-3 logging via Monolog, immutable Request/Response objects and dependency injection through a container.

Deliverables

  • Bilingual (FR/EN) and multi-theme website with language-prefixed routing and automatic detection
  • Custom PHP MVC core (DI container, router, middleware pipeline, controllers, views)
  • Security layer (CSRF tokens, CSP nonce, rate limiter, input validation, secure headers, hardened sessions)
  • Content system based on JSON data + translations with caching, sorting and portfolio filtering

Results achieved

  • Professional, fast and maintainable freelance portal ready for business launch
  • Consistent bilingual experience with SEO-friendly URLs (/fr/*, /en/*) and automatic language selection
  • Safer baseline through multi-layer security controls and systematic output escaping
  • Efficient content workflow: add/update portfolio items via JSON without touching the rendering logic

A similar project?

Let’s discuss your needs and how to apply these methods to your context.