Skip to content

Commit e985d47

Browse files
authored
Merge pull request #14 from dbsectrainer/claude/convert-to-flutter-011CUvSoGyHQ3xAPnd9aEXnU
2 parents c41ea70 + a0419eb commit e985d47

15 files changed

+1631
-43
lines changed

.gitignore

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dist/
1515
downloads/
1616
eggs/
1717
.eggs/
18-
lib/
18+
# lib/ - commented out for Flutter compatibility
1919
lib64/
2020
parts/
2121
sdist/
@@ -65,3 +65,57 @@ coverage.xml
6565

6666
# Mac
6767
.DS_Store
68+
69+
# Flutter/Dart/Pub related
70+
**/doc/api/
71+
**/ios/Flutter/.last_build_id
72+
.dart_tool/
73+
.flutter-plugins
74+
.flutter-plugins-dependencies
75+
.packages
76+
.pub-cache/
77+
.pub/
78+
/build/
79+
80+
# Web related
81+
lib/generated_plugin_registrant.dart
82+
83+
# Symbolication related
84+
app.*.symbols
85+
86+
# Obfuscation related
87+
app.*.map.json
88+
89+
# Android Studio will place build artifacts here
90+
/android/app/debug
91+
/android/app/profile
92+
/android/app/release
93+
94+
# iOS/XCode related
95+
**/ios/**/*.mode1v3
96+
**/ios/**/*.mode2v3
97+
**/ios/**/*.moved-aside
98+
**/ios/**/*.pbxuser
99+
**/ios/**/*.perspectivev3
100+
**/ios/**/*sync/
101+
**/ios/**/.sconsign.dblite
102+
**/ios/**/.tags*
103+
**/ios/**/.vagrant/
104+
**/ios/**/DerivedData/
105+
**/ios/**/Icon?
106+
**/ios/**/Pods/
107+
**/ios/**/.symlinks/
108+
**/ios/**/profile
109+
**/ios/**/xcuserdata
110+
**/ios/.generated/
111+
**/ios/Flutter/App.framework
112+
**/ios/Flutter/Flutter.framework
113+
**/ios/Flutter/Flutter.podspec
114+
**/ios/Flutter/Generated.xcconfig
115+
**/ios/Flutter/ephemeral/
116+
**/ios/Flutter/app.flx
117+
**/ios/Flutter/app.zip
118+
**/ios/Flutter/flutter_assets/
119+
**/ios/Flutter/flutter_export_environment.sh
120+
**/ios/ServiceDefinitions.json
121+
**/ios/Runner/GeneratedPluginRegistrant.*

README.md

Lines changed: 95 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55

66
A focused Modern Standard Arabic learning platform designed to take learners from foundational script and pronunciation to advanced professional fluency over a 40-day journey. The program offers modular daily lessons through interactive audio‑visual materials, YouTube video demonstrations, real‑world conversation practice, and culturally relevant topics—ideal for travelers, professionals, and global citizens.
77

8+
**Now available as a Flutter mobile application!** 📱
9+
810
## Technical Skills Demonstrated
911

10-
### Web Development
11-
- Interactive, responsive web interface using HTML5, CSS3, and modern JavaScript
12-
- Dynamic content updates and micro‑interactions for enhanced user engagement
13-
- YouTube API integration for embedded instructional videos
14-
- Mobile‑first responsive design using media queries and grid layouts
12+
### Flutter/Mobile Development
13+
- Cross-platform mobile application (iOS & Android) using Flutter & Dart
14+
- Native performance with smooth animations and transitions
15+
- Offline-first architecture with local asset management
16+
- Material Design UI with custom theming and RTL support
1517

1618
### Python Development
1719
- Automated content generation scripts for lesson materials
@@ -42,23 +44,25 @@ A focused Modern Standard Arabic learning platform designed to take learners fro
4244

4345
## Project Structure
4446

