I Built an AI Teacher's Assistant with AWS Serverless & Terraform — Here's the Journey.
Oguzhan Bassari

Oguzhan Bassari @oguzkhan80

About: History Teaching grad bridging education & tech. Building practical EdTech tools using AWS Serverless, Terraform, and AI (Amazon Bedrock). Creator of Tarih Asistanı (AI History Assistant).

Location:
Adana Türkiye
Joined:
Oct 24, 2025

I Built an AI Teacher's Assistant with AWS Serverless & Terraform — Here's the Journey.

Publish Date: Oct 24
2 2

Hey Dev Community!

Every developer loves a good side project, but the most rewarding ones are those that solve a real-world problem. As a recent graduate in History Teaching, I saw a problem I couldn't ignore: teachers spending countless hours creating unique, high-quality course materials.

So, I decided to build a solution. I'm excited to share the journey of creating "Tarih Asistanı" (History Assistant), an AI-powered platform that generates premium-quality worksheets for history teachers in seconds.

The Problem: The Content Creation Bottleneck
History teachers in Turkey need to create materials based on the national curriculum (MEB), using primary historical sources (like old newspapers, letters, telegrams), and designed to foster critical thinking skills (based on Bloom's Taxonomy). This is a creative but incredibly time-consuming process.

The Solution: An AI-Powered Assistant
My platform streamlines this entire workflow into a few clicks:

  1. A teacher selects a historical document from the platform's library.
  2. My AI engine, powered by Amazon Bedrock (Claude model), analyzes the document and generates 3 unique, open-ended analytical questions aligned with the curriculum.
  3. The system instantly combines the source document, the AI-generated questions, and a professional design into a high-quality, ready-to-print PDF worksheet.

A Quick Note: The Platform is in Turkish (For Now!)
Before we dive into the tech, it's important to note that the live platform at https://www.tarihasistani.com.tr is currently in Turkish.

My initial goal was to solve a specific problem for my local community of Turkish history teachers, using Turkish historical sources and aligning with the Turkish national curriculum. However, the architecture is built to be language-agnostic. My long-term vision is to internationalize the platform, adapting it for different languages and educational systems.

The Tech Stack: A Fully Serverless AWS Architecture

I wanted a scalable, cost-effective, and low-maintenance solution, so I went all-in on a serverless architecture, managed entirely with Terraform.

Here's a high-level overview:

  • Frontend: Vanilla JavaScript, HTML, CSS. Simple, fast, and effective.
  • Backend: A set of AWS Lambda functions (Python) exposed via API Gateway.
  • Database: Amazon DynamoDB for storing the library of historical sources and their metadata.
  • File Storage: Amazon S3 for storing the source documents (PDFs, JPEGs) and a separate S3 bucket for user-uploaded files via the admin panel.
  • AI Brain: Amazon Bedrock (Claude v2) for the heavy lifting of text analysis and question generation. The prompt engineering here was key!
  • Content Delivery: Amazon CloudFront to serve the website and source documents quickly and securely.
  • PDF Generation: The entire PDF engine is built on the client-side using the jsPDF library.

Challenges & Key Learnings

This project was an incredible learning experience. Here are a few hurdles I had to overcome:

  • The PDF Engine was a Monster: Building a robust PDF generator on the client-side was tough. Aligning elements, embedding custom fonts (like Lora and Lato), handling images of different sizes without breaking the layout, and ensuring consistency across browsers took weeks of trial and error.
  • CORS, My Old Friend: As soon as I connected the frontend to S3, CloudFront, and API Gateway, I ran into a wall of CORS errors. Properly configuring response headers policies in CloudFront and CORS rules on both S3 and API Gateway (all via Terraform) was a critical and complex step.
  • Prompt Engineering is an Art: Getting the AI to consistently produce high-quality, pedagogically sound questions required a lot of experimentation with the prompts sent to Bedrock. It's a fascinating mix of linguistics, pedagogy, and code.

What's Next?

The platform is live (v1.0), and the "Faydalı Model" (Utility Model, a form of patent in Turkey) application has been filed. My immediate focus is on populating the library with more high-quality historical sources.

After that, I plan to:

  • Add new features, like AI-powered text summarization.
  • Begin the process of internationalization, starting with English.
  • Gather feedback from more teachers to continuously improve the platform.

This project started as a solution to a problem I knew intimately, and it has become an amazing journey through the world of cloud architecture and AI.

Thanks for reading! I'd love to hear your thoughts, feedback on the architecture, or any ideas you might have.

Comments 2 total

  • roshan sharma
    roshan sharmaOct 24, 2025

    This is really impressive work! I love how you combined AI, serverless architecture, and real-world teacher needs into a functioning platform. How did you handle the prompt engineering to make sure the AI questions stayed relevant and challenging?

    • Oguzhan Bassari
      Oguzhan BassariOct 25, 2025

      Thank you so much for the kind words and insightful question! You've hit on a crucial part of the process – prompt engineering was definitely key to getting high-quality, relevant questions.

      My approach involved a few core strategies:

      Defining the Persona: I instructed the AI (Amazon Bedrock - Claude model) to act as an expert history teacher familiar with the Turkish national curriculum and modern pedagogical approaches.

      Specifying the Goal: The prompt explicitly asks for open-ended questions targeting the higher-order thinking skills of Bloom's Taxonomy (Analysis, Synthesis, Evaluation), pushing beyond simple recall.

      1.Providing Context: The full text of the primary source document is always included directly within the prompt, ensuring the questions are grounded in the provided material.

      1. Negative Constraints: Crucially, I added instructions on what not to do – specifically, avoiding multiple-choice questions or questions with single, easily verifiable answers.

      2. It certainly took some iteration and testing to fine-tune the prompts, but focusing on these elements helped ensure the AI generated challenging and contextually relevant questions suitable for classroom discussion.

      Thanks again for your interest and the great question!

Add comment