Coder Social home page Coder Social logo

event_uploader's Introduction

Event Uploader

An online portal to upload events for users and keep track of it via full calendar view.

Mission 1 - script to upload data in respective tables

  • Design required database tables, their columns and associations (the application must have users and events tables. Any additional tables can be added).
  • Find out patterns from the csv to seed the data in the database for users and events.
  • An event should be marked completed if the end date is before current datetime.
  • End datetime should be ignored if event is an all day event.
  • Each user’s RSVP is marked in the events csv file, the rsvp should be marked by default the same, but a user having multiple events at the same time can not have rsvp as yes for more than one overlapping event. In such case consider the rsvp of last overlapping event to be yes

Mission 2 - script to upload data in respective tables

  • Add a simple UI which shows events for a given date range.
  • Add a simple UI which shows availability of a particular user for a given date range.

Assumptions

  • No double booking (i.e, considering user's timeslot as busy only if the RSVP is 'yes')

Note: To achieve optimization, I've used postgresql COPY command and bulk_insert approach to upload data from CSV files. So, I've taken care of validations as DB constraints and custom validations in importers (PORO) itself.

Installation

Install the dependencies and devDependencies and start the server.

cd event_uploader
bundle install
bundle exec rails webpacker:install
rails db:create
rails db:migrate
rails s

To import data from csv files

rails import:all

To clean all imported data

rails db:reset

Output

Event calendar view (month):

events_calendar_month_view

Event calendar view (week):

events_calendar_week_view

User calendar view:

user_calendar

event_uploader's People

Contributors

aruncsengr 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.