GithubHelp home page GithubHelp logo

akashchouhan16 / potd-node.js-service Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 6.31 MB

:gear: Node.js Service for POTD Chrome extension.

License: MIT License

JavaScript 100.00%
node-microservice problem-of-the-day potd

potd-node.js-service's Introduction

Problem Of The Day | Node.js microservice

Maintenance Ask Us Anything ! made-for-Developers GitHub issues GitHub last commit

A Node.js microservice to power the problem of the day Google Chrome browser extension. The POTD browser extension beta release is available for download on @Github/Hack-Repository.

Download Beta version from Github: Download

About

The POTD service caters to bring consistency into the young budding computer science students and enthusiasts towards DSA coding challenges. The idea here is to provide an easy to plug chrome browser extension to the users. Users are exposed a daily practice problem, which are from a pool 750+ problems, curated by software engineers from Google & Directi.

The Curated selection of important coding interview questions were hand-picked from existing lists that includes but are not limited to Striver's SDE Sheet, 450 DSA Sheet, and many more. The extension is presently available as a beta release to generate user feedback, and is not yet available on the Chrome Store.

  • Server uses the Cache-First policy to prevent network requests to DB, by interacting with the in-memory cache if the problem has already been requested by the client, or makes a network request to a private collection deployed on Mongo Atlas Cloud DB.

Updates: v1.0.3

  • POTD ContestsAPI: Get Access to all upcoming global contests on platforms including KickStart, Codeforces, AtCoder, Codechef, LeetCode and more.
  • Faster Load Time: Optimized load times with both client-side & server-side data caching and storage.

About POTD Client

  • It a Google Chrome Browser extension to provide a daily practice problem statement and problem link.
  • Get Latest Contest updates from Platforms like Google Kickstart, Codeforces, AtCoder, LeetCode, and more.
  • Browser extension is available to download and is released as v1.0.1-beta on Github.
  • Stable version to be released on the Chrome Store after generating user feedback.
  • Extension Preview: POTD Chrome Extension

System Architecture (High Level Design)

  • Below is the DFD for the v1.0.0 of the POTD service.

Note: Design has undergone multiple changes to incorporate Client and Server side data caching and storage options since its inception.

System Architecture


Application Details

Version

v1.0.3

Maintainer

Akash Chouhan

License

MIT

All rights reserved. Copyright (c) @POTD/Akash Chouhan.

potd-node.js-service's People

Contributors

akashchouhan16 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

gamethapcam

potd-node.js-service's Issues

Migrate Instance from Heroku

  • Current version is running on Heroku's free tier instance
  • Migrate to DigitalOcean droplet or any low-latency deployment service.

To add caching to reduce the number of network requests to the DB.

  • Currently, the server makes a query to the DB with the iterator value to fetch the problem of the day, for every request made by the client on /problemoftheday.
  • This is not at all scalable and it also leads to very high latencies to process each request. Caching the problem of the day to the server memory itself with the first request. ~600-1200ms. Further get requests made by the client could directly access the problem of the day from the server cache, hence reducing latency to less than ~50-60ms.
  • Add Caching onto the server, to avoid network requests to DB for every client-side request.

Introduce Rate Limiter

  • Implement API rate limiter for /problemoftheday api
  • Expected Config
const limitConfig = {
    windowMs: 5*60*1000,                    // 5min window
    max: 7                                 //max no of requests per window
};

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.