chore: initial scaffold for MyADHD Flutter cross-platform client

This commit is contained in:
djg 2026-09-24 01:26:51 +00:00
commit 4c9c2d9327
6 changed files with 228 additions and 0 deletions

40
.gitignore vendored Normal file
View file

@ -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

27
README.md Normal file
View file

@ -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
```

View file

@ -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),
),
);
}
}

View file

@ -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<String, dynamic> toJson() => {
'id': id,
'text': text,
'createdAt': createdAt.toIso8601String(),
};
factory InboxItem.fromJson(Map<String, dynamic> json) => InboxItem(
id: json['id'] as String,
text: json['text'] as String,
createdAt: DateTime.parse(json['createdAt'] as String),
);
}

75
lib/main.dart Normal file
View file

@ -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<HomeScreen> createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
int _currentIndex = 0;
final List<String> _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'),
],
),
);
}
}

22
pubspec.yaml Normal file
View file

@ -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