How nilsreichardt/ankigpt works
Project type and purpose
• This is a Flutter-based full-stack client application (multi-platform: web, macOS, mobile) that turns lecture slides or text into flashcards using the OpenAI GPT APIs and allows export to Anki via CSV. It uses Firebase (Auth, Firestore, Storage, Cloud Functions) and integrates Stripe for payments.
File structure
• Top-level:
• assets/, fonts/, web/, macos/ → platform assets and configs
• lib/ → Dart source, split into src/infrastructure (data access), src/models (domain objects), src/providers (state + business logic), src/pages & widgets (presentation)
• firebase.json, .firebaserc → Firebase hosting and project setup
• build.yaml, pubspec.yaml → build & dependency management
• test/ → unit and widget tests
• Architectural patterns:
• Layered architecture: Presentation → State (Riverpod providers) → Domain (models) → Infrastructure (repositories) → External backends
• Uses code-gen (freezed, json_serializable, Riverpod code gen)
• Modular separation by feature in pages, providers, models
README insights
• Core flow: user uploads PDF/text → app splits text → calls AI (GPT-3.5/4) via Cloud Functions or direct API → returns list of flashcards → user edits/deletes/deploys → exports CSV or shares decks → payment handled by Stripe
• Backend (prompts) is closed source; client orchestrates calls