Git Product home page Git Product logo

bild-ord's Introduction

Bild och ord

A little game designed to help young children learn to read. The idea is to familiarise the student with common words (in Swedish, as this game is implemented for a Swedish-language learning platform).

The student can drag-and-drop words to connect them with the correct illustration. In addition, typing skills are fostered by having the student type in the words as well.

Developing

The application is written in Clojure and ClojureScript and is based on the duct web application template.

Setup

When you first clone this repository, run:

lein setup

This will create files for local configuration, and prep your system for the project.

Environment

To begin developing, start with a REPL.

lein repl

Run go to initiate and start the system.

user=> (go)
:started

By default this creates a web server at http://localhost:3000.

When you make changes to your source files, use reset to reload any modified files and reset the server. Changes to CSS or ClojureScript files will be hot-loaded into the browser.

user=> (reset)
:reloading (...)
:resumed

If you want to access a ClojureScript REPL, make sure that the site is loaded in a browser and run:

user=> (cljs-repl)
Waiting for browser connection... Connected.
To quit, type: :cljs/quit
nil
cljs.user=>

Frontend assets

Stylesheets are written as SCSS files. To compile into CSS, run the following in a background terminal screen:

lein scss :dev auto

The sassc utility needs to be installed.

Testing

Testing is fastest through the REPL, as you avoid environment startup time.

user=> (test)
...

But you can also run tests through Leiningen.

lein test

Feature tests

These end-to-end tests in test/features use the clj-webdriver wrapper around Selenium which in turn drives PhantomJS. You'll need to have the phantomjs binary available on your path. You can get it with the node package manager. For example:

npm install -g phantomjs

Migrations

Migrations are handled by ragtime []. Migration files are stored in the resources/migrations directory, and are applied in alphanumeric order.

To update the database to the latest migration, open the REPL and run:

user=> (migrate)
Applying 001-base 
...

To rollback the last migration, run:

user=> (rollback)
Rolling back 001-base

Note that the system needs to be setup with (init) or (go) before migrations can be applied.

Deploying

Ansible

Prerequisites:

  • IP address in /etc/ansible/hosts: bild-ord-production ansible_host=...
  • ansible-galaxy install -r ansible/requirements.yml -p ansible/roles

Building and deploying an uberjar:

lein uberjar
ansible-playbook ansible/prod.yml --extra-vars "app_version=0.1.0-SNAPSHOT" --tags "deploy" --private-key ... --ask-sudo-pass --ask-vault-pass

Vagrant

Vagrant can be used to test deployment locally:

vagrant up

# if vagrant box is already running
vagrant provision

Contributors

  • Johannes Staffans
  • Robin Gower

License

Copyright © 2016 Johannes Staffans

This software is distributed under the MIT license.

bild-ord's People

Contributors

jstaffans avatar npmcdn-to-unpkg-bot avatar robsteranium avatar

Watchers

 avatar  avatar  avatar

bild-ord's Issues

Touch screen support

Can't type the answer or drag & drop on mobile platforms.
Tested on:

  • iPad Air 2: iOS 10.0.2, Safari and Chrome
  • Nexus 5X: Android 7.0, Chrome and Firefox
    Tested version is current live version on http://bildord.kjellstaffans.fi/ .
    Don't know if this was supposed to work on mobile platforms, but I think the format of the app would work really well there.

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.