All projects

Case study · Personal project

AWA

Answers from your company’s files, with sources

An AI workspace assistant for law firms, banks, and NGOs. Staff ask about their contracts, policies, and meetings, and AWA answers only from the files each person is allowed to open, citing the page, or the moment in a recording.

In development

Requirements, architecture and UI design done. Next: phase 1 of 7.

AWA answering “When is the phase 2 deadline for the Riverside Tower project?”: 15 March 2027, with a possible two-week slip raised at a site meeting. Two sources: page 12 of the contract, and 14:32 in the meeting recording.
Role
Design, architecture & developmentSolo project
Release
Free pilotPlanned, for a few organizations
Platform
Web app, desktop firstHosted in Singapore
Stack
React, TypeScript, AWSPostgreSQL + pgvector, Gemini

The problem

Company knowledge is buried in files

Law firms, banks, and NGOs keep what they know in documents and recordings spread across people, branches, and drives. Finding the right one usually means asking a colleague.

  • Scattered files

    Contracts, policies, and meeting notes live in different drives, branches, and inboxes.

  • New staff ask around

    Without a way to search, people depend on colleagues to find documents and answers.

  • Wrong answers are costly

    AI tools can answer confidently and still be wrong. For a lawyer or a bank, an answer with no source to check is a risk.

  • AI ignores permissions

    Generic AI tools don’t know who in an organization may see which file.

The solution

Ask once, and check where the answer came from

An organization uploads its files once. Staff then ask in plain words, and every answer comes only from files they can open, with a source for every claim.

  • Answers with sources

    Each claim names the file and page, or the moment in a recording, so anyone can check it.

  • Only files you can open

    Search stays inside the folders each person can access, before the AI reads a word.

  • Exact codes and names

    Search matches exact words as well as meaning, so a contract number like CN-2026-014 finds its file.

  • Documents and recordings

    PDFs (scanned too), Word, Excel, PowerPoint, and text, plus audio up to two hours, transcribed with timestamps.

  • Built for branches

    Folders belong to the whole organization or to one branch, with three admin levels to manage them.

  • No guessing

    When nothing relevant is found, AWA replies “Not found in your documents” instead of making an answer up.

Access

Each person’s search sees only their folders

Every folder belongs to the whole organization (Global) or to one branch (Local), and groups get View or Edit access to it. Pick a person to see which folders AWA searches when they ask.

How access works

  • Global or Local

    Set when a folder is made, so a branch file can’t land in Global by mistake.

  • View or Edit, by group

    View lets people open files and ask. Edit also lets them upload and delete.

  • Checked on every question

    Access comes from the database each time, so a change applies to the very next question.

Asking as

Folders their questions search

  • Firm Policies · Globalvia Everyone
  • Board Minutes · GlobalNot searched
  • Riverside Tower · Yangonvia Riverside Tower
  • Yangon HR · Yangonvia Everyone in Yangon
  • Tokyo Expenses · TokyoNot searched

Ma Hnin’s questions search 3 of 5 folders. The other 2 never reach Gemini.

Pick a person to see what their questions can reach.

The product

Three screens do most of the work

Members mostly ask; editors also upload. Every label is in plain words for non-technical staff, with no “policies” or “IAM”. These screens are from the UI design, in the app’s dark theme.

01

Ask

Start from any screen, and ask the way you’d ask a colleague.

AWA home screen: “What would you like to ask today?” above a question box searching all folders, three suggested questions, and recent chats in the sidebar.

Open full size (opens in a new tab)

  1. Plain questionsNo keywords or search rules to learn. Just type what you need.
  2. Choose the scopeSearch every folder you can open, or just one.
  3. Ideas to startSuggested questions show new staff what to ask.
  4. Upload from anywhereThe Upload button sits at the top right of every screen.
02

Answer with sources

Every claim points to the file it came from.

AWA answering “When is the phase 2 deadline for the Riverside Tower project?”: 15 March 2027, with a possible two-week slip raised at a site meeting. Two sources: page 12 of the contract, and 14:32 in the meeting recording.

Open full size (opens in a new tab)

  1. A marker on each claimNumbers in the answer match the sources below it.
  2. File and pageOpening a source checks access again, then opens a link that expires in 5 minutes.
  3. Recordings tooAudio sources point to the moment, like 14:32 in a site meeting.
  4. Follow-ups keep the scopeThe next question stays in the Riverside Tower folder.
03

Upload

Upload once, then follow each file until it’s ready to ask about.

AWA upload screen: the Riverside Tower folder in the Yangon branch, a notice that Google Gemini processes the files, 412 MB of 1 GB used, and five uploads: ready, transcribing audio, checking for viruses, a duplicate warning, and a password-protected file.

Open full size (opens in a new tab)

  1. Who will see itThe folder picker says in plain words who can see the files.
  2. Consent up frontA notice says Google Gemini processes the files before anything uploads.
  3. Storage in viewEach organization has 1 GB during the pilot, shown before it runs out.
  4. Every file’s statusVirus check, transcription, duplicates, and errors, each with a next step.

Engineering

The decisions behind it

I wrote the requirements, designed the AWS architecture, and tested the database schema before writing any app code. Six decisions shape how AWA works.

  • Permission-safe search

    Each question searches only chunks from folders the person can open: by meaning with pgvector, and by exact codes like a contract number. Gemini sees nothing else.

    • pgvector
    • Hybrid search
  • Organizations sealed apart

    Row-level security on every table returns nothing until a request sets its organization, and composite keys rule out links between organizations.

    • Row-level security
    • PostgreSQL 16
  • Uploads that skip the server

    Browsers upload straight to S3 with short-lived, size-capped links. GuardDuty scans every file before a worker takes it from the queue.

    • S3
    • GuardDuty
    • SQS
  • Gemini only where it’s needed

    Text is extracted locally first. Gemini reads only pages that can’t be extracted cleanly, like scans, and transcribes audio in 10-minute pieces.

    • Gemini on Vertex AI
    • ffmpeg
  • No half-processed files

    Chunks are saved in one transaction, so search never sees half a file. A repeated message does nothing, and a file that fails 5 times goes to a dead-letter queue and raises an alarm.

    • SQS dead-letter queue
    • CloudWatch alarms
  • Data stays in Singapore

    All of AWS runs in ap-southeast-1 and Gemini in Google’s Singapore region, with zero data retention requested.

    • AWS ap-southeast-1
    • Vertex AI

Tech stack

Two paths that meet in one database

Uploads are processed in the background. Questions are answered live, streamed as Gemini writes. Everything runs on AWS in Singapore.

Architecture

Uploads go from the browser straight to S3, are scanned by GuardDuty, and reach a worker on ECS Fargate through SQS. The worker uses Gemini to read and transcribe each file and saves chunks to PostgreSQL with pgvector. Questions go to an API on ECS Fargate, which searches only the folders the person can open in the same database, then Gemini writes the answer, streamed back with its sources.

Frontend
  • React
  • Vite
  • TypeScript
  • shadcn/ui
  • TanStack Query
  • react-i18next
Backend
  • TypeScript API
  • ECS Fargate
  • Cognito
  • Redis (Valkey)
Data
  • PostgreSQL 16
  • pgvector
  • Row-level security
  • S3
Processing
  • EventBridge
  • SQS
  • GuardDuty
  • ffmpeg
AI
  • Gemini on Vertex AI
  • gemini-embedding-001
Delivery
  • AWS CDK
  • GitHub Actions
  • CloudWatch
  • X-Ray