serdeliverance / m-flashcards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

m-flashcards

Flashcards for learning languages. This project born from a real need and also comes in handy to dive deeper into Java, Spring Boot, Nextjs, Typescript and related technologies.

Stack

  • Nextjs + Typescript
  • Java + Spring Boot
  • Cypress
  • Postgres
  • Docker

Requirements

  • Node v18.x (you can use NVM for setting the right version easily)
  • Java 17
  • Docker

If you have NVM and SdkMan installed, you can set the required Node and JDK versions by running the following commands

nvm use     # inside ui folder
sdk env     # inside root folder

Data model

So far the model is very simple:

data class Deck(val name: String, val type: String, val tags: List<String>, val flashcards: List<Flashcard>)

data class Flashcard(val front: String, val back: String, val example: String?)

We have decks and flashcards. A deck is a flashcard set with some metadata, such as name and type. type indicates with type of flashcard the deck stores. type could be phrase or vocabulary. vocabulary flashcards use to have example value set. flaschcard domain class is self-explanatory.

Run local

To run both backend and frontend, simply run the following command.

bash /scripts/runLocal.sh

It will run:

Run (just) backend locally

./gradlew bootRun

Run (just) frontend locally

cd ui
yarn dev

It runs the frontend on localhost:7700

Start DB

run docker-compose:

docker-compose up

More info

About


Languages

Language:JavaScript 61.7%Language:Java 21.4%Language:TypeScript 13.0%Language:Python 2.4%Language:Shell 1.2%Language:CSS 0.4%