Coder Social home page Coder Social logo

quizae's People

Contributors

mareddie avatar

Watchers

 avatar

quizae's Issues

User Logout

Ability to log User out (destroy the session and remember me cookie (if present)

Remove transactions from data layer

Transactions are used in data layer right now, but there are a few issues with them:

  • Although Mongo and Prisma support them, they are not needed for our use case
  • It complicates runtime of e2e tests
  • It requires Mongo to run in Replica Set, which is completely unnecessary for use-case and real world runtime of this app

After this consideration, transactions don't bring much of the benefit for this scenario. Rewrite parts of the application to stop using that mechanism.

Modify schema - remove embedded parts

Change data layer for game session and progress, that now uses types instead of Prisma models. This will ensure better developer experience while streamlining the whole schema.

e2e tests

Create a suite of e2e tests for the application. Tests should cover all available endpoints, correct output, and authorization.

Finish App Layout

Create a scalable layout. The base should be handled via SSR in Handlebars.

Create Unit Tests

The tests should cover a business logic only, everything else should be mocked.

Use Nest testing library and bootstrap classes via testing module.

Working Groups and Questions CRUD

Implement an ability to CRUD Working Groups. Working Group has N Users.

Next, implement an ability to CRUD quiz questions. The question can have N answers, and only one should be correct (for the sake of simplicity)

The CRUDs should be accessible only after login. The answers are bound to a group, not a user.

User Settings

Create a page where an authenticated User can change their settings

Change database from Mongo to MySQL

I've had enough of MongoDB for toying, and I don't feel like it adds a value to my system. It'd be for the best to switch it for conventional SQL database.

  • Add MySQL container to development environment, remove mongo and mongo-express
  • MySQL for local development can have exposed port for better developer experience
  • Change Prisma to use MySQL
  • Generate migration
  • Change pieces of schema (and Prisma client usage) where changes are required
  • Change Github actions to use MySQL for running tests in pipeline

Modify README

Write a brief documentation for this project instead of boilerplate of NestJS framework text.

It should contain some info about software architecture and considerations, info about domains base domains, and how to run a project.

Extract infrastructure to separate repository

The Quizae Project has a few moving parts, and it would be for better (even for CI/CD) to have the infrastructure in separate directory.

At the time of writing, this would include:

  • Moving Traefik configs (for both development and production) to the new repository
  • Moving Docker Compose files with parametrization of hardcoded values

CI for Quizae Backend

There should be a GitHub actions for CI - running linters, tests, building of image, push of image.

Research Portainer docs on how to do CD as well (service redeploy on push)

Add Question Categories

They will be bound to Group, same as Questions.

Every Question can have one Category, while one Category can have multiple question (and only one Group). This will be later used for Game Session.

Get rid of Handlebars and stateful logic

Refactor backend to be fully stateless without any templating, just API. This should speed up development and lead to better separation of concerns and less coupling in the project

Add Game Logic

There will be new domain (both Presentation and Application-layer) called GameSession.

Game Sessions are bound to Groups, and every GS can have N Players.

Every Player should have a nickname and points count and is bound only to a single Game. Player doesn't have any credentials, it's bound to this new domain.

When the Game is initiated, all questions should be loaded to the Game - there should be a model for it. When the underlying Group / Question are deleted, the Game should be deleted as well. Anyone from the Group can start a Game.

Next, the first Player's turn will begin and can select a Category (which will return a random Question from that category that is bound to the Game) and attempt to answer a Question. When the Question is answered, it will be processed:

  • If the answer is correct, the Player will get 10 points
  • If the answer is not correct, the Player will lose 5 points
  • The minimum number of points is 0 without upper limit

After the Player answers, the Question is discarded from the game (so it cannot be answered again) and the next player's turn will begin.

User Login

The User Login functionality must be implemented. Requirements:

  • Login page with its own layout
  • A form with inputs for email and password
  • A backend that can log user in via session
  • Ability to send and display flash messages with authentication errors

Finish Postman docs for API

  • Add example of responses for every request
  • All request should have raw JSON body to improve clarity
  • Add more explanation to how API behaves

Downsize logic - Groups

First, there's a lot of logic that is not needed, and can be reduced. I want to aim on more "personal" experience, there's no need to have groups for example, so let's get rid of them. The idea is half-baked and may be reintroduced in the future, but let's scrap it for now.

  1. Remove logic with creation, update, removal of group
  2. Re-bind all logic considering games, questions and answers to User
  3. User will be the integral part of Quizae, not a Group

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.