# Tom Girou — PrestaShop Developer & Tech Lead > Certified PrestaShop Expert and tech lead based in France. Custom modules, migrations to PrestaShop 9 and ERP integrations for merchants and agencies. Canonical URL: https://tom-girou.dev/ Last updated: portfolio 2026 ## Identity - Full name: Tom Girou - Role: PrestaShop Developer & Tech Lead (certified PrestaShop Expert, Core and Front) - Current employer: Evolutive (https://www.evolutive.com/) - Based in: France (Loire region — 45.4159939° N, 4.5159721° E) - Working languages: English, French, Spanish - LinkedIn: https://www.linkedin.com/in/tgirou - GitHub: https://github.com/Kaikina - X: https://x.com/kaikina_art - YouTube: https://www.youtube.com/@Kaikina - Reddit: https://www.reddit.com/user/Kaikina/ - PrestaShop forum: https://forum.prestashop.com/profile/1776632-tom-girou/ - Personal site: https://tom-girou.dev/ - Availability: open to PrestaShop lead roles, freelance briefs, and rescue missions ## Positioning Claude writes the code. I decide what good looks like. Hi, I'm Tom. For the last four years I've worked mostly inside PrestaShop: core, modules, migrations, and the ERP sync nobody wants to touch. Stats: - 7+ years of experience - 10+ shipped projects - 8+ clients served ## Core Stack PrestaShop on top, PHP and Symfony underneath. These days Claude does most of the typing. Primary tools: - PrestaShop - PHP - MySQL - Postgres - Symfony - JavaScript Extended toolbelt: Java, Spring Boot, Angular, AWS, Docker, CI/CD, REST API design, ERP integration, WordPress, WP-CLI, TYPO3, Ruby, Perl, Git, Agile estimation, backlog triage, code review, web application security. ## Selected Work A decade of e‑commerce platforms, gift-card systems, and ERP-bound systems — each one shipped, audited, and quietly humming in production. ### 01. Tactical Sports Marketplace — DG-Airsoft Live site: https://www.destockage-games.com/ Stack: PrestaShop, PHP ### 02. Footwear E-commerce — Les Tropéziennes Live site: https://www.lestropeziennes.fr/fr/ Stack: PrestaShop, PHP ### 03. Collectibles Marketplace — Sylvanian Families Live site: https://sylvanianfamilies-boutique.fr/ Stack: PrestaShop, PHP ### 04. Cakes Storefront — Maison Colibri Live site: https://www.maison-colibri.com/fr/ Stack: PrestaShop, PHP ### 05. Wellness & Herbalism Shop — Herbiolys Live site: https://www.herbiolys.fr/fr/ Stack: PrestaShop, PHP ### 06. E-commerce Suite — Thermcross Live site: https://www.thermcross.fr/fr/ Stack: PrestaShop, PHP ### 07. Gift Card Platform — Wedoogift · Pluxee Stack: Java, Spring Boot, Angular ### 08. WordPress Site Generator — Wedoogift · Pluxee Stack: WordPress, PHP, Bash ## Experience A startup, web agencies, an in-house role, and PrestaShop full time since 2022. The early years taught me cloud infra and CI/CD. The last four have been PrestaShop core and modules. ### 2023 — Now — PHP Developer · Tech Lead at Evolutive Technical leadership and full-stack PrestaShop core & module development. Resource planning, Agile estimations, robust API/ERP integrations, and CI/CD quality assurance. ### 2022 — 2023 — PHP Developer at Thermcross Full-stack e-commerce and backend development specializing in PrestaShop integration, custom PHP/PIM applications, and automated ERP data-sync pipelines — all under Agile. ### 2020 — 2022 — R&D Engineer at Emagineurs Full-stack development, API integration and security engineering across TYPO3, WordPress, and Ruby — specializing in financial tools, automation, and web application security. ### 2018 — 2019 — Fullstack Web Developer at Wedoogift Full-stack & DevOps using Angular, Spring Boot, and AWS — built CI/CD pipelines, shipped under Agile, and authored the documentation that scaled with the team. ## Open Source Beyond client work, I give back to the platform I build on every day — patching core, reviewing PRs, and helping move PrestaShop forward in the open. - PrestaShop core contributor as @Kaikina: https://github.com/PrestaShop/PrestaShop/commits?author=Kaikina - Project repository: https://github.com/PrestaShop/PrestaShop ## Certifications Two official PrestaShop Expert certifications — Core for backend and module work, Front for theme and storefront work. Both verifiable on Procertif. - PrestaShop Expert — Core Skills — issued by PrestaShop, verify on Procertif: https://app.procertif.com/parchment/2511TOMGIR400/check - PrestaShop Expert — Front Skills — issued by PrestaShop, verify on Procertif: https://app.procertif.com/parchment/2602TOMGIR716/check ## FAQ The questions that come up most often when someone is considering working with me — answered straight, in my own voice. Translations available at https://tom-girou.dev/fr/#faq (French), https://tom-girou.dev/es/#faq (Spanish) and https://tom-girou.dev/pt/#faq (Portuguese). ### What does Tom Girou do? I'm a PrestaShop developer and tech lead in France, certified PrestaShop Expert (Core and Front). Most of my week goes to PrestaShop 1.7, 8 and 9: custom modules, version migrations, ERP integrations, and stores that need rescuing. I work at Evolutive, a French e-commerce agency, and I'm open to freelance briefs. I've been a developer since 2018, and PrestaShop has been my main job since 2022. ### What's your background? I started as a helpdesk agent at Wedoogift (now Pluxee) in 2016 while finishing my development degree, then moved into full-stack Java / Spring Boot / Angular work there as a work-study developer. After graduating I joined Emagineurs as R&D engineer (TYPO3, WordPress, Ruby, security), then Thermcross as in-house PHP developer on a large-scale PrestaShop migration and ERP integration. Since 2023 I've been at Evolutive as PHP Developer and Tech Lead, focused on PrestaShop core and module work for e-commerce clients. ### Do you specialize in PrestaShop? Yes — PrestaShop is where I spend most of my time, and it's the stack I'd point to first if you're deciding whether I'm the right fit. I work at the core and module level across 1.7, 8, and the current 9 release: custom modules, multishop setups, ERP and third-party integrations, theme work, and the performance and security passes a store accumulates as it grows. I also contribute to PrestaShop core itself under @Kaikina on GitHub, mostly fixing the friction I hit in client work rather than chasing feature tickets. That two-way view — building on top of PrestaShop all day and occasionally patching the thing underneath — is what tends to make the difference on the awkward problems. Most of the projects listed on this site are PrestaShop builds: airsoft, footwear, apparel, collectibles, herbal medicine, HVAC parts. If your project is PrestaShop, it's squarely what I do. ### Can you handle PrestaShop migrations (1.5 → 1.7 → 8 → 9)? Yes — it's some of the work I'm asked for most. I've shipped multi-step PrestaShop migrations across several real projects: large multi-shop migrations, major-version upgrades that needed deep core-level work, and stretches where a legacy install had to keep running in production while its replacement was built alongside it. The same approach carries into PrestaShop 9, the current major release. The version bump itself is rarely the hard part. What eats the time is everything hanging off the shop — third-party and custom modules that assume the old APIs, an ERP sync that has to keep matching orders and stock the whole way through, theme overrides written against internals that moved, and years of business rules buried in the database that nobody documented. So I plan a migration around those risks first and treat the core upgrade as the part that goes to plan, because it usually does and they usually don't. ### What about ERP integrations? Most of the PrestaShop work I do touches an ERP or some third-party system sooner or later, so integration is a core part of the job rather than a side quest. I've connected storefronts to ERPs, market-data feeds, and support tooling, and in practice the integration takes one of three shapes: synchronous webservice calls when the answer has to be live, scheduled cron-driven batches when a nightly reconcile is enough, and queued asynchronous pipelines when the volume is high or the third party is slow and a customer can't be left waiting on it. Picking the wrong shape is where these projects usually hurt — a synchronous call that ties checkout to a flaky ERP, or a batch that quietly drifts out of sync between runs. So the real work isn't writing the connector; it's matching the pattern to the data volume, the SLAs, and how much staleness the business can actually tolerate. I've shipped all three. ### Do you work with non-PrestaShop stacks? Yes. Outside PrestaShop I've shipped production work in Symfony, Java with Spring Boot, AngularJS and modern Angular, Perl (data integration), Slim Framework (greenfield PIM), WordPress with WP-CLI and AWS CloudFormation, TYPO3, and Ruby. AWS infrastructure has been part of several projects — EC2, RDS, S3, CloudFormation, Route 53, Certificate Manager — and I've configured CI/CD pipelines on Jenkins, GitLab, and similar. ### Are you available for freelance briefs or new roles? Yes — I'm open to senior and lead roles, freelance briefs, and the occasional rescue mission on a stalled PrestaShop project. The fastest way to start a conversation is LinkedIn; I read every message. I can engage on short or long missions, remote-first, with on-site possible for the right scope. A typical engagement starts with a 30-minute call to understand the scope and the existing state of the codebase. ### Where are you based and what languages do you work in? I'm based in France, in the Loire region (between Lyon and Saint-Étienne). I work in French (native), English (fluent, daily for technical and business communication), and Spanish (working professional, comfortable for written content). Remote-first across France, the EU, and remote-friendly time zones. On-site is possible only around the Lyon / Saint-Étienne area. ### What's the fastest way to reach you? LinkedIn — linkedin.com/in/tgirou — is the fastest path. I read every message and reply within a few working days. If LinkedIn isn't your channel, my GitHub is github.com/Kaikina, and my personal site (tom-girou.dev) has the latest on my work. For sensitive matters, ask for an email address through LinkedIn and we'll move from there. ### Do you contribute to PrestaShop open source? Yes — I contribute to PrestaShop core under @Kaikina on GitHub. Most of my contributions land where I find friction in client work: bug fixes around invoice numbering concurrency, theme cache issues in multishop, and the kind of long-standing edge cases that aren't worth a full ticket for one team but matter for everyone running PrestaShop. The commit history lives at github.com/PrestaShop/PrestaShop/commits?author=Kaikina. ### Do you still write the code yourself? Honestly, not much. Claude writes most of it now. My job is making sure what it writes meets my standards. I write down the project conventions and the PrestaShop patterns for each version. I set up review passes for security and core compliance, and tests it has to pass before I even read the diff. All of that comes from eight years of seeing what bad code costs six months later. I also helped build the AI toolkit my agency's PrestaShop team uses. A tool makes its user more of what they already are. Give a fine chisel to someone who doesn't know wood and you get mistakes, faster. Give it to someone who does and the work gets better. I saw this when the agency rolled Claude out to the whole team: the gains were very uneven, and they followed experience more than anything else. For a client, nothing changes: a module that follows PrestaShop's rules and won't need rewriting next year. It just arrives sooner. ## Blog Notes from the trenches on PHP, Symfony, PrestaShop, CI/CD, and shipping production software — by Tom Girou, PrestaShop Lead Dev. Feed: https://tom-girou.dev/rss.xml ### Why I Uninstalled rtk: Saving Tokens Isn't Worth a Wrong grep Published: 2026-11-16 · URL: https://tom-girou.dev/blog/why-we-uninstalled-rtk/ Tags: Claude Code, AI Agents, Developer Tools, Bash, Workflow rtk rewrites an AI agent's shell commands to shrink their output. For my unattended Claude Code pipeline it also turned a correct grep into a confident zero, and the agent spent a morning asking me to add a config entry that was already there. This morning my agent pipeline asked me the same question about ten times. Every pass of the triage loop, it checked a config file, found nothing, and wrote in my briefing that an entry was still missing and that I should add it. I had added it at 09:23. The file had 18 matching lines. The agent wasn't lying, exactly. It ran `grep`, `grep` said zero, and it believed `grep`. The problem was that the thing answering wasn't really `grep`. So I uninstalled rtk. Here's why. ## What rtk does **What is rtk?** rtk, "Rust Token Killer", is a small CLI proxy for AI coding agents. You wire it into Claude Code as a `PreToolUse` hook, and every Bash command the agent runs gets rewritten on the way out: `git status` becomes `rtk git status`, `grep` becomes `rtk grep`, `cat` becomes `rtk read`. rtk runs the real command and compresses the output before the model sees it. The pitch is 60 to 90% fewer tokens on routine dev operations. The pitch isn't wrong. A `git log` or a long `ls` is mostly noise to a model, and context is the scarce resource in a long agent session. I installed it, I liked `rtk gain` telling me how much it had saved, and for interactive work I barely noticed it was there. My setup isn't only interactive, though. I run an unattended pipeline (the one I mentioned in the [disk-full post](/blog/disk-full-ssh-rescue/)) that polls Jira and Gmail, writes me a morning briefing, and takes queued tickets all the way to a draft merge request. Headless `claude -p` runs, on systemd timers, with nobody watching the transcript as it happens. That's where it went wrong. ## The zero that wasn't **What actually broke?** A worker job for a client shop needed to reproduce a front-end bug in a real browser. I'd said yes to giving the worker the `chrome-devtools` MCP tools, and the allowlist in `settings.worker.json` got its 18 new entries. The triage loop's job was to notice that and stop asking. Here's what it ran, and what came back: ```bash $ /usr/bin/grep -c chrome-devtools config/settings.worker.json 🔍 0 for 'chrome-devtools' ``` The agent even used the absolute path to `grep`, which looks like it was trying to get around something. The hook rewrote it anyway. The real answer: ```bash $ jq -r '.permissions.allow[] | select(startswith("mcp__chrome"))' config/settings.worker.json | wc -l 18 ``` That "🔍 0" landed in my briefing as a fact: *chrome-devtools is still missing (0 occurrences, re-checked 09:35)*. Each pass re-checked it, got the same answer, and wrote the same sentence with a fresher timestamp. The re-checking made it look more reliable than it was. ## It wasn't the first time **Was this a one-off?** No, and that's the part that bothers me most. Going back through the pipeline's notes, the agent had been fighting rtk for days and writing down workarounds as it went: - On November 11, a `grep "a\|b"` with an alternation returned 0 with no error. Three questions I had already answered got reported as still open. - Flags like `-n`, `-E`, `-c` sometimes failed with `error: unexpected argument '-n' found`, because `rtk grep` only accepts `PATTERN [PATH]`. - On November 15, `cat a.md b.md > report.md` got rewritten into `rtk read`, which refuses more than one file. The shell had already truncated `report.md` by then. My daily report was empty and had to be rebuilt from a backup. - `git -C …` became `rtk git -C …`, which rtk refused. I ended up writing a dedicated `git.sh` wrapper partly to dodge that. - `ls` on several directories merged everything into one list with no headers, so you couldn't tell which file lived where. None of these is a huge bug on its own, and some may be fixed in newer versions (I was on 0.18.1). What adds up is the folklore. My agent's memory had a whole note called "rtk grep pitfalls": one pattern per grep, never trust a zero, concatenate with `tail -n +1` instead of `cat`. The agent was spending its attention learning the quirks of a tool whose only job was to save it attention. ## Why the trade doesn't work for agents **Why not just keep it and be careful?** Because a token saved is only worth something if the answer is still right, and for a lot of commands the output *is* the answer. `grep -c` returning `0` isn't verbose noise to be squeezed. It's a yes/no question, and getting it wrong is worse than paying for an extra 200 tokens. A human using rtk in a terminal sees "🔍 0", frowns, and opens the file. An agent running alone at 6 a.m. doesn't frown. It writes the zero into a report, asks me to fix something that isn't broken, and parks a job on it. Unattended, a transparent rewrite becomes a silent one. I had no idea `grep` wasn't `grep` until I read the raw transcript. There was a second cost, which I only saw once I stopped believing the briefing. The worker had actually run the job at 09:31 with the browser tools loaded and working. It had parked for a completely different reason: the staging URL was filed under another ticket's notes. The fake "missing config" story hid the real blocker for an hour. A wrong answer cost me more than the tokens it saved, and it also sent me looking in the wrong place. ## How I removed it **What did uninstalling involve?** Not much, which is one nice thing about the hook design: 1. Remove the `PreToolUse` hook that calls `rtk-rewrite.sh` from `~/.claude/settings.json`. 2. Drop the `@RTK.md` include from the global `CLAUDE.md`, so the agent stops being told to use rtk commands. 3. Remove `Bash(rtk git:*)` from the pipeline's allowlist. 4. Replace the agent's "rtk pitfalls" memory with a short note: rtk is gone, `grep` and `cat` behave normally again, use `jq` to check JSON anyway. Then a `sudo rm` on the binary, and it was gone. ## What I'd tell someone installing it **Should you use rtk?** If you're at the keyboard watching the agent, maybe. The savings are real and you'll catch the weird outputs. If anything runs unattended, I wouldn't put a layer between the agent and its tools that changes what the commands *mean* and not only how much they print. Or at least I'd keep it away from anything whose output gets read as a yes or no. I'll take the bigger context bill. Tokens are cheap next to a morning of an agent confidently asking me to fix something that wasn't broken. ### My Disk Hit Zero and Froze the Laptop. The Phone SSH Setup Got Me Back In Published: 2026-11-13 · URL: https://tom-girou.dev/blog/disk-full-ssh-rescue/ Tags: Tailscale, SSH, Termius, Linux, Docker A full disk froze my Linux laptop: dead mouse, dead keyboard, my self-hosted sites returning 500. The Tailscale and Termius setup from July still let me in over SSH, and I freed nearly 90 GB from my phone before a reboot. In July I wrote about [driving Claude Code from my phone](/blog/claude-code-from-my-phone/) over Tailscale and Termius. I pitched it as a comfort thing: resume a session from the couch, check a container from the train. This morning it was the only way into my own computer. ## Less than 1 MB free **What happened?** I woke up, walked past my desk on the way to the gym, and the screen was covered in warnings. Claude, Brave, a few others, all saying the same thing: less than 1 MB of free disk space, clean up if you want to keep using your apps. Fair enough. I grabbed the mouse and the cursor didn't move. Keyboard, nothing. The laptop was frozen. This machine also hosts things. The blog you're reading runs on it, and so does [Forgemage.net](https://forgemage.net), both going out through a Cloudflare Tunnel. I checked them on my phone: error 500 on both. Apps that can't write their cache don't serve pages. Then the screen switched to the boot logo, as if the laptop were trying to restart the session. It stayed there. No login screen, no desktop, no way in from the keyboard. ## The way in was still open **Could I still reach the machine?** I remembered the July setup. Termius on the phone, tap the host, wait. It connected. A prompt, on a laptop whose own keyboard was dead. I think I know why, though I didn't dig further. A desktop session writes all the time (caches, logs, its own state), and with nothing left on the disk it couldn't. An SSH login over Tailscale barely writes anything. `tailscaled` was still running, it answered, and bash started. The first command confirmed the rest: ``` $ df -h / Filesystem Size Used Avail Use% Mounted on /dev/nvme0n1p2 468G 444G 158M 100% / ``` 158 MB left on a 468 GB disk. ## Cleaning from a phone keyboard **Where did the space go?** A `du` over my home directory, sorted by size, then I went for what's safe to delete without thinking twice: - Docker build cache: 24.5 GB - the Trash: 6.1 GB - `~/.cache` (JetBrains, Brave, Yarn, Composer and the rest): about 9 GB - anonymous Docker volumes: 0.4 GB That alone brought the disk to 44 GB free. Most of what was left in unused Docker volumes was databases, and dropping a database volume means re-importing a dump the next time I open that project. So I went through the list one by one and only deleted seven, all from projects I'm not working on anymore. Another 9.5 GB. Then the second round: the Codeium cache, every git worktree whose ticket was already merged, agent logs older than a week, archives in my Downloads folder that I had already extracted, and the Trash again. The worktrees took the most care. I keep one per ticket, and one client project alone had 38 of them. `git fetch` failed, because my SSH key isn't loaded in a session opened from the phone, so I checked each ticket's status in Jira instead and only removed the ones that were done, merged or deployed. Before deleting anything I saved every uncommitted diff into a 2.3 MB tarball, just in case. That was 35 worktrees, about 13 GB. For the archives, I compared the file count in each zip with the extracted folder next to it. One folder had 10,579 files out of 23,108. That zip stayed. Agent logs went from 3.1 GB to 789 MB. Codeium had 7.6 GB I'd forgotten about. And the system journal was about 4 GB on its own: ```bash sudo journalctl --vacuum-size=200M sudo apt clean ``` ## Rebooting from the phone **Did the reboot work?** With the disk breathing again, I typed `sudo reboot` and watched the SSH session drop. Then I waited, phone in hand, not sure what I'd get. At 08:45 the laptop showed the login screen, with a working keyboard and a working mouse. The blog and Forgemage.net came back with their containers. `df` now says 89 GB free, from 158 MB. ## Second time in ten days **Why did the disk fill up?** This wasn't the first warning. On November 4 I had already cleaned the disk because it was full. Nine days later it was full again, and this time badly enough to take the desktop down. So it isn't bad luck. Docker builds all day, an agent pipeline writing logs around the clock and a fresh worktree for every ticket fill 468 GB faster than I'd have guessed. The fixes are boring, and I should have set them up in July. The journal cap is one command: ```bash sudo sed -i 's/^#\?SystemMaxUse=.*/SystemMaxUse=200M/' /etc/systemd/journald.conf sudo systemctl restart systemd-journald ``` The rest is a weekly `docker builder prune`, a cron that deletes old agent logs, removing the worktree when its merge request is merged, and an alert on my phone well before 100%, while the apps are still running. ## What I take from it **Was the phone setup worth it?** I set it up for comfort. Today it was the recovery path. The desktop was gone and the keyboard was dead, but the SSH daemon kept answering because it needs almost nothing to run. I didn't plan for that. Half an hour of cleanup on a phone keyboard isn't fun. It still beats unscrewing the laptop to pull the drive, or reinstalling from a USB stick before my first coffee. Now I'm going to the gym. Late. ### Peru's Buses Never Sleep: 24 Hours of Intercity Traffic on One Map Published: 2026-11-02 · URL: https://tom-girou.dev/blog/peru-24h-bus-map/ Tags: Data Visualization, Open Data, Python, Peru, Side Project I mapped every intercity bus and train I could find for one Wednesday in Peru: 1,659 bus departures and 37 trains. The busiest hour is 11 p.m., two trips in three touch Lima, and the Andes and the Amazon get less than their share. A video went around LinkedIn recently: every train in France over 24 hours, animated on a map. I wanted the same thing for Peru. Peru doesn't really have passenger trains between cities, though. It has buses. Thousands of them, run by hundreds of companies, and no public timetable that covers them all. So the map below took more digging than drawing.
One Wednesday, 11 November 2026. Drag to move, Ctrl + scroll (or two fingers) to zoom, hover a dot to see its route. The ⛶ button goes fullscreen.
## What the map shows **What am I looking at?** Each amber dot is a bus, each blue dot a train. They move along the real roads and tracks at the times the operators publish. The clock runs from midnight to midnight, and buses that leave in the evening and arrive the next morning show up at both ends of the day, so the loop reads as a typical day rather than a cold start at 00:00. There are 1,659 bus departures and 37 train runs in it. I'll get to where they come from at the end. First, what surprised me. ## The country drives at night **Does the traffic ever stop?** No. I expected the map to go quiet after midnight, the way most transport maps of European countries do. It does the opposite. The fewest buses on the road are at 1 p.m. (412 of them). The most are at 11 p.m. (1,035). The evening is when Peru leaves. 46% of all departures happen between 6 p.m. and midnight, and the 8 p.m. hour alone has 178. Six trips in ten are still rolling when the clock passes midnight. It makes sense once you look at the distances. The median trip in the data is 422 km and lasts 8.6 hours. Lima to Arequipa is 1,002 km and about 17 and a half hours. If you leave at 8 p.m. you sleep in the seat, skip a hotel night and arrive with a full day ahead of you. I knew this in theory. Seeing a thousand dots wake up at dusk is something else. ## One long line down the coast **Where does the traffic actually go?** Mostly along the Panamericana. From Tumbes at the Ecuador border down to Camaná, the coast is one continuous string of buses, and it only turns inland towards Arequipa and Tacna. 87% of the trips touch a coastal town, and half of them never leave the coast at all. Then there is Lima. 63% of all trips start or end there, and the capital has direct buses to 115 different places. Lima to Trujillo alone has 115 departures on a Wednesday. If you squint at the animation at night you can see it: the coast is a conveyor belt with Lima in the middle. ## The south: far, not forgotten **Are Tacna and Puno as isolated as they look?** Only half. My first impression was that the south is poorly served: Tacna and Puno look like islands at the bottom of the map. The numbers say something more specific. Per inhabitant, they get about as many buses as the big northern coastal cities. Tacna has 77 trips a day for roughly 286,000 people, about the same rate as Trujillo. Puno, smaller, has 68. What they lack is a link to Lima. Only 10 buses a day go from Lima to Tacna, and the trip takes 21 hours for 1,224 km. Lima to Puno is 4 buses and more than 23 hours. Instead, the south runs its own network. Tacna's busiest connections are Arequipa (26 trips) and Ilo (20). Puno's are Cusco (33) and Arequipa (25). Only 13% of Tacna's trips and 6% of Puno's involve Lima at all. They look isolated on the map because their buses spread out over a thousand kilometres of road, not because nobody goes there. ## The Andes and the Amazon get less than their share **Is the sierra really cut off?** Compare two trips of the same length. Lima to Trujillo, 557 km along the coast: 115 buses. Lima to Ayacucho, 568 km into the mountains: 24. To go further I tagged every town in the data by natural region: sierra above 2,000 m, then coast or jungle depending on which side of the Andes it sits (Arequipa, at 2,300 m, counts as sierra). The 2017 census puts 58% of Peruvians on the coast, 28% in the sierra and 14% in the selva. The trip ends in my data split 69%, 24% and 7%. The sierra is a bit below its weight. The jungle gets half of it. And mountain towns mostly hang off the capital rather than off each other: 73% of Ayacucho's trips go to or from Lima, 70% of Huaraz's, 65% of Huancayo's. There are 437 coast–sierra trips in the data and only 156 that link two Andean towns. The selva is worse. Pucallpa, one of the largest cities in the Amazon, has 10 buses a day, 9 of them to Lima, and they take 17 hours for 768 km. That's 45 km/h on average. Iquitos doesn't appear on the map at all: no road reaches it. You fly, or you spend days on a river boat, and I left flights and boats out on purpose. So my first impression holds for the mountains and the jungle, with one caveat that deserves its own section. ## What the map doesn't see **How far should you trust these numbers?** Further for the coast than for the rest. The big operators I could read timetables from are coast-heavy: 624 of their trips go to coastal towns, 155 to the sierra and 45 to the jungle. Everyone else comes from government permits, which undercount (more on that below). On top of that, a lot of Andean and Amazonian travel happens in vans, shared taxis and small local companies that publish nothing. Juliaca shows only 10 trips, which is clearly wrong for a city that size: many buses to Puno stop there, but I only record where a trip starts and ends. Civa, one of the big national operators, isn't scraped either because its site blocks automated access. It only appears through its permits. All of that pushes in the same direction: the real sierra and selva are busier than the map. Part of the gap is my data. I can't say how much. ## How it was built **Where do you even get bus timetables for Peru?** There's no GTFS feed for intercity buses in Peru and no open dataset of routes. What exists is paperwork. Every company needs a route permit from the Ministry of Transport (MTC), and those permits are published as PDFs on gob.pe. Each one lists the itinerary, the days of the week and the authorised departure times. So step one was a scraper for the gob.pe listing (1,649 documents), then `pdftotext` and a parser for the two templates the ministry has used over the years. 1,146 permits came out with a usable schedule. 181 were scanned images, and I skipped those rather than OCR them. Step two came after a bad surprise. The permits list what a company is *allowed* to run, and the big operators run far more. Cruz del Sur had 6 Wednesday departures in its permits and 199 on its own website. So for eight large operators (Cruz del Sur, Oltursa, Movil Bus, Ittsa, Emtrafesa, Transportes Línea, Flores and PerúBus) I read their public ticket search pages for Wednesday 11 November instead. One bus is often sold as several tickets, one per city pair and per Lima terminal, so those listings had to be merged back into single buses by trip number or departure time. That gave 824 buses. The permits of every other company added 835. The rest is plumbing. The 759 towns are geocoded offline with GeoNames. Roads come from OpenStreetMap, routed with a local OSRM server, and when an operator doesn't publish an arrival time the trip gets the car time × 1.20, the median ratio I measured on 654 trips that have both. The trains are the PeruRail timetable typed in by hand and drawn on the OpenStreetMap rail tracks. The map itself is deck.gl on top of MapLibre with a CARTO basemap, and the video version is rendered frame by frame in headless Chromium and stitched together with ffmpeg. One mistake worth mentioning: the first version asked the router for *simplified* road shapes, about one point every 30 km. On the coast nobody would notice. In the Andes the dots cut straight across the switchbacks, and the drawn lines were on average 11% shorter than the real roads (Lima–Huancayo was drawn at 270 km for a 304 km road). Full geometry fixed it. I built most of this over a few sessions with Claude Code, which did a lot of the scraping and parsing grunt work while I decided what to look at. The widget above is a static page served from this site with its own content security policy, so nothing loads from anywhere except the map tiles. ## Takeaways **What did a day of buses teach me?** 1. **Peru's intercity network is busiest at night.** The low point is lunchtime, and even then 400 buses are on the road. 2. **It's a coast with Lima in the middle.** Two trips in three touch the capital, and the Panamericana carries most of the rest. 3. **Distance isn't isolation.** Tacna and Puno are far from Lima but well tied to Arequipa and Cusco. The places that are really underserved are in the mountains and the jungle. 4. **Official data tells you what's allowed, not what happens.** The permits missed 97% of Cruz del Sur's buses. Without the operators' own sites, this map would show a much emptier country. If you know Peru's roads and something here looks wrong to you, I'd like to hear it. The dots are only as good as the timetables behind them. ### Three Strings and Two Fallbacks: Wiring the Native Share Sheet Into Forgemage.net Published: 2026-08-27 · URL: https://tom-girou.dev/blog/forgemage-native-share-sheet/ Tags: JavaScript, Web Share API, Symfony, Twig, Progressive Enhancement The share button on Forgemage.net's request detail page opens the OS share sheet wherever the operating system has one — Android, iOS, Windows, macOS — copies the link where it doesn't, and stays quiet when you simply change your mind. Here's the whole implementation: navigator.share with three strings, an AbortError guard that falls through instead of catching, a clipboard fallback with an execCommand fallback under it, and the one-letter Symfony detail that decides whether the shared link works at all. Every mobile app has that button. You tap it, a tray slides up from the bottom of the screen, and there's WhatsApp, Messages, AirDrop, Notes, Discord, whatever you happen to have installed. For years that tray was native-only territory, and the web's answer was a row of brand icons opening `twitter.com/intent/tweet` in a new tab. The tray is available to web pages now. `navigator.share()` opens the exact same OS sheet, and the happy path is six lines. I shipped it last week on [Forgemage.net](https://forgemage.net), the Dofus smithmagie marketplace I keep writing about after [taking the N+1 out of its search page](/blog/forgemage-search-n1-queries/). A smithmage opens a magging request, wants to send it to a friend who might take the job, and until last week the only way to do that was selecting the URL bar on a phone. Now there's a Share button next to Archive. The six lines were the easy part. What took the afternoon was everything around them: where the URL comes from, what happens when someone swipes the sheet away, and what the button should do in a browser whose OS has no share sheet at all. ## The API is three strings and a promise **What does the browser actually hand you?** Not much, and that's the appeal: ```js await navigator.share({ title: 'Magging Request Details', text: 'Someone wants a Gelano maged', url: 'https://forgemage.net/request/01JQ...', }); ``` Three optional strings, plus a `files` array. No SDK, no app ID, no OAuth dance, no script tag from a company that would like to A/B test my page for me. Two hard requirements, though. The page has to be a secure context, so HTTPS in production and localhost while you work. And the call has to happen inside a real user gesture. Not on `DOMContentLoaded`, not in a `setTimeout`, and — this is the one that catches people — not after an `await` that goes to the network. Fetch a short link from your own API and *then* call `share()`, and the transient activation is gone and the browser rejects you. Whatever you're going to share has to be sitting in memory before the click. ## Where the URL comes from decides whether the link works **Why not just share `location.href`?** Because on Forgemage.net the address bar isn't reliably the thing worth sending. The request detail route is localized, so the same page lives at `/request/{ulid}` in English, `/requete/{ulid}` in French and `/pedido/{ulid}` in Spanish. Several of the interesting entry points are dashboard views whose visible URL carries query state nobody else needs. So the URL comes from the server, in the markup: ```twig ``` The important character in there is the `u` in `url()`. Symfony's `path()` generates `/request/01JQ…`, which is perfect for an `href` and useless in a share payload: pasted into Discord it isn't a link, and a native target has no idea what host to prepend. `url()` gives the absolute form. One letter between a working feature and a bug report that says "the link doesn't open". The rest of the attributes exist because JavaScript can't reach the Twig translator. The label, the confirmation string and the share title are rendered server-side into `data-*` and read back at click time. Slightly ugly, and the alternative is shipping a translation catalogue to the client so a button can say "Copied" in three languages. The ULID is doing quiet work too. The route is `/{ulid:fmRequest}`, so shared links aren't guessable the way sequential ids are. Nobody's going to walk `/request/1`, `/request/2` and read the whole table because I put a share button on the page. ## One fallthrough handles every failure **What happens when the sheet doesn't open?** This is the entire share handler, and its shape is the only real decision in the file: ```js async function share(button) { const url = button.dataset.shareUrl || window.location.href; if (navigator.share) { try { await navigator.share({ title: button.dataset.shareTitle || document.title, url }); return; } catch (error) { if (error.name === 'AbortError') { return; } } } if (await copyToClipboard(url)) { confirmCopy(button); } } ``` Two `return`s and no `else`. The success path returns, the cancel path returns, and everything else falls out of the `if` and lands on the clipboard: no `navigator.share` at all, a `NotAllowedError` from a lost gesture, a `DataError` from a URL that doesn't parse, a Permissions Policy blocking the call inside an iframe. I never had to enumerate the failures. I only had to name the two cases where doing nothing is the correct behaviour. `AbortError` is the one worth being careful about. It's what you get when the user swipes the sheet away, and it arrives as a rejected promise looking exactly like a real problem. Catch it generically and you show "Sharing failed" to somebody who simply changed their mind, which is the kind of small thing that makes software feel like it isn't paying attention. Cancelling is a successful outcome of a share sheet. It just isn't a share. The other quiet win is desktop, and it isn't the one I expected. The share sheet isn't a phone feature: Chrome and Edge on Windows hand the payload to the Windows share flyout, and Safari on macOS opens the same sheet any Mac app gets. What decides it is whether the OS has a share UI and the browser bothers to wire it up. Linux doesn't have one, so `navigator.share` is undefined and my own Chrome copies the link instead — the fallback was the only path I saw for the first hour of building this. Firefox on desktop doesn't implement it anywhere. All of that is one `if` and no feature flag: the markup ships one button and each browser decides what it means. ## The fallback has a fallback **Why keep `document.execCommand('copy')` around in 2026?** Because `navigator.clipboard` needs a secure context and a permission that can be refused, and a copy button that silently does nothing is worse than no copy button: ```js async function copyToClipboard(text) { try { await navigator.clipboard.writeText(text); return true; } catch { const field = document.createElement('textarea'); field.value = text; field.setAttribute('readonly', ''); field.style.position = 'fixed'; field.style.opacity = '0'; document.body.append(field); field.select(); const copied = document.execCommand('copy'); field.remove(); return copied; } } ``` The off-screen textarea trick is deprecated, works nearly everywhere, and returns a boolean I can act on. Note the `opacity: 0` with `position: fixed` rather than `display: none` or a negative offset: the field has to be selectable, so it can be invisible but it can't be gone, and it shouldn't scroll the page on the way in. It also has to come out in the same tick, otherwise a slow frame leaves a real focusable element in the DOM for a screen reader to find. Both paths return a boolean rather than throwing, which is why the caller reads as one clean `if`. ## The button has to answer **How does the user know anything happened?** On the native path they know, because the OS drew a sheet over the page. On the clipboard path nothing visible happens at all, so the button says it itself: ```js function confirmCopy(button) { const label = button.querySelector('.rd-share__label'); const icon = button.querySelector('i'); const original = label.textContent; button.classList.add('is-copied'); label.textContent = button.dataset.copiedLabel || 'Copied'; icon.className = 'bi bi-check2'; setTimeout(() => { button.classList.remove('is-copied'); label.textContent = original; icon.className = 'bi bi-share-fill'; }, 1800); } ``` Icon becomes a checkmark, label becomes the translated "Copied", both go back after 1.8 seconds. No toast library, no notification container, no state store. The feedback lives on the element the user just touched, which is where their eyes already are. Reading `original` off the DOM instead of hardcoding "Share" is what makes the restore correct in French and Spanish. And 1800 is a number I picked because 1000 felt clipped and 3000 felt like the button was stuck. ## What I left out on purpose **Why is there no `text`, and no image?** The payload is `title` and `url`, nothing else, and that's deliberate. The spec is explicit that all three fields are hints: the receiving app decides what to do with them, and several targets take exactly one of `text` or `url` and drop the other on the floor. Passing both is how you end up with a message that describes a magging request without linking to it. If the link is the point, send the link. `title` is mostly ignored too. Android Chrome uses it as the subject line for mail targets and discards it elsewhere. I pass it because when it does get read it's the right string, and when it doesn't, nothing is lost. Files would be the obvious next step, since a request detail page has an item and a stat line that would screenshot nicely: ```js if (navigator.canShare?.({ files: [file] })) { await navigator.share({ files: [file] }); } ``` `canShare()` is the only honest way to find out whether the platform accepts that MIME type and that size, and it shipped later than `share()` itself, hence the optional call. I skipped all of it. Rendering an image server-side, prefetching it before the click so the user gesture survives, and accepting that several platforms ignore `url` when `files` is present is a feature, not a fallback. Different afternoon. Same for the other direction. A PWA can register itself *inside* the sheet with `share_target` in its manifest and receive a plain multipart POST, which any Symfony controller already knows how to read. Android only, nothing on iOS, and Forgemage.net isn't installable yet. ## The bits I'm not proud of **What's still owed?** The shared link hits a login wall. `RequestController::detail()` calls `denyAccessUnlessGranted('ROLE_USER')`, so a friend who taps the link without an account lands on a login page instead of the request. Correct for the data, rough as a first impression for a link somebody chose to send. A public teaser view would fix it and I haven't built one. The locale rides along. `url()` generates the path for the sharer's locale, so a French smithmage sharing to a Spanish friend sends them `/requete/…`, and the app serves it in French. Sharing arguably wants a locale-neutral canonical URL. I send the localized one because that's what the route helper gives you without thinking about it. The button markup exists twice in `detail.html.twig`, once in each branch of the owner/visitor condition, all three `data-*` attributes duplicated. It should be a component or an include taking the request. It's a copy-paste, and I noticed it while writing this paragraph rather than while writing the template. And I have no idea whether anyone uses it. No event, no counter, nothing. The honest version of this post opens with a number instead of a story. ## Takeaways 1. **The gesture is the constraint, not the API.** `navigator.share()` is three strings, and the main way to get it wrong is to `await` something else first. Build the payload before the click, or share a URL you already have. 2. **`AbortError` means "no, thanks".** Treat a dismissed sheet as a failure and your app tells people off for changing their mind. Two `return`s in the right place, and every other failure can share one fallback. 3. **Absolute URLs or nothing.** In Symfony that's `url()`, not `path()`. A relative link in a share payload stops being a link the moment it leaves the browser. 4. **Feature-detect to reshape the button, not to hide it.** One `