Commit f11e96c
authored
Full-Stack Dart: Add React Web Frontend, React Native Mobile, and JSX DSL (#9)
TLDR;
Major refactor adding React web frontend, React Native mobile app, and comprehensive JSX-like DSL. Full-stack Dart-to-JS framework now supports backend, web, and mobile platforms.
What Does This Do?
Adds React Web Frontend (examples/frontend/) - Complete web app with login, registration, and task management using dart_node_react
Adds PR CI GitHubAction (examples/frontend/) - Runs checks and tests for PRs
Adds React Native Mobile App (examples/mobile/) - Mobile app with login, registration, and task list screens using dart_node_react_native
Implements JSX-like DSL (packages/dart_node_react/lib/src/jsx.dart) - Operator-based element composition using >> for concise component syntax
Expands dart_node_react - New hooks (useReducer, useRef, useContext), context API, synthetic events, SVG elements, and testing utilities
Adds dart_node_react_native package - React Native component bindings (View, Text, TextInput, Button, etc.) with testing support
Shared library (examples/shared/) - Common HTTP client, models (Task, User), JS types, and theme styles
Improves WebSocket support - Client-side WebSocket utilities for real-time updates
Streamlines build tooling - Dependency switcher (tools/switch_deps.dart) for local vs release deps
Updates CLAUDE.md rules - Refined coding guidelines (async/await, typedef records, pattern matching)
Brief Details?
Area Changes
New Packages dart_node_react_native, examples/shared, examples/frontend, examples/mobile
React Package JSX DSL, hooks (reducer, ref, context), SVG elements, synthetic events, testing library
Backend Minor formatting cleanup in server.dart, schemas.dart, token_service.dart
Build Tools switch_deps.dart for local/release dependency management, updated build.dart
Documentation JSX_IMPLEMENTATION_PLAN.md design doc, updated README.md quick start
Files Changed 80+ files across 10+ packages/examples
How Do The Tests Prove The Change Works?
Frontend tests (examples/frontend/test/) - UI tests for login form, task management, and app rendering using Chrome platform
Mobile tests (examples/mobile/test/) - Login screen tests, type tests for Task/User models with mock HTTP client
React package tests (packages/dart_node_react/test/) - Unit tests for hooks, elements, and UI interaction tests
Backend tests - Existing server tests continue to pass with formatting changes only
Test configuration uses dart_test.yaml with Chrome platform and custom HTML templates for browser-based testing.1 parent 2b4fcf1 commit f11e96c
103 files changed
Lines changed: 15425 additions & 1869 deletions
File tree
- .github/workflows
- docs
- examples
- backend
- lib
- services
- test
- frontend
- lib
- src
- test
- web
- components
- mobile
- coverage
- test
- lib
- screens
- test
- packages
- dart_node_core
- lib
- src
- dart_node_express
- lib/src
- dart_node_react_native
- lib
- src
- dart_node_react
- lib
- src
- test
- dart_node_ws
- lib/src
- tools
- build
- website/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | | - | |
22 | 20 | | |
23 | | - | |
24 | 21 | | |
25 | 22 | | |
26 | 23 | | |
27 | 24 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 25 | + | |
| 26 | + | |
39 | 27 | | |
40 | 28 | | |
41 | 29 | | |
| |||
72 | 60 | | |
73 | 61 | | |
74 | 62 | | |
75 | | - | |
| 63 | + | |
76 | 64 | | |
77 | 65 | | |
78 | 66 | | |
| |||
81 | 69 | | |
82 | 70 | | |
83 | 71 | | |
84 | | - | |
| 72 | + | |
85 | 73 | | |
86 | 74 | | |
87 | 75 | | |
| |||
102 | 90 | | |
103 | 91 | | |
104 | 92 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | 93 | | |
109 | 94 | | |
110 | 95 | | |
111 | | - | |
| 96 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
38 | 47 | | |
39 | 48 | | |
40 | 49 | | |
| 50 | + | |
| 51 | + | |
41 | 52 | | |
42 | 53 | | |
43 | 54 | | |
| |||
0 commit comments