Architecture
php bin/console db:build rebuilds both SQLite databases. During a visit, the site only reads.Context
A bilingual portfolio built from scratch. Router, controllers and views written by hand, content stored in two SQLite databases, one per language. No library, on the server or in the browser.
The idea
A portfolio that proves what it claims. The numbers on the home page come from the database, the Skills page shows the actual SQL query, and the code is public.
The constraints
No framework, no CMS. Everything has to run on a plain PHP server, load fast and stay readable on a phone, in French and in English.
What I built
-
A bilingual router
Every route exists in both languages, with its own paths:
/projetsbecomes/en/projects. Switching language keeps the current page. -
Content in a database
The texts are written in PHP, then
db:buildfills one SQLite database per language. The numbers and lists on the site are real queries. -
The SQL console
On the Skills page, visitors tick filters and see the query. Every value goes through an allow list and bound parameters: what is shown is what runs.
-
A checked translation
php bin/console i18n:checkcollects every text on the site and flags the ones with no English translation. -
Security headers
A strict Content Security Policy,
X-Frame-Options,nosniff. No external script, and the YouTube video only loads on click. -
Light and accessible
No JavaScript library, self-hosted fonts, animations turned off for people who disable them. Layout checked from 320 to 1500 pixels wide.
Code excerpts
Code copied as is from the repositories:
public function withSecurityHeaders(): self
{
$clone = clone $this;
$clone->headers += [
'X-Content-Type-Options' => 'nosniff',
'X-Frame-Options' => 'DENY',
'Referrer-Policy' => 'strict-origin-when-cross-origin',
'Permissions-Policy' => 'camera=(), microphone=(), geolocation=(), interest-cohort=()',
'Cross-Origin-Opener-Policy' => 'same-origin',
'Content-Security-Policy' => implode('; ', [
"default-src 'self'",
"script-src 'self'",
"style-src 'self' 'unsafe-inline'",
"img-src 'self' data:",
"font-src 'self'",
"connect-src 'self'",
'frame-src https://www.youtube-nocookie.com',
"object-src 'none'",
"base-uri 'self'",
"form-action 'self'",
"frame-ancestors 'none'",
]),
];
return $clone;
public function __construct(array $domains, array $statuses, string $order, string $locale = 'fr')
{
// array_intersect garde l'ordre de la liste blanche et écarte toute valeur inconnue.
$this->domains = array_values(array_intersect(self::DOMAINS, $domains));
$this->statuses = array_values(array_intersect(self::STATUSES, $statuses));
$this->order = in_array($order, self::ORDERS, true) ? $order : 'niveau';
$this->dialect = self::DIALECTS[$locale] ?? self::DIALECTS['fr'];
}
array_intersect only keeps known values: nothing the visitor types reaches the query as is.
Stack
Backend
PHP 8.5
PDO
Composer
Frontend
JavaScript
HTML / CSS
Data
SQLite
Tools
Git
Claude Code
BTS SIO framework
The framework competencies this project puts to work.
B1IT service support and delivery
B1.3Develop the organisation's online presenceB1.4Work in project modeB1.5Make an IT service available to usersB1.6Organise one's professional development
B2Application design and development (SLAM)
B2.1.1Model an application solutionB2.1.3Develop an application solutionB2.1.4Design and build a user interfaceB2.2.4Update technical and user documentationB2.3.1Design or adapt a databaseB2.3.2Carry out operations on a database