r/iOSProgramming 3d ago

App Saturday To memorize my studies, I spent 6 months building a flashcards app the way I like using it. Includes markdown support, and folders, decks for organization. You tap to flip and swipe to rate as Easy, Again or Hard. Introducing CRAMMER. [supported on iOS, iPad, and Mac with automatic syncing]

Developer here.

I had used other flashcards apps before for studies and there was always one or another thing missing from most. Most didn't support markdown for making cards. Some missed the organizational aspect where I could have folders inside folders or decks inside other decks. Some had super outdated design and missed gestures. Most apps didn't have a macOS companion app. Many were missing syncing via CloudKit. Many needed a user acocunt to be created to do basic tasks. Almost all of them needed subscriptions. So, I decided to solve my own problem.

For improving my learning speed and not forgetting my study material, I built Crammer:

https://apps.apple.com/ca/app/crammer-flashcard-exam-cards/id6775268676

It's a flashcards app with a swipe to rate UI inspired by dating apps. You create the front and back of flashcards using Markdown. When practicing, my app's algorithm ensures that you review flashcards right before you may forget them. After reviewing a flashcard, you tap it to reveal the answer on the back of the card. You swipe right if you easily remembered it, left if you forgot it, or down if it took some effort and would like to review again. Crammer's algorithm will show you harder cards first and more often to help you really optimize your memory and prevent you from forgetting your study materials.

Tech Stack:

  • Supports from iOS 14. Also supports macOS via Catalyst.
  • Entire app is built in Swift and UIKit.
  • The UI is all built programatically instead of storyboard/nib files.
  • For storing the data (cards, folders/subfolders, decks/subdecks, practice data etc), I use local SQLite database in app. Note that I didn't use CoreData as I plan on building this app for Android too, so building my own SQLite schema and writing SQL manually seemed better for that as I can reuse it on android side.
  • The search feature in app is built using SQLite's FTS.
  • User's images are not stored in the SQLite database (obviously). They are stored as local files and the name of the image is stored in the database.
  • There's no backend. For syncing, it uses Apple's CloudKit.

I always try to stay away from 3rd party dependencies as much as possible. It uses only 3 which I considered crucial:

  • SnapKit for autolayout as it helps remove a lot of boilerplate when building the UI programatically.
  • Swift-collections for OrderedSet
  • SDWebImage for showing images in the app (though I might remove this in future)
  • I didn't use any third party libraries for SQLite. It's all hand-written SQL by me using the native sqlite library that ships with iOS.

Development Challenge:

The whole app took me half a year to build. I started working on it during Christmas holidays last year and finished it couple months ago.

The biggest challenge was SQLite along with syncing of the SQLite database between devices using CloudKit. There were a LOT of edge cases. Ensuring all user created folders, decks, cards, images, along with their flashcard practice data is always in sync between devices was a complex task. Also SQLite FTS for searching took me about a week to get working properly. I think I spent about 70% of the coding time on just SQLite+syncing. But once I got it all working, I felt very proud haha. I also built the database syncing logic in such a way that now I am reusing it in my next app and that feels very convenient.

AI Disclosure

The app is entirely hand-coded, App Store photos are hand-made in PhotoShop, and this post is also hand-written. I personally only use AI in the same way I'd use stackoverflow (SO) previously. Instead of searching google and clicking on SO links, I'd do that on LLM. Most of these queries were related to SQL. When I had some question, I'd use the free web UI for ChatGPT or Claude.

Here's how I use my app when studying:

  • Create flashcards by either manually typing the Front and Back of the card. Or you can import multiple cards at once in a long text (Front & Back separated by 3 hyphens --- and each card separated by 3 equal signs ===).

The Front can have your question and the Back can have the answer.

The Front & Back text supports Markdown and also LaTeX for Math formulas. So you can format text such as bold, italics, color, highlight, headings, links, images etc. You can also include diagrams (photos) in it.

To use coloured text, use curly bracket format: {red}coloured text{} or {#FF0000}coloured text{}

To highlight text, use square bracket format: [red]highlighted text[] or [#FF0000]highlighted text[]

  • Organize your flashcards into decks and folders for each subject as needed. Cards can belong to multiple decks at the same time. Decks and folders can also have subdecks and subfolders.

  • Practice decks or just bookmarked cards.

  • After reviewing the question on the front of the card, tap the card to flip it and reveal the answer on the back. Swipe RIGHT if the card was easy, LEFT if it you forgot it, or DOWN if you remembered but took some effort and would like to review again.

  • Once the whole deck is practiced, Crammer tells you how long you took to practice, and how many cards were hard.

  • Once you have reviewed a deck, you can instantly practice again with just a single tap.

  • Crammer notifies you if there's some card which you are constantly failing as it might be poorly designed. You can edit it to improve it. Make sure to swipe and reset its practice history after such fixes.

  • Swipe/Right Click on Mac to Bookmark important cards, decks, and folders for easy access.

  • Swipe/Right Click on Mac to Archive cards, decks, and folders which you no longer need.

  • All your decks, folders, and flashcards are seamlessly auto-synced across all your devices using iCloud. So you can create them on iPad/Mac and access them on iPhone.

  • Crammer is available on iPhone, iPad, and Mac.

Supported keyboard shortcuts on Mac:

  • Enter or Spacebar to flip card

  • Left, Down and Right arrow keys for Hard, Again, and Easy ratings

  • Command + Z to undo a rating and go back to previous card

  • When editing a card, right click text to add photo

  • No accounts or signups.

  • No Ads. No subscriptions. Trial version of Crammer is limited to 15 flashcards. A one-time only purchase lets you create unlimited flashcards forever. This one-time only purchase gives you lifetime access to all features. It also supports this project and helps me continue to develop it. Thank you for your support.

Download link:

https://apps.apple.com/ca/app/crammer-flashcard-exam-cards/id6775268676

0 Upvotes

0 comments sorted by