Table of contents
Project goal
This project aims to help people learn new words using a flashcard strategy.
First, the user has to sign up to be able to use the service. Once he creates an account, the user can start adding the flashcards. However, it would be best to consider using workspaces. Generally speaking, the workspace is a place for storing flashcards, or to put it another way, we can group flashcards by using workspaces. Of course, if the user forgets or doesn't know about the workspace, he can gather flashcards into workspaces once he needs to group the flashcards. Overall, there are two levels of grouping. The first one is, as mentioned before, the workspaces. And the second one is the flashcards groups. The second level was introduced as a shareable instance.
The groups are shareable. That means that one user can create a flashcard group and add flashcards to it; after that, he can share the current group with another user so that another user would be able to study the flashcards created by the first one. The interesting part here is that the owner can share the flashcard group with some specific roles in case he doesn't want the flashcards to be edited or removed by another user.
Technologies & development
It doesn't have any Front-end, as the goal was to get more familiar with Back-end technologies such as NestJS, TypeORM, and GraphQL (specifically, TypeGraphQL). The project was developed in a test-driven development (TDD) style and thus has good test coverage. The amount of E2E test is close to hundred fifty. Every resolver has lots of E2E tests that cover each and every line within the project.
During the development, I discovered two new libraries that I hadn't used before but which I will definitely be using in the future.
The first one is
In the beginning, I didn't plan to use GraphQL. But since it became so popular back then.
I decided to do a complete migration to use TypeGraphQL. So, my controllers become the resolvers.
Down the road, I used additional libraries like
API uses a stateless authentication, more precisely JSON web token. All passwords were bcrypted by
For the testing, I used Jest. Two libraries that simplified the project testing were
If you want to take a look at the code, here is the repo: https://github.com/obaranovskyi/learn-it-api