| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A native macOS desktop app for LeetCode practice, built with Flutter.
Browse ~3,000 problems offline, write solutions in a syntax-highlighted editor, run code against test cases, view official solutions, track your progress with stats and heatmaps, and follow contest schedules — all from your desktop.
Python 3, Python, Java, C++, C, JavaScript, TypeScript, Go, Rust, Swift, Kotlin, C#, Ruby, Scala, Dart, PHP, MySQL (17 total)
# Clone the repository
git clone https://github.com/your-username/code_forge.git
cd code_forge
# Install dependencies
flutter pub get
# Generate Drift database code
dart run build_runner build --delete-conflicting-outputs
# Run the app
flutter run -d macosCodeForge uses cookie-based authentication. To connect:
Your credentials are stored securely in the macOS Keychain via flutter_secure_storage. Features that require authentication (Dashboard stats, Run/Submit, Submission History, Contests) become available after connecting.
Clean Architecture with BLoC pattern across 7 features:
lib/ ├── core/ # Shared infrastructure │ ├── constants/ # App constants, API URLs, language mappings │ ├── database/ # Drift/SQLite — 8 tables, DAOs, migrations (schema v3) │ ├── network/ # Dio HTTP client, GraphQL queries, cookie & retry interceptors │ ├── theme/ # Material3 light/dark themes, color palette, 4 editor themes │ ├── navigation/ # GoRouter with StatefulShellRoute (sidebar shell) │ ├── storage/ # Keychain wrapper (flutter_secure_storage) │ ├── dependency_injection/ # GetIt service locator │ └── platform/ # macOS window management ├── features/ │ ├── auth/ # Cookie auth → Keychain → API validation │ ├── problems/ # Browse, search, filter, favorites (SQLite + remote sync) │ ├── editor/ # Code editor, run/submit, notes, solutions, templates │ ├── dashboard/ # Stats, charts, heatmap, daily challenge, contest stats │ ├── submissions/ # Submission history (SQLite) │ ├── contests/ # Contest calendar with countdown timer │ └── settings/ # Editor preferences (HydratedCubit), code templates └── shared/ # Reusable widgets: sidebar shell, split view, loading/error states
Each feature follows data → domain → presentation layers with BLoC/Cubit for state management.
8 SQLite tables managed by Drift ORM:
| Table | Purpose |
|---|---|
| problems | Cached LeetCode problems (~3,000 rows) |
| topic_tags | Tag/category reference |
| problem_topic_tags | Many-to-many join table |
| code_snippets | Language-specific starter code per problem |
| submissions | User submission history |
| user_progress | Local progress tracking (streak, totals) |
| notes | Per-problem notes |
| code_templates | Custom boilerplate per language |
| Feature | State | Persistence |
|---|---|---|
| Auth | AuthBloc | Keychain |
| Problems | ProblemListBloc | SQLite |
| Code Editor | CodeEditorBloc | In-memory drafts |
| Code Execution | CodeExecutionBloc | SQLite |
| Dashboard | DashboardBloc | GraphQL cache |
| Submissions | SubmissionsBloc | SQLite |
| Contests | ContestBloc | GraphQL cache |
| Settings | SettingsCubit (HydratedCubit) | Local JSON |
| Notes | NoteCubit | SQLite |
| Solutions | SolutionCubit | GraphQL cache |
| Code Templates | CodeTemplateCubit | SQLite |
The LeetCodeApiClient (Dio-based) communicates via:
Results are polled with exponential backoff (1s → 10s, max 30 attempts). Auth is handled via LEETCODE_SESSION + csrftoken cookies injected automatically by CookieInterceptor.
| Category | Package |
|---|---|
| State Management | flutter_bloc, hydrated_bloc, bloc_concurrency |
| Database | drift, drift_flutter, sqlite3_flutter_libs |
| Network | dio, connectivity_plus, pretty_dio_logger |
| Navigation | go_router |
| Code Editor | flutter_code_editor, flutter_highlight |
| HTML Rendering | flutter_widget_from_html |
| Charts | fl_chart |
| Dependency Injection | get_it |
| Secure Storage | flutter_secure_storage |
| Utilities | dartz, rxdart, intl, url_launcher, logger |
| UI | google_fonts, shimmer |
| macOS | window_manager |
flutter testThe test suite has 170+ test cases across unit tests (entities, use cases, repositories), BLoC tests, and widget tests. Tests are organized to mirror the lib/ structure under test/.
flutter build macos --releaseThe built app will be at build/macos/Build/Products/Release/code_forge.app.
GitHub Actions runs on every push:
See CONTRIBUTING.md for detailed guidelines.
MIT — see LICENSE for details.
CodeForge is an unofficial, community-built tool. It is not affiliated with or endorsed by LeetCode. Use responsibly and in accordance with LeetCode's terms of service.
| Back | FazBrowse Home | New Git URL |