45-
- `index.html`: Main dashboard with daily progress overview
46-
- `day.html`: Daily lesson interface with audio, text, and exercises
47-
- `supplementary.html`: Additional learning resources and practice materials
48-
- `css/`: Stylesheets for the web interface
49-
- `styles.css`: Main stylesheet
50-
- `video-player.css`: Styles for the YouTube video player
51-
- `native-speaker.css`: Styles for native speaker content
52-
- `js/`: JavaScript functionality and interactive features
53-
- `script.js`: Core application logic
54-
- `video-loader.js`: Loads YouTube videos for lessons
55-
- `video-loader-supplementary.js`: Loads supplementary YouTube videos
56-
- `audio_files/`:
57-
- Supplementary audio files in `supplementary/`
58-
- `text_files/`:
59-
- Supplementary text files in `supplementary/`
47+
### Flutter Application
48+
- `lib/`: Flutter/Dart source code
49+
- `main.dart`: Application entry point
50+
- `models/`: Data models (LessonDay, SupplementaryContent, VideoInfo)
51+
- `screens/`: UI screens (Dashboard, Lesson, Supplementary)
52+
- `services/`: Business logic (ContentService, ProgressService)
53+
- `utils/`: Utilities (AppTheme, constants)
54+
- `pubspec.yaml`: Flutter project configuration and dependencies
55+
- `analysis_options.yaml`: Dart/Flutter linting rules
56+
57+
### Assets & Content
58+
- `audio_files/`: MP3 audio files for lessons
59+
- `supplementary/`: Supplementary audio files
60+
- `text_files/`: Lesson content in three languages
61+
- `supplementary/`: Supplementary text files
6062
- `videos.json`: YouTube video IDs for each daily lesson
6163
- `videos_supplementary.json`: IDs for supplementary videos
64+
65+
### Content Generation (Python)
6266
- Python content generation scripts:
6367
- `arabic_phrases_days_01_07.py`: Phrases for days 1-7
6468
- `arabic_phrases_days_08_14.py`: Phrases for days 8-14
@@ -69,6 +73,11 @@ A focused Modern Standard Arabic learning platform designed to take learners fro
6973
- `video_search.py`: Tool for searching relevant videos
7074
- `requirements.txt`: Python package dependencies
7175

76+
### Legacy Web Version
77+
- `index.html`, `day.html`, `supplementary.html`: Original web interface
78+
- `css/`: Web stylesheets
79+
- `js/`: Web JavaScript files
80+
7281
## Course Structure (40 Days)
7382

7483
### Foundations (Days 1–7)
@@ -133,14 +142,58 @@ A focused Modern Standard Arabic learning platform designed to take learners fro
133142

134143
## Development Setup
135144

136-
### Requirements
145+
### Flutter Application Setup
146+
147+
#### Requirements
148+
- Flutter SDK 3.0.0 or higher
149+
- Dart SDK 3.0.0 or higher
150+
- Android Studio / Xcode (for mobile deployment)
151+
- An emulator or physical device
152+
153+
#### Installation
154+
1. Clone the repository:
155+
```bash
156+
git clone https://github.com/dbsectrainer/Arabic-Pathways.git
157+
cd Arabic-Pathways
158+
```
159+
160+
2. Install Flutter dependencies:
161+
```bash
162+
flutter pub get
163+
```
164+
165+
3. Run the app:
166+
```bash
167+
# On a connected device or emulator
168+
flutter run
169+
170+
# For specific platforms
171+
flutter run -d android
172+
flutter run -d ios
173+
```
174+
175+
#### Building for Production
176+
```bash
177+
# Android APK
178+
flutter build apk
179+
180+
# Android App Bundle
181+
flutter build appbundle
182+
183+
# iOS
184+
flutter build ios
185+
```
186+
187+
### Content Generation (Python)
188+
189+
#### Requirements
137190
- Python 3.12+
138191
- Required Python packages:
139192
```bash
140193
pip install gtts edge-tts pandas
141194
```
142195

143-
### Generate Lessons
196+
#### Generate Lessons
144197
```bash
145198
# Generate content for days 1-40
146199
python arabic_phrases_days_01_07.py
@@ -153,36 +206,36 @@ python arabic_phrases_days_31_40.py
153206
python arabic_phrases_supplementary.py
154207
```
155208

156-
### Run the Site
209+
### Legacy Web Version
157210
Open `index.html` in any modern browser—no server setup required.
158211

159212
## Usage Guide
160-
1. Launch the dashboard and select your current day
161-
2. Listen to English explanations and native Arabic pronunciations
162-
3. Read along with transliteration and Arabic script
163-
4. Complete interactive exercises and script tracing drills
164-
5. Watch YouTube demonstrations for cultural and pronunciation context
165-
6. Earn daily badges and track your fluency progress
166-
167-
## Storage
168-
Uses localStorage to save:
169-
- Completed lessons and last visited day
170-
- Audio playback preferences (e.g., speed, loop)
171-
- Custom notes and bookmarks
213+
1. Launch the app and view the dashboard with all 40 days
214+
2. Select any day to start learning
215+
3. Switch between Arabic, transliteration, and English views
216+
4. Listen to native Arabic pronunciation and English explanations
217+
5. Watch embedded YouTube videos for visual learning
218+
6. Mark lessons complete to track your progress
219+
7. Access supplementary content for additional practice
172220

173221
## Features
174-
- 40 days of Arabic phrases with audio and transliteration
175-
- Supplementary materials
176-
- Video and audio search
177222

178-
## Getting Started
179-
1. Clone the repo
180-
2. Install requirements: `pip install -r requirements.txt`
181-
3. Run scripts as needed
223+
### Mobile App Features
224+
- **Offline Support**: All lessons and audio work without internet
225+
- **Progress Tracking**: Track completed lessons with persistent storage
226+
- **Trilingual Display**: Toggle between Arabic, transliteration, and English
227+
- **Audio Playback**: Built-in audio player for pronunciation practice
228+
- **Video Integration**: Embedded YouTube videos for each lesson
229+
- **Responsive Design**: Works on phones and tablets
230+
- **RTL Support**: Proper right-to-left text rendering for Arabic
182231

