AI EducademyAIEducademy
Programma'sLabBlogOver ons
Inloggen
AI EducademyAIEducademy

Gratis AI-onderwijs voor iedereen, in elke taal.

Leren

  • Programma's
  • Lessen
  • Lab
  • Dashboard
  • Over ons

Community

  • GitHub
  • Bijdragen
  • Gedragscode

Ondersteuning

  • Koop een Koffie โ˜•

Gratis AI-onderwijs voor iedereen

MIT Licentie โ€” Open Source

โ† Terug naar Blog

How We Built a Multilingual AI Education Platform with Next.js and MDX

Explore the technical architecture behind AI Educademy: Next.js 15 App Router, next-intl for i18n, MDX content pipeline, git submodules, PWA support, and Vercel deployment.

Gepubliceerd op 6 maart 2026โ€ขAI Educademy Teamโ€ข8 min leestijd
nextjsopen-sourcearchitecturewebdev

Building AI Educademy presented a unique technical challenge: create a platform that's accessible to learners worldwide, easy to maintain, and scalable enough to serve millions of usersโ€”all while keeping the codebase clean and developer-friendly.

In this deep dive, we'll walk through the architectural decisions that shaped our platform, from our choice of Next.js 15 to how we manage multilingual content with git submodules. Whether you're building an educational platform, a documentation site, or any content-heavy application, you'll find practical insights here.

Why Next.js 15 App Router? ๐Ÿ—๏ธ

When we started building AI Educademy, Next.js 14 was the standard. By the time we launched, Next.js 15 was released with significant improvements to the App Router. We made the jump because several factors aligned perfectly with our goals:

Server Components by Default: The Next.js 15 App Router uses Server Components by default, which means we can fetch data directly in our components without extra API routes for simple operations. This reduces complexity and improves performance out of the box.

Incremental Static Regeneration (ISR): Educational content doesn't change constantly, but it does change. ISR allows us to pre-render pages at build time and then revalidate them on a schedule. This means our blog posts, tutorials, and course materials are always fresh without the performance hit of on-demand rendering.

Built-in Optimization: Image optimization, font loading, and code splitting are handled automatically. We didn't have to spend cycles building or configuring these featuresโ€”they just work.

File-based Routing: The App Router's intuitive file structure makes it obvious where pages and API routes live. New contributors can jump into the codebase and understand the structure immediately.

// Our routing structure is intuitive and scalable
app/
โ”œโ”€โ”€ [locale]/
โ”‚   โ”œโ”€โ”€ page.tsx
โ”‚   โ”œโ”€โ”€ programs/
โ”‚   โ”‚   โ”œโ”€โ”€ page.tsx
โ”‚   โ”‚   โ””โ”€โ”€ [slug]/
โ”‚   โ”‚       โ””โ”€โ”€ page.tsx
โ”‚   โ””โ”€โ”€ blog/
โ”‚       โ”œโ”€โ”€ page.tsx
โ”‚       โ””โ”€โ”€ [slug]/
โ”‚           โ””โ”€โ”€ page.tsx
โ”œโ”€โ”€ api/
โ””โ”€โ”€ layout.tsx

Multilingual Support with next-intl ๐ŸŒ

AI Educademy is built for the global community. Offering content in multiple languages isn't just nice-to-haveโ€”it's essential for fulfilling our mission of free AI education for everyone.

We chose next-intl because it:

  • Seamlessly integrates with the App Router without requiring complex middleware configurations
  • Provides type-safe translations so we catch missing translation keys at compile time
  • Supports nested locale structures (we can have /en/programs and /es/programas with the same page component)
  • Handles date/number formatting automatically based on locale
  • Works with Server and Client Components without friction

Here's how we structure our i18n setup:

// middleware.ts - Detects user locale and routes accordingly
import { createMiddleware } from 'next-intl/middleware';

export default createMiddleware({
  locales: ['en', 'es', 'fr', 'de', 'zh'],
  defaultLocale: 'en'
});

export const config = {
  matcher: ['/((?!api|_next|.*\\..*).*)']
};

Our translation files are organised by locale and feature:

messages/
โ”œโ”€โ”€ en/
โ”‚   โ”œโ”€โ”€ common.json
โ”‚   โ”œโ”€โ”€ programs.json
โ”‚   โ””โ”€โ”€ blog.json
โ”œโ”€โ”€ es/
โ”‚   โ”œโ”€โ”€ common.json
โ”‚   โ””โ”€โ”€ ...
โ””โ”€โ”€ fr/
    โ””โ”€โ”€ ...

This approach scales beautifully. Adding a new language means adding a new folder with JSON filesโ€”no code changes required.

MDX: Content Meets Components ๐Ÿ“

Here's where things get interesting. We could have used a traditional headless CMS, but we chose MDX because it gives us the best of both worlds: content management that's version-controlled alongside our code, and the ability to embed interactive React components directly in our educational content.

When you read a blog post or tutorial on AI Educademy, you're not just reading static HTML. You might be interacting with:

  • Interactive code examples that show input and output side-by-side
  • Embedded quizzes that check your understanding
  • Visual diagrams that explain complex concepts
  • Callout boxes that highlight important information

All of this is possible because we're using MDX. Our content authors can write in Markdown, but developers can pass in custom components:

