Inspiration

Imagine two people meeting for the first time. Neither speaks a language the other understands. One points at an object, makes a gesture, or demonstrates an action. The other person responds. They might both feel that they understood each other, but how would they know?

A gesture can have several meanings depending on the situation. Pointing at a cup might mean "cup", "water", "drink", "give me that", or something else entirely. The person responding could understand the object while missing the action the other person intended to communicate.

Most translation software starts with a language the system already knows. I became interested in the situation before translation is possible: how can two people begin building a shared understanding when they have no common language to work with?

That question led to First-Contact Language Builder. I wanted to make a tool that gives people a way to record what they communicate, compare their interpretations, and test whether they actually understand each other.

What it does

First-Contact Language Builder is a collaborative workspace for two people who do not share a common language. It helps them develop and test possible meanings through recorded evidence and simple experiments.

A session begins when one person creates a shared-discovery workspace and invites another participant using a session code or QR code. Each person joins a separate seat, A or B, with their own participant credentials.

Participants can contribute evidence in several forms:

  • Photos and camera captures
  • Drawings
  • Gestures and demonstrations
  • Audio recordings and uploaded audio
  • Short videos
  • Written descriptions

For example, one person might demonstrate an action several times and record it. The other person can describe what they think the action means. The facilitator can then record multiple possible interpretations as hypotheses.

Those hypotheses remain separate until participants have enough evidence to evaluate them. A suggestion can be accepted, rejected, or disputed, and accepting a suggestion leaves it tentative.

The next step is to test the possibilities. Participants can create experiments such as visual discrimination, context testing, reverse demonstration, contrast testing, and repeated trials. Each check describes what different outcomes would support or weaken. This gives participants a way to investigate why they interpret the same expression differently.

Blinded responses

One of the main parts of the application is its independent response workflow.

Each participant records an answer and locks it. Their response remains hidden from the other participant until both have locked their answers. The server enforces this restriction, including when someone tries to access the underlying API directly.

Once both responses are locked, the application reveals them together. Participants can then compare their answers and review the evidence behind them.

How session verification works

Accepting a hypothesis does not make it session-verified. The application uses a defined set of conditions:

  • A participant must accept the proposed wording.
  • At least two different participants must record matching decisive responses.
  • At least two distinct stimuli must be tested.
  • At least two different experiment methods must be used.
  • There must be no recorded disagreement in the current round.
  • At least 75% of the recorded responses in that round must match.

A concept that meets these conditions receives the status session-verified. The status belongs to that particular session. It does not establish that the meaning is universally correct or that it will transfer to another situation. Participants can reopen a verified entry when new evidence challenges it.

The application also has a shared vocabulary workspace, a concept relationship graph, expression trials, practice activities, and research views. Verified entries can be used in practice, while uncertain interpretations remain visibly marked.

How we built it

I built First-Contact Language Builder as a web application using Next.js 15, React 19, and TypeScript. Tailwind CSS handles styling, Prisma manages database access, and Zod validates application data. The concept graph uses d3-force, while Framer Motion handles interface animation.

The application uses SQLite during local development and PostgreSQL in production. The hosted version runs on Vercel and uses Supabase for PostgreSQL and private file storage.

The backend handles session creation, invitation codes, participant credentials, evidence records, hypotheses, experiments, responses, and verification. API handlers validate requests before passing them to domain functions. Access checks happen on the server, so a participant's seat credentials determine which session data they can read or change.

Files uploaded during local development stay in the local data directory. Production uploads go to a private Supabase Storage bucket. The application serves media through server-side authorization and signed URLs. Participant recovery credentials are stored as hashes and expire. The hosted database uses rate limiting for important API operations, and PostgreSQL Row Level Security is enabled across all 21 public tables. Direct access through the Supabase Data API is disabled.

AI in the application

The application has a provider interface in lib/ai for generating possible interpretations and suggesting experiments.

The submitted production deployment runs in demo mode. Its suggestions are generated from the written description, evidence type, and action label. It does not inspect uploaded images, drawings, or audio files. The interface identifies these results as simulated.

An optional OpenAI-compatible provider is also implemented. The configured model name defaults to gpt-4o-mini, but I did not configure a live model key for the submitted production version. I have therefore not claimed that a commercial model analysed participant evidence.

The optional live provider requires explicit participant consent before eligible media is sent for analysis. Images have supported format and size limits. Audio analysis requires a separately configured audio model and WAV or MP3 input. Whole video files are not sent. Live experiment planning also requires facilitator confirmation.

The provider validates structured responses and fails when a live request returns an error, times out, or produces invalid output. It does not silently replace a failed live request with a simulated result. AI cannot accept a hypothesis on behalf of a participant or mark a concept session-verified.

AI during development

I used Cursor for debugging and code assistance during development. It helped me investigate errors, work through implementation problems, and prepare code changes. I reviewed the changes and checked the application against its expected behavior using tests and browser workflows.

For example, I investigated a community privacy issue where a participant could see information that should have remained with the facilitator. I checked the access rules and the resulting changes with focused tests.

I also used automated tests to check the verification requirements and the live AI provider's error handling. The provider evaluation ran against a local mock HTTP server and passed 8/8 checks. Those checks covered consent handling, response validation, rate-limit retries, timeouts, and errors. They did not measure whether a real model could identify the correct meaning of an expression.

Challenges we ran into

The hardest design problem was keeping two participants' responses independent while allowing them to work in the same session.

If one person sees the other's answer before submitting their own, their response can be influenced by what they have already read. I had to enforce the hiding and reveal rules in the backend as well as the interface. I also found that community participants needed restrictions on facilitator-only information, including hidden hypothesis counts and private research actions.

