From Static to Intelligent: How We're Building an AI-First Travel Platform

From Static to Intelligent: How We're Building an AI-First Travel Platform

This week marked a pivotal moment in Toristy's evolution. We didn't just implement a new CMS—we fundamentally transformed how our platform thinks about content, data, and the future of travel technology.

The Challenge: Breaking Free from Static Content

Like many modern web platforms, Toristy started with a familiar pattern: hardcoded marketing pages, static components, and content scattered across codebases. It worked, but it created a bottleneck. Every content update required developer intervention. Every new marketing page meant writing code. Most critically, our content was invisible to the AI-powered features we were building.

We had over 120,000 records in our MariaDB database—tours, bookings, destinations, reviews—but our marketing content lived in a completely different world. This wasn't just an inconvenience; it was a strategic liability in an AI-first future.

The Solution: Directus as Our Content Intelligence Layer

Our goal wasn't simply to add a CMS. We needed to create a unified API layer that would make every piece of content—from marketing pages to tour listings—accessible, queryable, and intelligent.

Here's what we built this week:

A Complete Marketing Schema in Directus

We designed a comprehensive content architecture that transforms how we think about web pages:

  • Marketing Pages: Dynamic pages with flexible routing and SEO control
  • Reusable Sections: Hero blocks, CTAs, features, testimonials that can be mixed and matched
  • Content Libraries: Images, videos, and assets managed centrally with Many-to-Many relationships
  • Component Architecture: Headers, footers, and navigation that update globally

The beauty? Every section, every component, every piece of content is now accessible via API. Our AI agents can query it, understand it, and reason about it.

Production-Grade AWS Infrastructure

We didn't just spin up a local instance. We deployed Directus to AWS ECS Fargate with a complete multi-environment architecture:

  • Development Environment: Behind VPN for schema development and testing
  • Staging Environment: Public access with 2FA where content management happens
  • Production Environment: Strict access controls with automated deployments

We integrated S3 for image storage with Directus's built-in transformation API—meaning we can request images at any size, format, or quality on-the-fly. Perfect for AI image analysis and optimization.

Article illustration

Solving Real Technical Challenges

The journey wasn't without obstacles. We hit JSON field limitations in Directus when configuring social links (a 255-character string limit masquerading as a JSON field). The solution? Delete the field, recreate it as a proper JSON type, and suddenly we had unlimited structured data storage.

We spent hours debugging AWS security groups, load balancer health checks, and Docker platform architectures. Each challenge taught us something about building resilient, production-grade infrastructure.

Why This Matters: The AI-First Thesis

Moving to Directus isn't about content management convenience. It's about fundamental platform capabilities:

1. Everything is Queryable

Our AI agents can now ask questions like:

  • "What marketing pages mention sustainable tourism?"
  • "Which tours have hero images featuring families?"
  • "What's our current messaging around adventure travel?"

Before, this content was locked in React components and static files. Now it's structured, searchable, and intelligent.

2. Content Becomes Training Data

Every piece of marketing content, every tour description, every testimonial is now potential training data for our AI models. We can analyze language patterns, understand what resonates with customers, and automatically generate similar content that maintains brand voice.

3. Dynamic Personalization at Scale

With content in a headless CMS, we can serve different hero images, CTAs, and messaging based on user context—all orchestrated by AI. A family searching for tours sees family-focused content. Adventure seekers see extreme experiences. All from the same API, dynamically assembled.

4. Multi-Channel Distribution

The same content API that powers our Next.js website can power mobile apps, voice assistants, AR experiences, and AI agents. One source of truth, infinite distribution channels.

The Development Workflow We Built

We established a Git-based workflow that separates concerns beautifully:

  • Schema changes deploy automatically through AWS CodePipeline
  • Marketing content requires manual approval through dev → staging → production
  • User-generated content (tour bookings, reviews) flows directly to production via API
  • Automated API documentation generated for our design team using custom Node.js scripts

Every environment has its role. Every deployment is traceable. Every change is auditable.

What's Next: The AI Acceleration

With Directus deployed and our content now API-first, we're positioned to accelerate toward true AI integration:

  1. Content Intelligence: AI agents that understand and query our entire content graph
  2. Automated Optimization: Machine learning models that A/B test and optimize content in real-time
  3. Conversational Booking: AI chatbots that don't just answer questions but actively compose personalized travel experiences by querying our content and tour APIs
  4. Predictive Personalization: Understanding user intent and dynamically assembling the perfect page before they even search

The Bigger Picture

This week wasn't about adopting a new tool. It was about architectural philosophy. We're building Toristy as an AI-first company, which means:

  • Data over code: Content in databases, not codebases
  • APIs over interfaces: Every capability exposed programmatically
  • Intelligence over static rules: AI-driven decisions replacing hardcoded logic
  • Flexibility over rigidity: Systems that can adapt and evolve with AI capabilities

Lessons Learned

  1. Start with infrastructure: Production-grade deployment from day one prevents technical debt
  2. Question field types: That "String" field causing issues? It should probably be JSON
  3. Document everything: Your future self (and your team) will thank you
  4. Build for AI from the start: API-first isn't optional—it's strategic

The Journey Continues

We're not done. We still need to:

  • Migrate existing marketing pages to the new system
  • Build out the blog architecture with M2A relationships
  • Train our first AI models on the structured content

But this week proved something important: becoming an AI-first company isn't about adding AI features to existing systems. It's about rebuilding your systems so they're intelligent by design.

And that's exactly what we're doing.