commit 4c9c2d93273d02bde09984a6c6955263656b2769 Author: djg Date: Thu Sep 24 01:26:51 2026 +0000 chore: initial scaffold for MyADHD Flutter cross-platform client diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e550d2f --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# Visual Studio Code related +.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Symbol formatting +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will create this file on sync +local.properties diff --git a/README.md b/README.md new file mode 100644 index 0000000..78d64dd --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# MyADHD Flutter + +A cross-platform Flutter client for **myadhd.dev** — designed for neurodivergent minds with zero shame mechanics, local-first privacy, and hardware-level sensory support. + +## Supported Targets +- **Web**: Lightweight, fast-loading client targeting `myadhd.dev` +- **Mobile (iOS & Android)**: Somatic haptics, lockscreen Live Activities, and home screen widgets +- **Desktop (macOS, Windows, Linux)**: Menu bar / system tray companion with global summon hotkeys + +## Architecture +See `PLANS/FLUTTER_MIGRATION_BLUEPRINT.md` for full system architecture. + +``` +lib/ +├── core/ +│ ├── audio/ # Soundscapes & grounding pings +│ ├── haptics/ # Somatic physical pulse rhythms +│ ├── storage/ # Local-first persistence +│ └── theme/ # Calm, low-stimulation dark theme +├── features/ +│ ├── brain_dump/ # Quick capture & anti-guilt daily sweep +│ ├── one_thing/ # Single-task focus surface +│ ├── focus_timer/ # Visual pie countdown & interval chimes +│ ├── unstuck_protocol/ # 3-step de-escalation & breathing guide +│ └── body_doubler/ # Circadian ambient presence +└── main.dart +``` diff --git a/lib/core/theme/app_theme.dart b/lib/core/theme/app_theme.dart new file mode 100644 index 0000000..2f9ba5b --- /dev/null +++ b/lib/core/theme/app_theme.dart @@ -0,0 +1,41 @@ +import 'package:flutter/material.dart'; + +/// Calm, low-stimulation dark palette matching myadhd.dev +class AppTheme { + static const Color bg = Color(0xFF14141C); + static const Color bg2 = Color(0xFF1B1B26); + static const Color card = Color(0xFF1E1E2A); + static const Color line = Color(0xFF2C2C3C); + static const Color text = Color(0xFFE6E6F0); + static const Color dim = Color(0xFF9C9CB4); + static const Color accent = Color(0xFFA78BFA); + static const Color accentDim = Color(0xFF6D5AA8); + static const Color good = Color(0xFF7DD3A0); + static const Color warm = Color(0xFFF9C846); + + static ThemeData get darkTheme { + return ThemeData( + brightness: Brightness.dark, + scaffoldBackgroundColor: bg, + colorScheme: const ColorScheme.dark( + background: bg, + surface: card, + primary: accent, + secondary: good, + onBackground: text, + onSurface: text, + ), + cardTheme: CardTheme( + color: card, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18), + side: const BorderSide(color: line, width: 1.5), + ), + ), + textTheme: const TextTheme( + bodyMedium: TextStyle(color: text, height: 1.6), + bodySmall: TextStyle(color: dim), + ), + ); + } +} diff --git a/lib/features/brain_dump/models/inbox_item.dart b/lib/features/brain_dump/models/inbox_item.dart new file mode 100644 index 0000000..f712f2e --- /dev/null +++ b/lib/features/brain_dump/models/inbox_item.dart @@ -0,0 +1,23 @@ +class InboxItem { + final String id; + final String text; + final DateTime createdAt; + + InboxItem({ + required this.id, + required this.text, + required this.createdAt, + }); + + Map toJson() => { + 'id': id, + 'text': text, + 'createdAt': createdAt.toIso8601String(), + }; + + factory InboxItem.fromJson(Map json) => InboxItem( + id: json['id'] as String, + text: json['text'] as String, + createdAt: DateTime.parse(json['createdAt'] as String), + ); +} diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..af834c3 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,75 @@ +import 'package:flutter/material.dart'; +import 'core/theme/app_theme.dart'; + +void main() { + runApp(const MyAdhdApp()); +} + +class MyAdhdApp extends StatelessWidget { + const MyAdhdApp({super.key}); + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'myadhd', + debugShowCheckedModeBanner: false, + theme: AppTheme.darkTheme, + home: const HomeScreen(), + ); + } +} + +class HomeScreen extends StatefulWidget { + const HomeScreen({super.key}); + + @override + State createState() => _HomeScreenState(); +} + +class _HomeScreenState extends State { + int _currentIndex = 0; + + final List _tabs = [ + 'Break it down', + 'Focus timer', + 'Dopamine menu', + 'One thing', + 'Brain dump', + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: Colors.transparent, + elevation: 0, + title: RichText( + text: const TextSpan( + style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold), + children: [ + TextSpan(text: 'myadhd', style: TextStyle(color: AppTheme.text)), + TextSpan(text: '.dev', style: TextStyle(color: AppTheme.accent)), + ], + ), + ), + ), + body: Center( + child: Text( + _tabs[_currentIndex], + style: const TextStyle(fontSize: 24, color: AppTheme.text), + ), + ), + bottomNavigationBar: NavigationBar( + selectedIndex: _currentIndex, + onDestinationSelected: (i) => setState(() => _currentIndex = i), + destinations: const [ + NavigationDestination(icon: Icon(Icons.splitscreen), label: 'Break'), + NavigationDestination(icon: Icon(Icons.timer_outlined), label: 'Timer'), + NavigationDestination(icon: Icon(Icons.restaurant_menu), label: 'Menu'), + NavigationDestination(icon: Icon(Icons.filter_center_focus), label: 'One Thing'), + NavigationDestination(icon: Icon(Icons.inventory_2_outlined), label: 'Dump'), + ], + ), + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..7a52ae9 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,22 @@ +name: myadhd +description: "A calm, zero-shame ADHD toolkit for mobile, desktop, and web." +publish_to: "none" +version: 1.0.0+1 + +environment: + sdk: ">=3.0.0 <4.0.0" + flutter: ">=3.10.0" + +dependencies: + flutter: + sdk: flutter + shared_preferences: ^2.2.0 + provider: ^6.0.5 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^2.0.0 + +flutter: + uses-material-design: true