Verification required careful handling too. Two people agreeing on one example may not mean they understand an expression in other situations. The application therefore checks different stimuli and experiment methods, records disagreements, and calculates the matching response rate. During testing, I also found a browser test that attempted to create the same non-varied experiment twice. The second request returned HTTP 409, and the test then tried to use an undefined experiment identifier. I traced this to the test setup and corrected the scenario by using a different experiment method. The verification function itself returns an explicit status.

Production deployment brought a separate set of problems. The application moved from local SQLite to hosted PostgreSQL, with Supabase handling the database and private file storage. The connection between the Vercel and Supabase regions caused connection-pool timeouts that had not appeared during local development. I adjusted the Prisma connection handling and pool configuration, then checked the deployed service again.

Browser testing also exposed slow navigation to the hosted community page. A 27 November Playwright run timed out before reaching the lock and reveal steps. Local tests against a production build completed the full workflow, which helped separate the browser and cross-region timeout from an application-level failure. I kept the hosted limitation documented instead of claiming that the incomplete run had passed.

The final development pass exposed a clean-clone problem in the PostgreSQL rehearsal test. It depended on a local backup file that was ignored by Git, so the test failed in a fresh checkout. I changed it to create a disposable backup in the operating system's temporary directory and clean it up afterwards. I also fixed unused variables reported by ESLint and repaired screenshot links after the screenshot files were reorganized.

Accomplishments that we're proud of

The project now has a deployed application with a two-person discovery workflow, private evidence storage, participant access controls, blinded responses, and session-based verification.

The hosted infrastructure uses Supabase PostgreSQL and a private storage bucket. Its security work includes Row Level Security across all 21 public tables, restricted database privileges, signed media access, hashed recovery credentials, and database-backed rate limiting.

The local test suite now covers the verification rules and important privacy boundaries. The final development validation produced these results:

  • 94 of 94 unit tests passed across 11 test files.
  • TypeScript type checking completed without errors.
  • ESLint completed with no errors or warnings.
  • The production build completed, including all 11 static pages.
  • The environment and migration check passed.
  • The AI provider mock evaluation passed all 8 checks.
  • The HTTP smoke checks passed.
  • All 14 security-hardening assertions passed.
  • The community browser journey passed all 7 steps.
  • The full two-browser workflow passed all 18 steps.

The full browser workflow used two separate browser contexts. It checked session creation and joining, evidence from both participants, hidden hypotheses, cross-seat access restrictions, and response locking. It also tested the verification edge cases: one participant, one stimulus, one experiment method, disagreement, and matching responses below 75%. Those cases stayed unverified, while a scenario meeting all the requirements reached session-verified.

I also checked the live deployment without making destructive changes. The health endpoint returned HTTP 200 and reported a connected PostgreSQL database, configured private storage, media signing, and database-backed rate limiting. Unauthenticated access to the sample session and an unsigned media request returned HTTP 404. The demo operator endpoint returned HTTP 403.

I am pleased with the way the application keeps a record of uncertain meanings and the evidence behind them. A participant can see whether an entry is still a hypothesis, tentative, disputed, reopened, archived, or session-verified.

The application has not yet been tested in a human field study. The SHORE-1001 session is illustrative sample data, not collected research. The local browser results also do not replace a fresh hosted production test of the complete lock and reveal workflow.

What we learned

Working on this project made me think more carefully about the difference between agreement and understanding.

Two people can agree on one example for completely different reasons. A different stimulus or experiment method can expose that difference. This is why the application keeps evidence, hypotheses, and verification responses connected instead of treating one successful interaction as proof.

I also learned how much work goes into a collaborative application after the first working interface. A workflow can behave correctly in one browser and still fail when two people use it at the same time. Local SQLite tests do not expose every problem that appears with a hosted database, separate browser sessions, or slow network connections.

The database and privacy work taught me to test access through the server, not just through the visible interface. A hidden button does not prevent someone from calling an API directly. I added checks for attempts to access another participant's evidence and facilitator-only actions.

I also learned to be careful about how AI suggestions are presented. A plausible interpretation can influence what someone believes they saw. The application needs to show where a suggestion came from and keep it separate from participant evidence and session verification.

Finally, I learned that automated test results need context. The 8/8 AI provider result came from a mock server, and the 18/18 browser result came from a local production build. Both are useful checks, but neither proves that a live model understands an unfamiliar language or that every hosted workflow will behave the same way under real network conditions.

What's next for First Contact Language Builder

The next stage is to test the application with pairs of people who genuinely do not share a language. I want to observe whether they can use the workflow without someone guiding them through every screen, where they disagree, and which experiments help them resolve ambiguous expressions.

I also want to evaluate the optional live AI provider in a separate testing environment. That would let me test experiment suggestions with consented evidence, compare the suggestions against clear requirements, and document when they help or mislead participants.

There are also some engineering improvements I would like to work on. The hosted application currently synchronizes through polling, and the Vercel and Supabase regions can affect response times. Improving the community workflow under slower connections is one area to investigate. I would also like to make evidence provenance and the history of changes easier to inspect, so participants can understand how a vocabulary entry reached its current status.

The current version provides the session workflow, evidence records, experiments, and verification rules. The next step is to see how people use it when they sit down with someone whose language they do not know.

Built With

  • accessibility
  • artificial-intelligence
  • education
  • human-computer-interaction
  • next.js
  • postgresql
  • prisma
  • react
  • supabase
  • tailwind-css
  • typescript
  • vercel
  • web
  • web-app
Share this project:

Updates

Submission history