Skip to content

psfinaki/CheckYourCzech

Repository files navigation

Check Your Czech - a service to practice Czech grammar

Build Status

See it in action

The service is deployed here: https://check-your-czech.azurewebsites.net/

Seven exercises are available now:

  1. Noun Declension
  2. Adjective Declension
  3. Adjective Comparative
  4. Verb Imperative
  5. Verb Participle
  6. Verb Conjugation
  7. Numeral Cardinals

Concept

The idea of the service is to have a nice app that will help to selectively train some Czech grammar rules.

Selectively is a key word as language services usually check the language knowledge in full. Whereas in reality some people learn new language rule by rule, case by case, aspect by aspect - so that they can not only lamely communicate but actually speak properly.

This service is supposed to give exercises like "practice all the exceptions of the second case plural for the masculine animate gender".

Features

  • For declension, case and number can be selected, also gender and pattern for nouns
  • For verb imperatives, verb class and verb pattern can be selected
  • For comparatives and participles, regularity can be selected
  • Automated deployment via Azure Devops
  • Alerts about requests and exceptions

Tech stack

This app uses the SAFE-stack. Everything is F# driven:

  • Saturn server framework
  • Fable compiler for JS
  • Elmish architecture for front end
  • Paket dependency manager
  • Fake build automation system

For hosting and metrics, Microsoft Azure is used.

Local testing

Developing and testing locally is possible both for Windows and Unix. Full stack debugging is supported in VS Code as described here.

Installation for Windows

  1. Install .NET Core SDK
  2. Install node.js
  3. Install yarn
  4. Install Microsoft SQL Server LocalDB either as a part of SQL Server or Visual Studio
  5. Install and run Azure Storage Emulator

Installation for MacOS/Linux

First three steps are same as for Windows.

For Azure storage emulator use azurite. Use V2 because the latest version supports Blobs only.

To install azurite use: npm install -g azurite@2.7.0 To run Azure storage emulator use: azurite

Running the App

  1. Open PowerShell, go to the repo root
  2. Run Scraper: dotnet fsi build.fsx target runscraper
  3. Let it run for a a few minutes to generate some local word database
  4. Stop Scraper
  5. Run web app: dotnet fsi build.fsx target runweb

To upgrade paket dependencies

dotnet tool run paket update

Testing

dotnet test

UI Testing

dotnet fsi build.fsx target rune2etests

libgdiplus is required for Linux/Mac OS: dotnet/core#2746 (https://formulae.brew.sh/formula/mono-libgdiplus) sudo ln -s /usr/local/lib/libgdiplus.dylib /usr/local/share/dotnet/shared/Microsoft.NETCore.App/3.1.6

Plan of development

There are a lot of issues to address, starting from handling rear language quirks and ending with conceptual tasks.

As for features, current exercises will be extended, new exercises will be added. And maybe, at some point in the future, new languages.