Skip to content

jfcorsini/taipo-backend

Repository files navigation

Taipo

Taipo is a chat application that aims to help people to learn a new language. For more details on my motivation to build this, check my blog post.

This repository will keep track of the backend development. To see how I am building the whole application, please check the following repositories:

Development

The following sections will cover how to develop / maintain this application. More details should be added soon.

Access Patterns

The following list describes all the access patterns that this application allows:

  1. Create a chat between two users.
  2. Create a group chat with multiple users.
  3. Return a list of chats that logged user can access.
  4. Add a message to a chat
  5. List all messages of a chat with pagination.
  6. Create / update a user details, e.g. last login time.

DynamoDB Tables

As the core of this application, there are two DynamoDB tables: users and chats. This could of course be done in a single one, but I prefered to separate the concerns at this level. Following DynamoDB Advanced Patterns, the design of the tables were done thinking about our access patterns.

The chats table will have the partition key being the chat identifier and the sort key will be different according to the need, as shown below:

PartitionKey SortKey Description
config Provides details about the chat group
message__ Details about the message
member_ Contain data about the members of a group

Meanwhile, the users table will have the partition key being the username of a user and sort key also being different according to the need, as shown below:

PartitionKey SortKey Description
config Details about the user, like when was the last login

Both tables will have a Global Secondary Index with the sortKey column being the primary key to allow extra queries. If needed, these and more indices will be described here.

About

Backend repository for Taipo, a chat application to learn a language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published