How shimulraj0/peptide works
1. Overall shape
- This is a Flutter cross-platform client with targets for Android, iOS, web, macOS, Windows, and Linux.
- The repository is mostly a presentation-layer app: there is no obvious backend service, database layer, or API client code in the tree.
2. App entry and shell
- The main application entry is lib/main.dart.
- It likely bootstraps the Flutter app, registers shared state/providers, applies theme, and decides the initial screen flow.
- Platform-specific launch code is standard Flutter scaffolding in the android/, ios/, macos/, windows/, and linux/ directories.
3. Feature decomposition
- The app is organized by feature under lib/presentation/:
- splash/ for startup branding/loading
- onboarding/ for first-run education
- auth/ for login, register, verification, and profile setup
- home/ for the main product experience
- This is a screen-centric architecture, with each feature owning its own UI, view widgets, and local state providers.
4. Authentication flow
- lib/presentation/auth/ contains the user access path:
- login_screen.dart
- register_screen.dart
- verification_screen.dart
- profile_setup_screen.dart
- State is split into auth_provider.dart and profile_provider.dart, indicating the auth flow is managed through provider-based state rather than a separate service layer in the repo.
5. Main product flow
- lib/presentation/home/ contains the primary app functionality:
- home_screen.dart
- add_peptide_screen.dart
- peptide_details_screen.dart
- peptide_library_screen.dart
- log_entry_screen.dart
- This suggests the app is centered on peptide management, with flows for browsing a library, adding entries, viewing details, and recording logs.
6. State and navigation
- lib/presentation/home/providers/ contains:
- navigation_provider.dart
- protocol_provider.dart
- The architecture appears to use providers for both navigation state and domain/process state around “protocols,” which likely drive the home experience and screen switching.
- The UI is therefore probably composed of a shell screen plus nested views controlled by provider state.
7. Reusable views and widgets
- lib/presentation/home/views/ holds secondary panels and settings-style screens such as:
- inventory, log history, notification settings, personal details, privacy policy, security, terms of service, leave review, and log confirmation
- lib/presentation/home/widgets/ contains reusable UI building blocks like the custom bottom nav, dashboard widgets, library widgets, log widgets, and protocol card.
- This indicates a mixed composition model: screens assemble reusable widgets and smaller feature views.
8. Domain model
- lib/data/models/peptide_model.dart is the only explicit model in the tree.
- That suggests the app’s core domain object is a peptide record, which is likely passed from screen to screen and rendered in library/detail/log views.
- There is no visible repository/service layer, so model handling is likely lightweight and UI-driven in this codebase.
9. Shared design system
- lib/core/theme/ contains app_colors.dart and app_text_styles.dart.
- This implies a centralized styling layer used across all features for consistent color and typography.
- lib/utils/page_transitions.dart suggests custom navigation animation behavior is part of the shared UI infrastructure.
10. Splash, onboarding, and visual polish
- The splash feature includes dna_helix_painter.dart, indicating custom painting for a branded loading/intro screen.
- Onboarding and splash exist as distinct phases before auth/home, which makes the app flow more like a guided product experience than a simple CRUD app.
11. Assets and platform packaging
- assets/ is present, but its contents are not listed here, so asset usage is likely for images/icons/media consumed by the Flutter UI.
- The platform directories contain the usual Flutter runners and manifest/plist/configuration files; they do not appear to introduce custom native architecture beyond standard app launch and embedding.
12. Testing and quality
- There is a minimal widget test in test/widget_test.dart and native template tests for some platforms.
- analysis_options.yaml and pubspec.lock indicate standard Flutter/Dart tooling and dependency management.
- Overall, the repo looks like an early-stage but well-structured Flutter app with provider-based state, feature-based screen grouping, and a peptide-centric user flow.
Main entry points: home_screen.dart Home shell · auth_provider.dart Auth state · peptide_model.dart Peptide model · login_screen.dart Login
Components 23
Platform shells
Flutter launchers and native runner scaffolding for each supported target.
- Platform runners · Standard Android, iOS, macOS, Windows, Linux, and web runner scaffolding.
Shared core
Theme, transitions, and domain model shared across the app.
- App entry · Bootstraps the application and initial route flow.
lib/main.dart - Peptide model · Core domain object used across library and detail flows.
lib/data/models/peptide_model.dart - Theme core · Central colors and text styles for the app.
lib/core/theme - Transitions · Shared page transition behavior.
lib/utils/page_transitions.dart
Auth flow
Login and profile setup screens plus their local state providers.
- Login · Entry point for returning users.
lib/presentation/auth/login_screen.dart - Register · User account creation flow.
lib/presentation/auth/register_screen.dart - Verify · Verification step in the access flow.
lib/presentation/auth/verification_screen.dart - Profile setup · Collects profile details after registration.
lib/presentation/auth/profile_setup_screen.dart - Auth state · Holds login and registration state.
lib/presentation/auth/providers/auth_provider.dart - Profile state · Manages profile setup state.
lib/presentation/auth/providers/profile_provider.dart
Home product
Primary peptide-centered experience, related views, and reusable widgets.
- Home shell · Main navigation shell for the peptide experience.
lib/presentation/home/home_screen.dart - Nav state · Controls in-app navigation and tab state.
lib/presentation/home/providers/navigation_provider.dart - Protocol state · Holds domain/process state for home workflows.
lib/presentation/home/providers/protocol_provider.dart - Library · Browses peptide records and collections.
lib/presentation/home/peptide_library_screen.dart - Add peptide · Creates new peptide entries.
lib/presentation/home/add_peptide_screen.dart - Peptide details · Shows a single peptide record in detail.
lib/presentation/home/peptide_details_screen.dart - Log entry · Records usage or protocol log data.
lib/presentation/home/log_entry_screen.dart - Secondary views · Inventory, history, settings, policy, and confirmation subviews.
lib/presentation/home/views - UI widgets · Reusable navigation, dashboard, library, log, and protocol widgets.
lib/presentation/home/widgets
Startup flow
Splash and onboarding screens that gate the main app experience.
- Splash · Branded loading screen with custom painting.
lib/presentation/splash/splash_screen.dart - DNA art · Draws the DNA helix visual used by splash.
lib/presentation/splash/widgets/dna_helix_painter.dart - Onboarding · First-run education and guided product entry.
lib/presentation/onboarding/onboarding_screen.dart
Connections 29
- App entry → Splash: starts · App bootstraps into the splash flow.
- App entry → Home shell: routes · Initial routing eventually lands in the main shell.
- Splash → DNA art: renders · Splash screen uses custom painted branding art.
- Splash → Onboarding: continues to · Startup flow progresses into onboarding.
- Onboarding → Login: gates · Onboarding leads into authentication.
- Login → Auth state: uses · Login screen reads and updates auth state.
- Register → Auth state: uses · Registration screen reads and updates auth state.
- Verify → Auth state: uses · Verification screen uses auth state.
- Profile setup → Profile state: uses · Profile setup screen uses profile state.
- Register → Profile setup: advances to · Registration can lead into profile setup.
- Auth state → Profile state: hands off · Auth completion flows into profile completion.
- Profile setup → Home shell: enters · Successful setup leads into the home shell.
- Home shell → Nav state: controls · Home shell is driven by navigation state.
- Home shell → Protocol state: drives · Home shell coordinates protocol/domain state.
- Home shell → Library: opens · Home shell exposes the peptide library.
- Home shell → Add peptide: opens · Home shell launches peptide creation.
- Home shell → Peptide details: opens · Home shell routes to detail views.
- Home shell → Log entry: opens · Home shell launches logging flows.
- Home shell → Secondary views: composes · Secondary screens are part of the main experience.
- Home shell → UI widgets: composes · Shell assembles reusable UI widgets.
- Library → Peptide model: reads · Library renders peptide records.
- Peptide details → Peptide model: reads · Detail view displays the peptide model.
- Add peptide → Peptide model: creates · Add flow produces peptide records.
- Log entry → Peptide model: references · Log flow ties entries back to peptides.
- UI widgets → Theme core: styles with · Reusable UI follows shared design tokens.
- Login → Theme core: styles with · Auth screens share the app theme.
- Home shell → Theme core: styles with · Main shell uses shared theme definitions.
- Home shell → Transitions: animates with · Navigation uses custom page transitions.
- Platform runners → App entry: launches · Native shells start the Flutter entrypoint.