SAAS ARCHITECTURE · MARRAKECH · 21 YEARS OF EXPERIENCE ARCHITECTURE SAAS · MARRAKECH · 21 ANS D'EXPÉRIENCE SAAS ARCHITECTURE · مراكش · 21 عام دالخبرة

Your SaaS deserves
a 2026 architecture,
not a 2015 one.
Votre SaaS mérite
une architecture de 2026,
pas de 2015.
SaaS ديالك يستاهل
architecture دي 2026،
ماشي دي 2015.

4YA designs React 19 / Vite / Go / Cloudflare Edge SaaS architectures — for products that scale without breaking, even at 10× the initial traffic. Firm based in Marrakech, clients all over Morocco and internationally. 4YA conçoit des architectures SaaS React 19 / Vite / Go / Cloudflare Edge — pour des produits qui scalent sans se casser, même à 10× le trafic initial. Cabinet basé à Marrakech, clients partout au Maroc et à l'international. 4YA كتصمم architectures SaaS ب React 19 / Vite / Go / Cloudflare Edge — باش المنتجات ديالك يكبرو بلا ما يتكسرو، حتى ب 10× ديال traffic ديال البداية. الكابيني فمراكش، الكليان فكل المغرب وبرّا.

Audit my architecture → Auditer mon architecture → دير audit ل architecture ديالي → Read 21 years of lessons Lire les leçons de 21 ans قرا الدروس ديال 21 عام

No commitment · Reply within 24h Sans engagement · Réponse sous 24h بلا التزام · جواب فأقل من 24 ساعة

What sets us apart from a "web agency" Ce qui nous différencie d'une "agence web" شنو كيميزنا عن "agence web"

4YA is an engineering firm — not an agency. The distinction is not just semantics. 4YA est un cabinet d'ingénierie — pas une agence. La distinction n'est pas sémantique. 4YA هي كابيني ديال engineering — ماشي agence. الفرق ماشي غير فالكلمات.

21
Years of international experience Ans d'expérience internationale عام ديال الخبرة العالمية
3
Continents · projects delivered Continents · projets livrés قارات · بروجي مسلمين
0
Untested "framework of the moment" Framework "du moment" non éprouvé Framework "ديال الموضة" غير مجرّب
Go
Main backend — not Node.js Backend principal — pas Node.js Backend الرئيسي — ماشي Node.js
Edge
First deploy, not the last Premier déploiement, pas le dernier أول deploy، ماشي اللور
AI
Built into the architecture, not bolted on Intégrée à l'architecture, pas greffée مدمجة فل architecture، ماشي مزيدة من برّا

Our 6 SaaS architecture principles in 2026 Nos 6 principes d'architecture SaaS en 2026 6 مبادئ ديالنا ل architecture SaaS ف 2026

What every serious architecture must respect — and what most agencies ignore. Ce que toute architecture sérieuse doit respecter — et ce que la plupart des agences ignorent. شنو كل architecture جدية خاصها تحترم — و شنو لي كيتجاهلوه أغلب الوكالات.

PERFORMANCE PERFORMANCE PERFORMANCE

Edge-First by default Edge-First par défaut Edge-First بشكل افتراضي

Static assets, stateless APIs and SSR rendering run on Cloudflare Workers — not on a VPS in Frankfurt. Result: TTFB <50ms for your Moroccan users. Les assets statiques, les API sans état et le rendu SSR tournent sur Cloudflare Workers — pas sur un VPS à Francfort. Résultat : TTFB <50ms pour vos utilisateurs marocains. الـ assets الثابتة، الـ APIs بلا حالة، والـ SSR كيخدمو على Cloudflare Workers — ماشي على VPS ففرانكفورت. النتيجة : TTFB <50ms للمستخدمين المغاربة ديالك.

BACKEND BACKEND BACKEND

Go for critical APIs Go pour les APIs critiques Go للـ APIs الحساسة

