A modern Anki flashcard application built with Swift and Python.
I used to be a frequent Quizlet user, but I grew tired of how cumbersome it was to add to and enhance my flashcards. This app offers several improvements that make it more suitable for everyday use:
- 📝 Easy editing and modification of flashcards
- 🏷️ Tag-based organization (where one card can appear in multiple sets)
- 📊 Streak and incorrect/correct ratio tracking and sorting
- 🔔 macOS notifications to nudge behavior
- 🖼️ Image support
- ⌨ Keyboard shortcuts
- macOS 12.0 or later
- Xcode 14.0 or later (for development)
- Python 3.8 or later
-
Clone the repository:
git clone /~https://github.com/ntlind/persist.git cd persist
-
Install dependencies:
# For production make install # For development (includes pre-commit hooks) make install-dev
Running
make install-dev
will install pre-commit hooks that:- Format Python code with Black
- Lint Python code with Flake8
- Check for common issues (trailing whitespace, merge conflicts, etc.)
Run the backend server:
make run-dev
On your first run, you need to initialize the database:
make db-init
Open the frontend in Xcode:
make xcode
# or make build-frontend
Run tests:
make test
Clean build artifacts:
make clean
Create application bundle:
make bundle
Once bundled, you can run the app from the Finder:
open dist/Persist.app
Debug distribution:
make debug-dist
Command | Description |
---|---|
run-dev |
Run backend server in development mode with hot reload |
run-prod |
Run backend server in production mode |
install |
Install production dependencies |
install-dev |
Install development dependencies and pre-commit hooks |
test |
Run tests with coverage reporting |
lint |
Run pre-commit hooks on all files |
clean |
Remove build artifacts and cache files |
db-init |
Initialize the database |
db-migrate |
Run database migrations |
db-rollback |
Rollback last database migration |
xcode |
Open the project in Xcode |
build-frontend |
Build the frontend in Release configuration |
bundle |
Create the application bundle |
debug-dist |
Debug the distributed application bundle |
copy-prod-db |
Copy production database to development environment |