Skip to content

Tech Debt

anujachaitanya edited this page Aug 8, 2020 · 7 revisions
  • Too many query strings

    With each new feature database queries are increasing, it is difficult to manage those many queries. So there should be a mechanism to build and manage the queries

  • Storing data in files

    Sqlite3 is file based database system, if we host it on the heroku it won’t be able to persist the data for longer duration, so we need a persistent way to store data. We can use client-server database system.

  • Redundancy of functions in the frontend

    some functions in the frontend are getting repeated, instead make the generic functions in order to avoid the repetition.

  • Passing same function as a handler to many requests

    isValidRequest is being used by many requests instead we can make it a middleware. Adding the frequently used handler as a middleware.

  • Too many handlers in single file

    All the handlers are stored in a single file instead we can separate the user handlers. So that it will be easy to manage the handlers.

  • Inconsistent mocking in tests

    While testing the database, we are using javascript objects to mock db functions. In some places we are using sinon for mocking. We can make mocking consistent by using sinon everywhere.

  • Regenerating html in frontend

    Instead of using available pug template we are creating html again in the frontend. We can use pug template to render that html.

  • Error handling in the handlers

    We need to handle the database errors in the handlers.

Clone this wiki locally