Node.js is great for prototyping. Go is built for production: 10× more concurrency, stable memory, single binary. For sensitive or high-frequency data endpoints, Go is the rational choice. Node.js est excellent pour prototyper. Go est adapté à la production : 10× plus de concurrence, mémoire stable, binaire unique. Pour les endpoints de données sensibles ou haute fréquence, Go est le choix rationnel. Node.js مزيان للـ prototyping. Go مناسب للـ production : 10× ديال concurrency، الميموار ثابتة، binary واحد. للـ endpoints ديال الداتا الحساسة ولا السريعة، Go هو الاختيار العقلاني.

FRONTEND FRONTEND FRONTEND

React 19 + Vite — zero bundler debt React 19 + Vite — zéro dette bundler React 19 + Vite — بلا دين ديال bundler

Vite replaces Create React App. 50× faster build, instant HMR, automatic code-splitting. React 19 with Server Components for data-heavy views. Vite remplace Create React App. Build 50× plus rapide, HMR instantané, code-splitting automatique. React 19 avec Server Components pour les vues lourdes en données. Vite كيعوّض Create React App. Build 50× أسرع، HMR فوري، code-splitting أوتوماتيكي. React 19 مع Server Components للـ views ثقيلة فالداتا.

DATA DATA DATA

PostgreSQL + pgvector PostgreSQL + pgvector PostgreSQL + pgvector

A single engine for transactional data AND vector search (RAG). No Redis + Pinecone + MongoDB stack to manage. Less attack surface, lower cost, more consistency. Un seul moteur pour les données transactionnelles ET la recherche vectorielle (RAG). Pas de stack Redis + Pinecone + MongoDB à gérer. Moins de surface d'attaque, moins de coûts, plus de cohérence. محرك واحد للداتا transactionnelle و للـ vector search (RAG). بلا stack Redis + Pinecone + MongoDB باش تسيّر. أقل surface d'attaque، أقل تكاليف، أكثر تماسك.

AI IA AI

Agentic-ready by design Agentic-ready dès la conception Agentic-ready من البداية

AI is not a module to plug into an existing SaaS. It needs a specific data, event and audit architecture. We design for that from day 1. L'IA n'est pas un module à plugger sur un SaaS existant. Elle nécessite une architecture de données, d'événements et d'audit spécifique. On conçoit pour ça dès le jour 1. الـ AI ماشي module كتزيدو على SaaS موجود. كتحتاج architecture خاصة ديال الداتا، الأحداث والـ audit. كنصممو على هاد الأساس من اليوم 1.

SECURITY SÉCURITÉ الأمان

CNDP Compliance by Design Conformité CNDP by Design امتثال CNDP من التصميم

PII encryption, immutable audit trail, granular RBAC, automatable right-to-erasure. Not features bolted on later — architectural constraints. Chiffrement des PII, audit trail immutable, RBAC granulaire, droit à l'effacement automatisable. Pas des features à rajouter après — des contraintes architecturales. تشفير PII، audit trail ثابت، RBAC دقيق، حق المحو أوتوماتيكي. ماشي features كنزيدوها من بعد — قيود ديال architecture.

The 4YA technical stack in 2026 La stack technique 4YA en 2026 الـ stack التقنية ديال 4YA ف 2026

Each choice is justified by performance data — not by social-media noise. Chaque choix est justifié par des données de performance — pas par le bruit des réseaux sociaux. كل اختيار مبرر بداتا ديال performance — ماشي بالضوضاء ديال السوسيال ميديا.

Frontend Frontend Frontend
React 19 + Vite 6
Server Components, Concurrent Rendering, build <8s for 500K LOC Server Components, Concurrent Rendering, build <8s pour 500K LOC Server Components، Concurrent Rendering، build <8s ل 500K LOC
Prod-proven
Backend API Backend API Backend API
Go 1.23 (net/http + chi)
50K req/s on t3.medium, RSS <30MB, single-binary deployment 50K req/s sur t3.medium, RSS <30MB, déploiement binaire unique 50K req/s على t3.medium، RSS <30MB، deployment ب binary واحد
Prod-proven
Edge Runtime Edge Runtime Edge Runtime
Cloudflare Workers + Pages
310 PoP, TTFB <50ms Morocco, native DDoS, $0 up to 100K req/day 310 PoP, TTFB <50ms Maroc, DDoS natif, 0$ à 100K req/jour 310 PoP، TTFB <50ms المغرب، DDoS مدمج، 0$ حتى 100K req/يوم
Recommended Recommandé منصوح بيه
Database Base de données قاعدة البيانات
PostgreSQL 17 + pgvector
ACID + RAG vector search in the same engine — simplified stack ACID + recherche vectorielle RAG dans le même moteur — stack simplifiée ACID + vector search RAG ف نفس المحرك — stack مبسطة
Prod-proven
Cache Cache Cache
Cloudflare KV + Upstash Redis
KV for edge assets, serverless Redis for sessions and rate-limiting KV pour les assets edge, Redis serverless pour sessions et rate-limiting KV ل assets edge، Redis serverless للـ sessions و rate-limiting
Recommended Recommandé منصوح بيه
AI Agents Agents IA AI Agents
LangGraph + sovereign vLLM
Stateful agents with private LLM — zero external API dependency Agents à états avec LLM privé — zéro dépendance API externe Agents بحالات مع LLM خاص — بلا أي تبعية ل API خارجي
4YA-native
CI/CD
GitHub Actions + Cloudflare Builds
Deploy-on-push, automatic preview URLs, rollback in <30s Deploy-on-push, preview URLs automatiques, rollback en <30s Deploy-on-push، preview URLs أوتوماتيكية، rollback ف <30s
Prod-proven
Observability Observabilité Observability
Cloudflare Analytics + Sentry
Distributed traces, real-time Core Web Vitals, SLA alerts Traces distribuées, Core Web Vitals temps réel, alertes sur SLA Traces موزعة، Core Web Vitals فالوقت الحقيقي، تنبيهات SLA
Included Inclus مدمج

What a typical agency delivers vs. 4YA Ce qu'une agence classique vous livre vs. 4YA شنو كتسلم لك agence عادية vs. 4YA

The difference between a vendor who codes and an architect who thinks 3 years ahead. La différence entre un prestataire qui code et un architecte qui pense à 3 ans. الفرق بين شخص كيكتب الكود و architecte كيخمم على 3 سنين.

❌ Typical agency ❌ Agence classique ❌ Agence عادية
  • WordPress or "custom" Laravel for a B2B SaaS WordPress ou Laravel "sur mesure" pour un SaaS B2B WordPress ولا Laravel "حسب الطلب" ل SaaS B2B
  • Untyped Node.js Express for critical APIs Node.js Express sans typage pour des APIs critiques Node.js Express بلا typing للـ APIs حساسة
  • Create React App (abandoned since 2023) Create React App (abandonné depuis 2023) Create React App (متخلى عليه من 2023)
  • Database picked by habit (MySQL 5.7) Base de données choisie par habitude (MySQL 5.7) قاعدة البيانات مختارة على العادة (MySQL 5.7)
  • Deployment on an OVH VPS with no CDN Déploiement sur VPS OVH sans CDN Deployment على VPS OVH بلا CDN
  • AI added "as an option" via direct OpenAI API IA ajoutée "en option" via API OpenAI directe AI مزيدة "كخيار" عبر OpenAI API ديركت
  • No audit trail or RBAC in the initial architecture Pas d'audit trail ni de RBAC dans l'architecture initiale بلا audit trail ولا RBAC فل architecture الأولى
  • Deliverables: code only, no architecture documentation Livrables : code seulement, pas de documentation d'architecture المسلمات : غير الكود، بلا توثيق ديال architecture
