GithubHelp home page GithubHelp logo

iteloo / storytown Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 198 KB

An online teaching portal for language teachers and students written in Elm/Haskell

Makefile 0.44% Haskell 7.06% Elm 65.30% JavaScript 25.01% HTML 2.19%
language-learning education

storytown's Introduction

Storytown

Storytown is an online teaching portal for language teachers and students

Teachers can:

  • Quickly set up lessons for their students
  • Enter translations for the readings
  • Record passages directly in browsers
  • Track student progress on the dashboard

Students can:

  • Review passages with smart reader
  • Listen to passages with audio

Technical note

Storytown is built using Javascript/Elm on the frontend and a RESTful Haskell servant API on the backend! The recorded audio resources are stored on Amazon S3, and lesson/user data are persisted in Postgres through Persistent.

storytown's People

Contributors

iteloo avatar

Stargazers

 avatar mchaver avatar

Watchers

James Cloos avatar  avatar

Forkers

auladinglese

storytown's Issues

Logging out doesn't clear session data

Clearing Http-Only cookies require a call to the server.
A cleaner solution is to store a loggedIn flag in the client, and keep the current cookie setup.

Translations span trailing spaces

Possible fixes:

  1. move spaces out before rendering
  2. move spaces out when parsing

(2) is cleaner, but may result in problems when measuring widths, due to space collapsing behaviours in css.

Spacing between words are wrong

We want

  • spaces optional and collapsed in source text
  • spaces stripped in translation blocks
  • spaces preserved in rendered original text

User redirected to login page even when visiting public pages

Right now an API call to get the logged-in user is enforced on app launch, and authentication error is handled the same way as any other API call – by redirecting to the login page.

We can treat this call as a special call bypassing the default error handler.

Translation granularity not persisted

Currently I'm only storing the source text on server.

A few options to implement this:

  1. store the entire Collapsable on a per user basis
  2. store the sequence of zipper movements to recreate state

In (1), if the story is edited, the user will continue having the old version. We can provide the option to let them upgrade the story, at the cost of possibly resetting the granularity levels. At some point we can minimize this disturbance by using a tree diff.
In (2), we need to load the correct version from the server to apply the zipper movements. Otherwise the result will be undefined.

In either setup we will need some sort of versioning of the stories.

Rerecording audio doesn't delete old file off s3

Currently, S3 files are created as soon as a sentence is recorded, so the deletion must also happen in the client as well.

Alternatively, we can only submit audio to S3 upon saving the story. In this case, we can also let the server take care of the deletion.

Colour translation blocks to visually aid distinguishing blocks

We have two options:

  1. Computed dynamically, at the time of expansion and collapsing. We will only need a total of 3 colours. Also, we are able to make colour distribution as uniform as possible.
  2. Precompute colours for all the levels before rendering for the first time. This is less confusing for the user as the colours won't randomly change as they expand and collapse translations. However, this will probably require way more colours, but exactly how many?

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.