Giter Site home page Giter Site logo

deskpask_quiz's Introduction

DeskPass Technical Assessment

API

The API is coding using golang with fiber, gorm, and gocron to handle scheduling events.

Running the API

  1. cd api
  2. go run main.go

Data Persistence

I opted to use a sqlite database to store the messages. By using a lightweight database, it does not require a lot of resources to obtain and create new messages. Also, by storing the messages in a database instead of locally would allow the client to be restarted and still be able to retrieve any future scheduled and any previously posted messages.

Problems Faced

One of the biggest challenges that I faced was implementing the WebSockets to use channels to send the messages instead of relying on the cron job implementation. If I used the cron job implementation, when scheduling a message in the future, it would not allow any additional messages to be run until that job finished. By utilizing channels, I could display a message whenever the channel would receive it, and then just use the cron job to send the message to the channel. However, I am unable to figure out why the messages are not being sent to the channel outside of the immediate function for the WebSocket reader.

Client

The client was created using react and tailwindcss.

Running the client

  1. cd client
  2. npm or yarn
  3. npm start or yarn start

Client Information

The client consists of two pages, the first page is the home screen that shows all of the scheduled messages. The create page is a form that can be filled out to create a new message.

When a message is received, a banner appears at the top of both pages indicating that a new message has been posted.

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.