Chat Client (stage 1 -- design)

Due: Mon Apr 6 by 11pm

Learning Objectives

In this assignment we want you to focus on three main topics:

  1. Working with client-server systems that communicate over the Internet.
  2. Handling issues that arise with multiple users.
  3. Embedding AI into an application.

Task Overview

For our final project, you are going to build a multi-user chat client.

There are many ways to architect a chat application, but one key we will care about is testability. Because of that, for the same reasons as we did with GUI applications, we will be using an MVC architecture. Even if we didn't, it is useful for us to think about systems in MVC terms. For instance, it forces us to ask and answer questions like: What is the model in a chat? What does it contain? What does it not contain?

In a typical chat app, the model will reside on a central host, called a “server”. Each user, called a “client”, will have a view. The controller is usually split a bit between the two: the client notifies the server about that user actions, and the server notifies the clients about everyone else's actions.

Chat Requirements

Your chat client must support the following operations:

There are certainly many additional features you may want to add. There will be opportunity to do that later. For now, please stick to these features.

The styling and presentation are entirely up to you. Feel free to have fun with that.

The only requirement is that your client runs in a web browser. As before, we encourage you to use TypeScript.

Logistics

Shriram will go over what you need to know about clients, servers, and communication between them in class on April 2.

Here's the schedule for the entire project. There will likely be separate documents for future stages, but we provide this calendar to help you plan out your coming weeks. The italics refer to the other assignment that you are in the midst of.

Due date What's due
Fri Apr 3 Metaphor part 2
Mon Apr 6 Initial API design; Metaphor part 3
Wed Apr 8 API mapping; initial testing plan
Mon Apr 13 Run tests against servers
Wed Apr 15 Baseline implementation
Mon Apr 20 Integrating AI
Fri Apr 25 Final project files
Apr 25-May 1 In-person oral project review with instructors

Assignment Tasks

You are NOT writing code for this stage; just write this design document.

Task 1: As usual, start a reflection journal. Here's the repo to clone.

Task 2: You are going to design the API for the chat tool's server. You should work with Claude to design an API that you are satisfied with that can implement the features we have discussed above. Produce a brief document that lists the entry points and their types. Put your work in a file named SERVER-API.md.

Grading

Your ultimate grade for the project will be determined based on an in-person oral review, which each of you will schedule individually with the instructors for reading period or the first few days of finals. We will conduct these over Zoom for those who have already left campus. Details forthcoming.