---
title: "Understanding Neural Networks"
---

# Understanding Neural Networks

<ConceptExplainer concept="neural-networks" />

Neural networks are inspired by how our brains work...

<InteractiveQuiz questionId="nn-101" />

## Real-World Applications

<CodeExample language="python" title="Simple Neural Network" />

To make MDX work smoothly in Next.js 15, we use @next/mdx and configure it in our next.config.js:

// next.config.js
import createMDX from '@next/mdx';

const withMDX = createMDX({
  options: {
    remarkPlugins: [
      // Our custom plugins for syntax highlighting, TOC generation, etc.
    ],
    rehypePlugins: []
  }
});

export default withMDX({
  pageExtensions: ['ts', 'tsx', 'mdx']
});

Git Submodules for Decoupled Content ๐Ÿ”—

Here's a clever architectural decision: our content lives in separate git repositories, pulled into the main application as git submodules.

Why? Because it enables:

  • Asynchronous workflows: Content creators can work independently of developers
  • Clear separation of concerns: The application repo stays focused on code, content repos on content
  • Parallel scaling: We can have different teams maintaining content in different languages
  • Version control benefits: Content changes are tracked separately from code changes, making rollbacks and history tracking cleaner

Our directory structure looks like:

ai-educademy/
โ”œโ”€โ”€ content/ (git submodule)
โ”‚   โ”œโ”€โ”€ blog/
โ”‚   โ”‚   โ”œโ”€โ”€ en/
โ”‚   โ”‚   โ”œโ”€โ”€ es/
โ”‚   โ”‚   โ””โ”€โ”€ fr/
โ”‚   โ”œโ”€โ”€ programs/
โ”‚   โ”‚   โ””โ”€โ”€ [course content]
โ”‚   โ””โ”€โ”€ lab/
โ”‚       โ””โ”€โ”€ [interactive exercises]
โ”œโ”€โ”€ app/
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ .gitmodules

When we need to update content, we:

# Pull latest content
git submodule update --remote

# Or content authors can PR directly to the content repo

This decoupling has been game-changing for our velocity. Content can be updated without triggering application rebuilds (thanks to ISR), and new programmes can be added by non-engineers.

Progressive Web App (PWA) Support ๐Ÿ“ฑ

Education happens on all devices, including low-bandwidth environments. We built AI Educademy as a PWA so learners can:

  • Work offline: Download lessons and complete work without constant connectivity
  • Install like an app: Add to home screen on mobile for app-like experience
  • Reduce data usage: Smart caching means returning users don't re-download content
// next.config.js includes PWA configuration
import withPWA from 'next-pwa';

const withPWA = require('next-pwa')({
  dest: 'public',
  disable: process.env.NODE_ENV === 'development'
});

Our Service Worker strategy is straightforward:

  • Cache-first for assets: CSS, JavaScript, fontsโ€”these don't change often
  • Network-first for content: Blog posts and course materials should stay fresh
  • Stale-while-revalidate for API data: Show cached data while fetching fresh data in background

Deployment on Vercel ๐Ÿš€

We deploy on Vercel because the integration with Next.js is seamless. Every push to our main branch triggers automatic builds and deployments. More importantly:

  • Automatic ISR revalidation happens on Vercel's edge network
  • Preview deployments for pull requests let us review changes before merging
  • Global CDN ensures our content loads fast regardless of geography
  • Edge Functions let us handle dynamic logic (like language detection) at the edge

Our deployment pipeline looks like:

Git Push โ†’ GitHub โ†’ Vercel Build โ†’ CDN Distribution โ†’ Global Users

For content updates specifically, we've set up webhooks so that when our content submodule is updated, Vercel automatically rebuilds the site with fresh content.

Performance Metrics That Matter ๐Ÿ“Š

All of this architecture works together to create a platform that performs at the top level. Our real-world metrics:

  • Core Web Vitals: All green (LCP < 2.5s, FID < 100ms, CLS < 0.1)
  • First Contentful Paint: Average 1.2 seconds globally
  • Lighthouse Score: 98/100 (performance)
  • Time to Interactive: 2.1 seconds

These aren't vanity metricsโ€”faster sites means more learners can access our content, especially those on mobile networks or in regions with limited infrastructure.

Open Source Principles ๐Ÿ’š

The entire codebase is open source. If you want to see how all these pieces work together, you can explore the repository, contribute improvements, or fork it for your own educational platform.

The architecture we've described here isn't proprietaryโ€”it's built on solid, widely-adopted open source tools. The community benefits from our learnings, and we benefit from community contributions.

Key Takeaways

Whether you're building an educational platform or any content-heavy application, consider:

  1. Choose frameworks aligned with your use case: Next.js 15 App Router for content sites
  2. Invest in i18n from the start: It's harder to retrofit than to build in
  3. Decouple content from code: Git submodules enable parallel workflows
  4. Progressive enhancement works: PWA support reaches users where they are
  5. Measure what matters: Core Web Vitals impact education outcomes

AI Educademy represents our commitment to accessible, performant, and maintainable tech infrastructure for education. If you're interested in any of these technologies or want to contribute, our code is open source and waiting for your collaboration.


Want to try our platform? Explore our programmes | Visit the Lab | Read more about our mission

โ† Terug naar Blog