Skip to content

AlessandroB1298/srl_r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

srl — Spaced Repetition Learning TUI in Rust

Screenshot 2025-12-29 at 10 14 42 PM

based heavily on this project

Overview

This tool is a general purpose spaced repetition learning tool, meant for helping users attempt to do better at leet code style interview questions. Using repetition as a guide to enhance learning, this tool allows users to easily track and update their progress.

Note

This project currently uses rustc 1.91.1

To check your rust version run:

rustc --version

if you do not have rust installed on your machine, visit the following link

To update to a stable version run:

rustup update

To run this applicaton use the following:

cargo run 

Data Storage

We use sqlite to store all data locally, so nothing ever leaves your device.

Furthermore we use rusqlite as our library for storing data.

If you wish to add functionality, look below as an example from add_problem_screen.rs

fn insert_new_problem(
    db: &Arc<rusqlite::Connection>,
    problem_name: &String,
    problem_rating: &String,
    entry_date: &String,
) -> rusqlite::Result<bool> {
    // Changed return type
    let table_name = "user_problems";

    // Ensure table exists
    if !check_table(db, table_name).unwrap() {
        create_table(db)?;
    }

    // Check if row exists
    if !check_row_exists(db, problem_name).unwrap() {
        let problem = Problem {
            name: problem_name.to_string(),
            rating: problem_rating.to_string(),
            entry_date: entry_date.to_string(),
        };
        db.execute(
            "INSERT INTO user_problems (problem_name, problem_rating, entry_date) VALUES (?1, ?2, ?3)",
            (&problem.name, &problem.rating, &problem.entry_date),
        )?;
        return Ok(true); // Signifies a new row was added
    }

    Ok(false) // Signifies nothing was added, but no error occurred
}

TUI

Leveraging ratatui to create stunning visuals, with minimal latency.

Screenshot 2025-12-29 at 10 47 38 PM

Todo

  • Add delete capabilities in view screen
  • Add usage graph & screen
  • Clean up code and test

Open Source Notes

This is an open sourced project, so feel free to contribute, and leave feedback!

About

Spaced repetition learning based in rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages