Coder Social home page Coder Social logo

amiskov / slots Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 49 KB

Technical assessment for FlipTalk: show available time slots for students to book a session with a teacher.

Home Page: https://secret-retreat-68267.herokuapp.com

Dockerfile 0.38% Clojure 79.06% HTML 16.98% CSS 3.58%
clojure heroku luminus postgresql

slots's Introduction

Reserve a session with a Tutor

There's a platform where students learn a foreign language by doing exercises and participating in speaking sessions with tutors.

A student can invite a tutor for a speaking session.

Data Model

There are tutors with a break property which represents their resting period after each speaking session:

tutors:
- id PK
- name TEXT
- break INT (minutes)

Tutor's availability is represented with records of this form:

availabilities:
- id PK
- start_at TIMESTAMP
- end_at TIMESTAMP
- tutor_id REFERENCES tutors(id)

Tutors choose availability periods by hand for each day.

Speaking session for a tutor:

speaking_sessions:
- id PK
- start_at TIMESTAMP
- duration INT (minutes)
- tutor_id REFERENCES tutors(id)

A speaking session can be reserved inside a 5-minute time grid (e.g. 16:00, 16:05, 16:55, etc.).

The Task

There are:

  • an array of tutors;
  • an array of tutors availabilities;
  • an array of tutors reserved speaking sessions.

A student wants to reserve a speaking session. He sets the period-start and period-end parameters and the desired duration of the session. He also may (or may not) choose several preferred tutors (array of their IDs). We need to get an array of time slots where the given tutors are available for reserving a speaking session with given duration.

Example: find all available time slots for all tutors for a 20-minute speaking session from 2022-01-06 to 2022-01-08.

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.