Giter Club home page Giter Club logo

spreppy's Introduction

Spreppy

Spreppy ("spaced repetition") is an in-development iOS app for spaced repetition memorization, akin to Anki.

A short video demoing the app's use

Okay, it isn't much to look at... yet. But that's why we have plenty of open issues πŸ˜‰.

Contributing

For the time being, I won't be accepting external contributions. I expect to do so once the design is firmed up and I start releasing to TestFlight. In the meantime, I encourage you to fork this repository and play around!

Developer Setup

Download the latest Xcode, clone this repo, and run make open:

git clone [email protected]:rwblickhan/Spreppy.git
cd Spreppy
make open

spreppy's People

Contributors

rwblickhan avatar frostyshadows avatar

Stargazers

Rutvij Shah avatar

Watchers

 avatar

spreppy's Issues

Add empty state for deck list

This should teach folks how and why to add decks. Bonus points if it has some sort of icon or illustration πŸ™‚

Add Leitner box selector in deck info

We need some way to tie new cards created in a deck with the Leitner boxes that the user (hopefully) installed or created. This could be a table view listing different "chains" of Leitner boxes and letting the user pick each one.

Implement SM-2

This can probably just be a static function that takes in inputs and gives a tuple of outputs.

See here, here, or here for various descriptions of the algorithm.

Implement Leitner-style system

Essentially this would "bucket" cards into different categories, with a different amount of time between each category and cards going up the categories as users correctly answer them. It would be nice if this was customizable (even per-deck?) but start with a "recommended" set of categories.

Here's a description of WaniKani's system and here's the Wikipedia page for the Leitner system in general.

Implement deletion for decks

Right now you can tap "edit" to start the table view editing mode but it doesn't do anything. We should have everything in place to implement deletion now. That would involve:

  1. Adding a delete(_ deckModel: DeckModel) function to DeckRepository.

That would look something like:

let fetchRequest = NSFetchRequest<Deck>(entityName: DeckModel.entityName)
fetchRequest.predicate = NSPredicate(format: "uuid == $@", deckModel.uuid)
fetchRequest.fetchLimit = 1

let deck = (try? persistentContainer.viewContext.fetch(fetchRequest))?.first
persistentContainer.viewContext.delete(deck!)
  1. Hooking up the table view's deletion state to the view model and from there to the repository.
  2. Adding a confirmation dialog before committing the delete.
  3. [optional] Most iOS apps implement slide-to-delete for individual rows in a table view (even if you're not in edit mode). We might be able to get that "for free" using some random table view delegate.
  4. Adding some unit tests πŸ™‚

Display deck name in deck study view

In #16 I set this to default to the UUID that's passed in to DeckStudyViewController. It would be nice to show the actual name of the deck from the data model instead.

That's actually going to be more difficult than it looks, hence why this isn't necessarily a good task for new folks.

  1. Add a fetchDeck() method to DeckRepository that returns an AnyPublisher<DeckModel, Never> with the updates for just one deck. (I suppose in theory we could use fetchDeckList() and just filter the resulting [DeckModel], but that feels icky.
  2. That will likely require some cleverness in DeckCoreDataRepository to ensure having multiple fetch controllers etc will work as expected.
  3. Subscribe to fetchDeck() in DeckStudyViewModel.handle(.viewDidLoad).
  4. In the subscription, set state.title.

Stub out a UI for adding decks

Basically a copy of #18 πŸ™‚

  1. Stub out a CreateDeckViewController (and view model, etc), which for now might be nothing more than a text field to enter a title and a save button. The text field should of course show some sort of error state or alert if you try to enter an empty name.
  2. The save button should add the card via repos.deckRepo.updateOrCreate.
  3. When pressing the add button in DeckListViewController, navigate to CreateDeckViewController (via MainCoordinator of course).
  4. Add unit tests πŸ™‚

Implementing sorting decks in the deck list

Right now decks are always sorted by name ascending (thanks to fetchRequest.sortDescriptors = [NSSortDescriptor(key: "title", ascending: true)] in DeckCoreDateRepository). It would be nice to add a UI to customize this, or even add enough details to the data model to be able to support reordering.

Add empty deck state

Right now once you've swiped all your cards, you're just presented with an empty screen. We should change that!

Fix git hooks

We're committing something in pre-push which isn't really good form. We can move the linting to post-commit instead.

Stub out a UI for quickly adding cards

In #16, tapping the add button in DeckStudyViewController just adds a random card to the deck. It would be nice to start building out the actual UI for a quick-add-card modal.

  1. Stub out a CreateCardViewController (and view model, etc), which for now might be nothing more than a text field showing the autogenerated UUID and a save button πŸ˜…
  2. The save button should add the card via repos.cardRepo.updateOrCreate.
  3. When pressing the add button in DeckStudyViewController, navigate to CreateCardViewController (via MainCoordinator of course).
  4. Add unit tests πŸ™‚

Support drag-and-drop in the deck list

The deck data model has a rank field, which is how the decks are sorted. We should be able to support drag-and-drop by updating the rank fields appropriately after the table view drag-and-drop delegates are called.

Add a search bar for the deck list

This should be pretty straightforward by adding a UISearchController to DeckListViewController and hooking it up to do some filtering on DeckModel.title. We might consider refactoring by doing the diffable data source snapshot in the view controller and just storing "current visible deck models" on the state in that case, though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.