183232
## Running Tests
184233
```bash
234+
# Python tests
185235
pytest
236+
237+
# Flutter tests
238+
flutter test
186239
```
187240

188241
## Contributing

analysis_options.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
linter:
4+
rules:
5+
- always_declare_return_types
6+
- avoid_print
7+
- prefer_const_constructors
8+
- prefer_const_declarations
9+
- prefer_const_literals_to_create_immutables
10+
- prefer_final_fields
11+
- prefer_final_locals
12+
- sort_child_properties_last
13+
- use_key_in_widget_constructors

fonts/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Fonts Setup
2+
3+
This Flutter application uses two font families:
4+
5+
## Required Fonts
6+
7+
### 1. Poppins
8+
- Download from [Google Fonts](https://fonts.google.com/specimen/Poppins)
9+
- Required weights:
10+
- `Poppins-Regular.ttf` (400)
11+
- `Poppins-Bold.ttf` (700)
12+
13+
### 2. Noto Sans Arabic
14+
- Download from [Google Fonts](https://fonts.google.com/noto/specimen/Noto+Sans+Arabic)
15+
- Required weights:
16+
- `NotoSansArabic-Regular.ttf` (400)
17+
- `NotoSansArabic-Bold.ttf` (700)
18+
19+
## Installation
20+
21+
1. Download the font files from the links above
22+
2. Place them in this `fonts/` directory with the exact names listed
23+
3. The fonts should be automatically detected by Flutter via `pubspec.yaml`
24+
25+
## Alternative: System Fonts
26+
27+
If you prefer not to bundle fonts, you can modify `lib/utils/app_theme.dart` to use system fonts instead by removing or commenting out the `fontFamily` properties.
28+
29+
## Font File Structure
30+
31+
After setup, your directory should look like:
32+
```
33+
fonts/
34+
├── README.md (this file)
35+
├── Poppins-Regular.ttf
36+
├── Poppins-Bold.ttf
37+
├── NotoSansArabic-Regular.ttf
38+
└── NotoSansArabic-Bold.ttf
39+
```

lib/main.dart

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter/services.dart';
3+
import 'screens/dashboard_screen.dart';
4+
import 'utils/app_theme.dart';
5+
6+
void main() {
7+
WidgetsFlutterBinding.ensureInitialized();
8+
9+
// Set preferred orientations
10+
SystemChrome.setPreferredOrientations([
11+
DeviceOrientation.portraitUp,
12+
DeviceOrientation.portraitDown,
13+
DeviceOrientation.landscapeLeft,
14+
DeviceOrientation.landscapeRight,
15+
]);
16+
17+
runApp(const ArabicPathwaysApp());
18+
}
19+
20+
class ArabicPathwaysApp extends StatelessWidget {
21+
const ArabicPathwaysApp({super.key});
22+
23+
@override
24+
Widget build(BuildContext context) {
25+
return MaterialApp(
26+
title: 'Arabic Pathways',
27+
theme: AppTheme.lightTheme,
28+
debugShowCheckedModeBanner: false,
29+
home: const DashboardScreen(),
30+
);
31+
}
32+
}

lib/models/lesson_day.dart

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
class LessonDay {
2+
final int dayNumber;
3+
final String title;
4+
final String arabicContent;
5+
final String transliterationContent;
6+
final String englishContent;
7+
final String arabicAudioPath;
8+
final String englishAudioPath;
9+
final String? videoId;
10+
final String level;
11+
12+
LessonDay({
13+
required this.dayNumber,
14+
required this.title,
15+
required this.arabicContent,
16+
required this.transliterationContent,
17+
required this.englishContent,
18+
required this.arabicAudioPath,
19+
required this.englishAudioPath,
20+
this.videoId,
21+
required this.level,
22+
});
23+
24+
String get levelName {
25+
if (dayNumber <= 7) return 'Level 1: Foundations';
26+
if (dayNumber <= 14) return 'Level 2: Essential Daily Phrases';
27+
if (dayNumber <= 22) return 'Level 3: Cultural & Social';
28+
if (dayNumber <= 30) return 'Level 4: Professional Communication';
29+
return 'Level 5: Advanced Fluency';
30+
}
31+
32+
String get levelColor {
33+
if (dayNumber <= 7) return '#4A90E2';
34+
if (dayNumber <= 14) return '#50C878';
35+
if (dayNumber <= 22) return '#FF6B6B';
36+
if (dayNumber <= 30) return '#9B59B6';
37+
return '#F39C12';
38+
}
39+
}

0 commit comments

Comments
 (0)