✅ 4YA Engineering
  • React + Vite + Go — stack chosen on the metrics of your case React + Vite + Go — stack choisie par les métriques de votre cas React + Vite + Go — stack مختارة على حساب metrics ديال الحالة ديالك
  • Strict TypeScript everywhere, zero any TypeScript strict partout, zéro any TypeScript strict فكلشي، zero any
  • Data architecture designed for scalability from D1 Architecture de données conçue pour la scalabilité dès J1 Architecture ديال الداتا مصممة باش تكبر من اليوم 1
  • Edge-first: Cloudflare Workers for <50ms TTFB Morocco Edge-first : Cloudflare Workers pour <50ms TTFB Maroc Edge-first : Cloudflare Workers ل <50ms TTFB المغرب
  • AI built into the architecture — sovereign LLM, not external API IA intégrée à l'architecture — LLM souverain, pas API externe AI مدمجة فل architecture — LLM سيادي، ماشي API خارجي
  • CNDP by design: audit trail, erasure, PII encryption CNDP by design : audit trail, effacement, chiffrement PII CNDP by design : audit trail، المحو، تشفير PII
  • ADR (Architecture Decision Records) for every technical choice ADR (Architecture Decision Records) pour chaque choix technique ADR (Architecture Decision Records) لكل اختيار تقني
  • Knowledge transfer included — you are not held hostage Transfert de compétences inclus — vous n'êtes pas en otage نقل المعرفة مدمج — ماشي رهينة عندنا

The experience behind 4YA L'expérience derrière 4YA الخبرة لي وراء 4YA

Not an agency of fresh graduates. A firm founded by an architect with 21 years on the ground. Pas une agence de jeunes diplômés. Un cabinet fondé par un architecte avec 21 ans de terrain. ماشي agence ديال شباب جداد. كابيني مؤسس على يد architecte عندو 21 عام فالميدان.

AV

Ali Abdel Aziz

Founder & Principal AI Architect · 4YA Marrakech Fondateur & Principal AI Architect · 4YA Marrakech المؤسس & Principal AI Architect · 4YA مراكش

21 years of software engineering experience across 3 continents — from pre-seed startups to Series B scale-ups. Specialised in distributed architectures, LLMOps and edge systems. Founder of 4YA, based in Marrakech since 2020. Acts as principal architect on every 4YA engagement — no subcontracting. 21 ans d'expérience en ingénierie logicielle sur 3 continents — de la startup pré-seed à la scale-up Series B. Spécialisé en architectures distribuées, LLMOps et systèmes edge. Fondateur de 4YA, basé à Marrakech depuis 2020. Intervient en tant qu'architecte principal sur toutes les missions 4YA — pas de sous-traitance. 21 عام ديال الخبرة ف software engineering على 3 قارات — من startup pré-seed حتى scale-up Series B. متخصص فل architectures موزعة، LLMOps والـ edge systems. مؤسس 4YA، فمراكش من 2020. كيخدم بحال architecte رئيسي على كل المهمات ديال 4YA — بلا sous-traitance.

21 yrs XP 21 ans d'XP 21 عام XP SaaS ArchitectureLLMOpsGoReactCloudflare Edgen8nLangGraphCNDP

Frequently asked questions Questions fréquentes أسئلة كتطرح بزاف

