Skip to content

leoraclet/super-memo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SuperMemo

license language lastcommit
Release Language Libraries Size Open Source

Table of Contents

🌟 Showcase

app

πŸ“– About

Warning

⚠️ This project was made for school with a deadline and I chose to leave it as it was at the time of submission.

I only updated the development environment to make it more consistent and reliable.

This is a shcool project in which we were tasked to build a simple flashcard application like Anki, with a UI for the user to interact with. It could have been a TUI, but we decided to make a GUI (because it's better), and here it is.

We were required to:

  • Implement the SM2 algorithm
  • Program a flashcard app like Anki
  • Build a UI for users to interact with the application

The UI should allow the user to:

  • Create, Edit and Delete flashcards
    • Each flashcard contained a question, an answer and a hint
  • Create, Edit and Delete decks of mulitple flashcards
  • Save all the informatons across application reruns (in files)
  • Show flashcards to the user during reminding sessions at intervals following the SM2 algorithm output patterns

✨ Features

Project

  • πŸ”„ Reproducible: Built with Nix, this configuration can be effortlessly reproduced on other machines, ensuring a consistent setup.

  • πŸ“– Documented: Most of the parts of my configuration files are commented and documented with links and explanations if necessary

Application

  • Flashcard app inspired by Anki
  • Graphical User Interface (GUI) for user interaction
  • Implements the SM2 spaced repetition algorithm
  • Allows users to:
    • Create, edit, and delete flashcards
      • Each flashcard includes:
        • A question
        • An answer
        • A hint
    • Create, edit, and delete decks containing multiple flashcards
    • Save all data persistently across sessions (using files)
    • Review flashcards in timed sessions based on SM2 scheduling

πŸ“¦ Structure

  • Directories

    • includes - Headers (.hpp/.h)
    • src - Source files (.cpp)
    • libs - External libraries
    • assets - Images and other Resources.
  • Files

    • flake.nix - Environment configuration (based on dev-templates)
    • .envrc - Used by direnv to load Flakes
    • flake.lock - Used by Flakes to version packages
    • CMakeLists.txt - CMake configuration to build the project

πŸ“š Libraries

  • Dear ImGui ~ Bloat-free Graphical User interface for C++ with minimal dependencies
  • SFML ~ Simple and Fast Multimedia Library

πŸ”§ Build

Nix (recommended for MacOS and Linux)

Note

I'm using NixOS as my day-to-day OS, and I have found that Nix with Flakes was the simplest and fastest way for me to setup C/C++ project with external libraries.

To build this project, first make sure you have Nix installed as a package manager and direnv as a shell extension.

Then, configure it to enable Flakes according to your setup.

Once you're ready, you can start by cloning this repo

git clone https://github.com/leoraclet/super-memo
cd super-memo

Tip

Now, direnv should load the environment when inside the project directory, if not, try

direnv allow

The flake.nix file is where the project's environment is defined, and you can see in it that CMake is part of the packages. So, if everything went well, you should be able to build the project like so

cmake -B build -S .
cd build
cmake --build .

Then, you can run the produced executable in build with

./supermemo

Windows (WSL)

Caution

I have NOT tested the building process on Windows, so you're basically on your own for this.

The best solution to build this project on Windows is to use WSL and follow the Nix way in it.

You can start by installing nix here.

πŸš€ Releases

To run the program without editing the source code or building it yourself, go see the Releases.

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

πŸƒ Anki-like flashcard application built with Dear ImGui

Topics

Resources

License

Stars

Watchers

Forks