Coder Social home page Coder Social logo

alexmalus / malus_20210830 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 912 KB

Demo application that grants users the ability to store, then play uploaded videos.

License: MIT License

Shell 0.02% Dockerfile 2.22% Ruby 48.47% JavaScript 36.67% CSS 0.95% SCSS 1.31% HTML 10.35%
shrine tailwindcss rails docker docker-compose

malus_20210830's Introduction

Watcher

This repository contains the code for a demo application that grants users the ability to store, then play uploaded videos.



Installation

The app can be ran standalone, as well as on Docker.

Run the app locally

./bin/webpack-dev-server rails server

Below, the rest of this guide provides instructions for usage on Docker. You need:

  • docker and docker-compose installed.
  • dip installed.

Run the following command to build images and provision the application:

dip provision

Running the app

You can start Rails server by running:

dip up

Then go to http://localhost:3000/ and see the application in action.

Note: If you're too fast, you might experience some lag on first request. This is normal, as webpacker is compilling the assets. Once the compilation is finished, you should be good to go!

Debugging

If you want to run the Rails console, run the following command:

dip rails c

Testing

You can run the tests with:

dip rspec

Used Technologies

  • Jquery -> as a JS framework
  • TailwindCSS -> utility-first CSS framework
  • Bootstrap -> to beautify some UI elements (in lack of time)
  • Docker and Docker compose -> as an application wrapper
  • Ruby 3.0.2
  • Ruby on Rails 6.1.4 having the following libraries:
  • Rspec - as a test framework
  • SuckerPunch - as the async job handler
  • and more..

Acknowledgments

Built and tested with the help of some of these awesome technologies from Tailwind:


Background story

Coding challenge with fixed constraints.

Crude solution was made to instruct Shrine to process video thumbnails on demand. With more time, I would have let SuckerPunch/Sidekiq to them asynchronously. Then, in the UI, the user would see an image showing that it's processing. This image would be connected through ActionCable -> Turbo to the app. When all related background job finished, the image is replaced with the 256x256 thumbnail. The user can then continue using the app as it would normally.

Constraint

TODO

License

The application is available as open source under the terms of the MIT License.

malus_20210830's People

Contributors

alexmalus avatar

Watchers

 avatar

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.