Why pick Go over Node.js for a SaaS in 2026? Pourquoi choisir Go plutôt que Node.js pour un SaaS en 2026 ? علاش نختارو Go على Node.js ل SaaS ف 2026 ؟
Go handles 10× more concurrent requests than Node.js Express on the same hardware, with 5× lower memory consumption. There is no single-threaded event loop to saturate. For APIs touching financial or real-time data, Go's latency predictability has no equivalent in Node. We use Node when the context justifies it (Next.js SSR, tooling) — but never by default. Go gère 10× plus de requêtes simultanées que Node.js Express sur le même hardware, avec une consommation mémoire 5× inférieure. Il n'y a pas de loop d'événement single-threaded à saturer. Pour les APIs qui touchent à des données financières ou en temps réel, la prévisibilité de la latence de Go n'a pas d'équivalent en Node. On utilise Node quand le contexte le justifie (SSR Next.js, tooling) — mais jamais par défaut. Go كيتعامل مع 10× ديال requêtes متزامنة أكثر من Node.js Express على نفس الـ hardware، مع استهلاك الميموار 5× أقل. ماكاينش event loop single-threaded لي يتشبع. للـ APIs لي كتمس داتا مالية ولا فالوقت الحقيقي، ما كاينش بحال Go ف predictability ديال latency. كنستعملو Node فاش السياق كيستحقها (SSR Next.js، tooling) — ولكن ماشي بشكل افتراضي.
What is the advantage of Cloudflare Workers for a Moroccan SaaS? Quel est l'avantage de Cloudflare Workers pour un SaaS marocain ? شنو فايدة Cloudflare Workers ل SaaS مغربي ؟
Cloudflare deploys your code on 310+ global points of presence, including Casablanca. Your Moroccan users get a TTFB <50ms — versus 120-200ms for a server in Frankfurt. Bonus: native DDoS protection, WAF, analytics, automatic deploy on git push, preview URLs. All for $5/month or less depending on volume. No VPS to maintain. Cloudflare déploie votre code sur 310+ points de présence mondiaux, dont Casablanca. Vos utilisateurs marocains obtiennent un TTFB <50ms — contre 120-200ms pour un serveur à Francfort. En prime : DDoS protection native, WAF, analytics, deploy automatique sur git push, preview URLs. Le tout pour 5$/mois ou moins selon le volume. Aucun VPS à maintenir. Cloudflare كيدوبلواي الكود ديالك على 310+ نقطة حضور عالمية، فيهم الدار البيضاء. المستخدمين المغاربة كيحصلو على TTFB <50ms — مقابل 120-200ms ل سيرفر فرانكفورت. زيادة على ذلك : DDoS protection مدمج، WAF، analytics، deploy أوتوماتيكي على git push، preview URLs. كلشي ب 5$/شهر ولا أقل حسب الحجم. بلا VPS باش تسيّر.
Does 4YA take on projects outside Marrakech? 4YA prend-il en charge des projets en dehors de Marrakech ? واش 4YA كياخد بروجيات خارج مراكش ؟
Yes. We work remote-first. Our clients are in Casablanca, Rabat, Agadir, and internationally. Scoping meetings and architecture presentations happen over video. For complex projects, an on-site visit can be arranged in Casablanca or in your city. Oui. Nous travaillons en remote-first. Nos clients sont à Casablanca, Rabat, Agadir, et à l'international. Les réunions de cadrage et les présentations d'architecture se font en visio. Pour les projets complexes, un déplacement sur site peut être organisé à Casablanca ou dans votre ville. إيه. كنخدمو remote-first. الكليان ديالنا فالدار البيضاء، الرباط، أكادير، وعالميا. الاجتماعات ديال الـ scoping والـ presentations ديال architecture كيتدارو فالفيديو. للبروجيات المعقدة، يمكن نديرو زيارة فالميدان فالدار البيضاء ولا فالمدينة ديالك.
How does a first contact work? Comment se passe un premier contact ? كيفاش كيدوز أول تواصل ؟
Through our AI assistant on /securechat — describe your project, your current stack and your main problem. Our assistant asks the relevant technical questions and forwards a synthesis to the 4YA team. You receive a reply with an initial analysis within 24h. Via notre assistant IA sur /securechat — décrivez votre projet, votre stack actuelle et votre problème principal. Notre assistant pose les questions techniques utiles et transmet une synthèse à l'équipe 4YA. Vous recevez une réponse avec une première analyse sous 24h. عبر المساعد ديال AI على /securechat — وصف البروجي ديالك، الـ stack الحالية والمشكل الرئيسي ديالك. المساعد ديالنا كيطرح الأسئلة التقنية المفيدة وكيبعت ملخص للفريق ديال 4YA. كتوصلك جواب مع تحليل أولي ف أقل من 24 ساعة.

Let's build your SaaS architecture. Construisons l'architecture de votre SaaS. يلا نبنيو architecture ديال SaaS ديالك.

Audit of an existing system or greenfield — describe your project to our assistant. Technical reply within 24h. Audit de l'existant ou greenfield — décrivez votre projet à notre assistant. Réponse technique sous 24h. Audit للموجود ولا greenfield — وصف البروجي ديالك للمساعد ديالنا. جواب تقني ف أقل من 24 ساعة.

Start the analysis → Démarrer l'analyse → بدا التحليل → Contact directly Contacter directement تواصل مباشرة

Based in Marrakech · Clients all over Morocco · No commitment Basé à Marrakech · Clients partout au Maroc · Sans engagement فمراكش · كليان فكل المغرب · بلا التزام