Skip to content

Commit

Permalink
feat: improve fornted app architecure (#158)
Browse files Browse the repository at this point in the history
* feat(fronted): add packages

* fix md files

* add melos files

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* feat: add SecureStorageService

* feat: add catalyst_voices_shared, upgrade flutter

* Update project.dic

* Update README.md

* Update README.md

* Update README.md
  • Loading branch information
minikin authored Nov 28, 2023
1 parent 712dbf4 commit 1a9e795
Show file tree
Hide file tree
Showing 66 changed files with 689 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ pubspec
rapidoc
redoc
rustc
rxdart
saibatizoku
seckey
slotno
Expand All @@ -91,4 +92,4 @@ xcodeproj
xctest
xctestrun
xcworkspace
yoroi
yoroi
28 changes: 24 additions & 4 deletions catalyst_voices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,26 @@

<!-- markdownlint-disable MD029 -->

This repository contains the Catalyst Voices app and packages.

* [Catalyst Voices](#catalyst-voices)
* [Requirements](#requirements)
* [Getting Started](#getting-started)
* [Bootstrapping](#bootstrapping)
* [Packages](#packages)
* [Flavors](#flavors)
* [Running Tests](#running-tests)

## Requirements

* Flutter: 3.13.9+
* Dart: 3.1.5+
* flutter: 3.16.1+
* Dart: 3.2.0+
* Ruby: 2.5+
* Xcode: 14.2+
* Xcode: 15.0+
* Android Studio: Android Studio Electric Eel | 2022.1.1 +
* Android SDK: 23+
* iOS SDK: 15.0+
* [Melos](https://melos.invertase.dev)
* [Fvm](https://fvm.app/)
* [Fastlane](https://fastlane.tools)
* Flutter & Dart plugins:
* [Visual Studio Code](https://flutter.dev/docs/get-started/editor?tab=vscode)
Expand All @@ -37,6 +40,23 @@ cd catalyst_voices
melos bootstrap
```

### Packages

<!-- markdownlint-disable MD042 -->

| Package | Description | Example |
|-----------------------------------|--------------------------|-----------|
| [catalyst_voices_assets](./packages/catalyst_voices_assets/) | Assets used in Catalyst Voices |[example](./packages/catalyst_voices_assets/example/lib/src/main.dart)|
| [catalyst_voices_blocs](./packages/catalyst_voices_blocs/) | State management of Catalyst Voices |[example](./packages/catalyst_voices_blocs/)|
| [catalyst_voices_localization](./packages/catalyst_voices_localization/) | Localization files for Catalyst Voices |[example](./packages/catalyst_voices_localization/)|
| [catalyst_voices_models](./packages/catalyst_voices_models/) | Models |[example](./packages/catalyst_voices_models/)|
| [catalyst_voices_repositories](./packages/catalyst_voices_repositories/) | Repositories |[example](./packages/catalyst_voices_repositories/)|
| [catalyst_voices_services](./packages/catalyst_voices_services/) | Services |[example](./packages/catalyst_voices_services/)|
| [catalyst_voices_shared](./packages/catalyst_voices_shared/) | Shared code |[example](./packages/catalyst_voices_shared/)|
| [catalyst_voices_view_models](./packages/catalyst_voices_view_models/) | ViewModels |[example](./packages/catalyst_voices_view_models/)|

### Flavors

This project contains 3 flavors:

* development
Expand Down
2 changes: 1 addition & 1 deletion catalyst_voices/lib/bootstrap.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'dart:async';
import 'dart:developer';

import 'package:bloc/bloc.dart';
import 'package:catalyst_voices/app_bloc_observer.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

Future<void> bootstrap(FutureOr<Widget> Function() builder) async {
WidgetsFlutterBinding.ensureInitialized();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ publish_to: none

environment:
sdk: ">=3.2.0 <4.0.0"
flutter: 3.16.0
flutter: 3.16.1

dependencies:
catalyst_voices_assets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ publish_to: none

environment:
sdk: ">=3.2.0 <4.0.0"
flutter: 3.16.0
flutter: 3.16.1

dependencies:
flutter:
Expand Down
44 changes: 44 additions & 0 deletions catalyst_voices/packages/catalyst_voices_blocs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# VSCode 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/
pubspec.lock

# Web related
lib/generated_plugin_registrant.dart

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Test related
coverage
1 change: 1 addition & 0 deletions catalyst_voices/packages/catalyst_voices_blocs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Catalyst Voices Blocs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
include: package:catalyst_analysis/analysis_options.1.0.0.yaml

analyzer:
exclude: [
build/**,
lib/*.g.dart,
lib/generated/**
]

linter:
rules:
public_member_api_docs: false
20 changes: 20 additions & 0 deletions catalyst_voices/packages/catalyst_voices_blocs/coverage_badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
library catalyst_voices_blocs;

export 'src/catalyst_voices_blocs.dart';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class CatalystVoicesBlocs {
const CatalystVoicesBlocs();
}
20 changes: 20 additions & 0 deletions catalyst_voices/packages/catalyst_voices_blocs/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: catalyst_voices_blocs
description: Catalyst Voices Blocs.
version: 0.1.0+1
publish_to: none

environment:
sdk: ">=3.2.0 <4.0.0"
flutter: 3.16.1

dependencies:
bloc: ^8.1.2
bloc_concurrency: ^0.2.2
flutter:
sdk: flutter

dev_dependencies:
bloc_test: ^9.1.4
catalyst_analysis:
path: ../../../catalyst_voices_packages/catalyst_analysis
test: ^1.24.9
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// ignore_for_file: prefer_const_constructors

void main() {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// A Very Good Project created by Very Good CLI.
library catalyst_voices_localization;

export 'src/catalyst_voices_localization.dart';
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ publish_to: none

environment:
sdk: ">=3.2.0 <4.0.0"
flutter: 3.16.0
flutter: 3.16.1

dependencies:
flutter:
Expand Down
7 changes: 7 additions & 0 deletions catalyst_voices/packages/catalyst_voices_models/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See https://www.dartlang.org/guides/libraries/private-files

# Files and directories created by pub
.dart_tool/
.packages
build/
pubspec.lock
1 change: 1 addition & 0 deletions catalyst_voices/packages/catalyst_voices_models/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Catalyst Voices Models
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
include: package:catalyst_analysis/analysis_options.1.0.0.yaml

analyzer:
exclude: [
build/**,
lib/*.g.dart,
lib/generated/**
]

linter:
rules:
public_member_api_docs: false
20 changes: 20 additions & 0 deletions catalyst_voices/packages/catalyst_voices_models/coverage_badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
library catalyst_voices_models;

export 'src/catalyst_voices_models.dart';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class CatalystVoicesModels {
const CatalystVoicesModels();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/example/.idea" />
<excludeFolder url="file://$MODULE_DIR$/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/build" />
<excludeFolder url="file://$MODULE_DIR$/example/android/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/example/android/.idea" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/Pods" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks" />
<excludeFolder url="file://$MODULE_DIR$/example/macos/Flutter" />
<excludeFolder url="file://$MODULE_DIR$/example/macos/Pods" />
<excludeFolder url="file://$MODULE_DIR$/example/macos/.symlinks" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
17 changes: 17 additions & 0 deletions catalyst_voices/packages/catalyst_voices_models/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: catalyst_voices_models
description: Catalyst Voices Models.
version: 0.1.0+1
publish_to: none

environment:
sdk: ">=3.2.0 <4.0.0"
flutter: 3.16.1

dependencies:
flutter:
sdk: flutter

dev_dependencies:
catalyst_analysis:
path: ../../../catalyst_voices_packages/catalyst_analysis
test: ^1.24.9
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// ignore_for_file: prefer_const_constructors
import 'package:catalyst_voices_models/catalyst_voices_models.dart';
import 'package:test/test.dart';

void main() {
group('CatalystVoicesModels', () {
test('can be instantiated', () {
expect(CatalystVoicesModels(), isNotNull);
});
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See https://www.dartlang.org/guides/libraries/private-files

# Files and directories created by pub
.dart_tool/
.packages
build/
pubspec.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Catalyst Voices Repositories
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
include: package:catalyst_analysis/analysis_options.1.0.0.yaml

analyzer:
exclude: [
build/**,
lib/*.g.dart,
lib/generated/**
]

linter:
rules:
public_member_api_docs: false
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
library catalyst_voices_repositories;

export 'src/catalyst_voices_repositories.dart';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class CatalystVoicesRepositories {
const CatalystVoicesRepositories();
}
Loading

0 comments on commit 1a9e795

Please sign in to comment.