Skip to content

JonaCodes/instachat-exercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instachat Exercise

This is a buggy, AI-generated, real-time chat app. Practice your AI-copiloting by completing the tasks below.

Use Google's Antigravity chat, or your IDE/coding assistant of choice, to complete this task.

Running the app

Simply run npm run dev, and open http://localhost:8080/ on two separate browser windows to see the chat interface

Tasks

Fork the repo and complete the following locally:

  1. Fix the bug

    • The main "live chat" feature only works on the first message. Ensure that any time any user types, their text appears in real time on the other client
    • See the bug here
    • Note: the bug only occurs if you leave the username fields empty
  2. Refactor the code

    • The client logic is all crammed into one big class. Break it up, name things clearly, remove duplication, and make it easier to follow
  3. New feature

    • Currently anyone who opens the app joins the same chat session
    • Implement one-to-one direct messages, so you can start a chat with a single other user (like sending a message to a friend on Whatsapp)
    • No need to implement group chats
    • These instructions are deliberatly missing technical details, which you need to figure out - but remember: you do not need expertise in real-time applications to implement this feature. Consult with the LLM. Plan. Work in small iterations

Notes

While the goal is for you to practice using your coding copilot (claude, gemini, codex - whichever), remember that you are the captain; guide the LLM.

It was blindly trusting an LLM that created this messy codebase in the first place, so let's not make the same mistake ;)

image

About

A buggy, poorly organized, AI-generated project to practice working with AI-generated code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors