psfinaki / CheckYourCzech

The service to practice Czech grammar.
https://check-your-czech.azurewebsites.net
GNU General Public License v3.0
19 stars 1 forks source link
czech functional-programming hacktoberfest webservice

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

Tech stack

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

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: https://github.com/dotnet/core/issues/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.