Skip to content

Commit 8f992e3

Browse files
authored
Merge pull request #8 from HellBus1/1.0.0
Staging 1.0.0
2 parents 2eb0ee0 + 234547a commit 8f992e3

84 files changed

Lines changed: 9762 additions & 215 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: VentExpensePro CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- staging
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Flutter
18+
uses: subosito/flutter-action@v2
19+
with:
20+
channel: 'stable'
21+
22+
- name: Install dependencies
23+
run: flutter pub get
24+
25+
- name: Analyze project source
26+
run: flutter analyze
27+
28+
- name: Run tests
29+
run: flutter test

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,6 @@ app.*.map.json
4444
/android/app/release
4545

4646
*.env
47-
*.freezed.dart
47+
*.freezed.dart
48+
49+
google-services.json

analysis_options.yaml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
1-
# This file configures the analyzer, which statically analyzes Dart code to
2-
# check for errors, warnings, and lints.
3-
#
4-
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5-
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6-
# invoked from the command line by running `flutter analyze`.
7-
8-
# The following line activates a set of recommended lints for Flutter apps,
9-
# packages, and plugins designed to encourage good coding practices.
101
include: package:flutter_lints/flutter.yaml
112

123
linter:
13-
# The lint rules applied to this project can be customized in the
14-
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15-
# included above or to enable additional rules. A list of all available lints
16-
# and their documentation is published at https://dart.dev/lints.
17-
#
18-
# Instead of disabling a lint rule for the entire project in the
19-
# section below, it can also be suppressed for a single line of code
20-
# or a specific dart file by using the `// ignore: name_of_lint` and
21-
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
22-
# producing the lint.
234
rules:
24-
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25-
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
5+
prefer_single_quotes: true
6+
always_declare_return_types: true
7+
annotate_overrides: true
8+
avoid_empty_else: true
9+
avoid_print: true
10+
avoid_relative_lib_imports: true
11+
avoid_unnecessary_containers: true
12+
prefer_const_constructors: true
13+
prefer_const_declarations: true
14+
prefer_final_fields: true
15+
prefer_final_locals: true
16+
sort_child_properties_last: true
17+
unnecessary_brace_in_string_interps: true
18+
use_key_in_widget_constructors: true
2619

27-
# Additional information about this file can be found at
28-
# https://dart.dev/guides/language/analysis-options
20+
analyzer:
21+
errors:
22+
missing_return: error
23+
dead_code: warning
24+
exclude:
25+
- "**/*.g.dart"
26+
- "**/*.freezed.dart"
271 KB
Binary file not shown.
267 KB
Binary file not shown.

assets/fonts/Lora-Bold.ttf

207 KB
Binary file not shown.

assets/fonts/Lora-Italic.ttf

216 KB
Binary file not shown.

assets/fonts/Lora-Regular.ttf

207 KB
Binary file not shown.

lib/core/di/service_locator.dart

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import 'package:get_it/get_it.dart';
2+
3+
import '../../data/datasources/google_drive_service.dart';
4+
import '../../data/repositories/account_repository_impl.dart';
5+
import '../../data/repositories/category_repository_impl.dart';
6+
import '../../data/repositories/sync_repository_impl.dart';
7+
import '../../data/repositories/transaction_repository_impl.dart';
8+
import '../../domain/repositories/account_repository.dart';
9+
import '../../domain/repositories/category_repository.dart';
10+
import '../../domain/repositories/sync_repository.dart';
11+
import '../../domain/repositories/transaction_repository.dart';
12+
import '../../domain/usecases/calculate_net_position.dart';
13+
import '../../domain/usecases/log_transaction.dart';
14+
import '../../domain/usecases/manage_account.dart';
15+
import '../../domain/usecases/manage_transaction.dart';
16+
import '../../domain/usecases/settle_credit_bill.dart';
17+
import '../../domain/usecases/sync_data.dart';
18+
import '../../domain/usecases/generate_report.dart';
19+
import '../../domain/repositories/report_repository.dart';
20+
import '../../data/repositories/report_repository_impl.dart';
21+
import '../../data/datasources/pdf_report_service.dart';
22+
import '../../data/datasources/excel_report_service.dart';
23+
24+
/// Global service locator instance.
25+
final sl = GetIt.instance;
26+
27+
/// Registers all dependencies. Call once at app startup.
28+
Future<void> initServiceLocator() async {
29+
// — Repositories —
30+
sl.registerLazySingleton<AccountRepository>(() => AccountRepositoryImpl());
31+
sl.registerLazySingleton<TransactionRepository>(
32+
() => TransactionRepositoryImpl(),
33+
);
34+
sl.registerLazySingleton<CategoryRepository>(() => CategoryRepositoryImpl());
35+
36+
// — Google Drive Sync —
37+
sl.registerLazySingleton(() => GoogleDriveService());
38+
sl.registerLazySingleton<SyncRepository>(
39+
() => SyncRepositoryImpl(sl<GoogleDriveService>()),
40+
);
41+
42+
// — Reports —
43+
sl.registerLazySingleton(() => PdfReportService());
44+
sl.registerLazySingleton(() => ExcelReportService());
45+
sl.registerLazySingleton<ReportRepository>(
46+
() => ReportRepositoryImpl(
47+
pdfService: sl<PdfReportService>(),
48+
excelService: sl<ExcelReportService>(),
49+
),
50+
);
51+
52+
// — Use Cases —
53+
sl.registerFactory(() => CalculateNetPosition(sl<AccountRepository>()));
54+
sl.registerFactory(
55+
() => LogTransaction(sl<TransactionRepository>(), sl<AccountRepository>()),
56+
);
57+
sl.registerFactory(
58+
() =>
59+
SettleCreditBill(sl<TransactionRepository>(), sl<AccountRepository>()),
60+
);
61+
sl.registerFactory(() => ManageAccount(sl<AccountRepository>()));
62+
sl.registerFactory(
63+
() => ManageTransaction(
64+
sl<TransactionRepository>(),
65+
sl<AccountRepository>(),
66+
sl<LogTransaction>(),
67+
),
68+
);
69+
sl.registerFactory(() => SyncData(sl<SyncRepository>()));
70+
sl.registerFactory(
71+
() => GenerateReport(
72+
reportRepository: sl<ReportRepository>(),
73+
transactionRepository: sl<TransactionRepository>(),
74+
accountRepository: sl<AccountRepository>(),
75+
categoryRepository: sl<CategoryRepository>(),
76+
),
77+
);
78+
}

lib/core/theme/app_colors.dart

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import 'package:flutter/material.dart';
2+
3+
/// The Stationery color palette — ink on cream paper.
4+
class AppColors {
5+
AppColors._();
6+
7+
// — Backgrounds —
8+
/// Cream paper background.
9+
static const Color paper = Color(0xFFFFF8F0);
10+
11+
/// Slightly darker cream for cards / elevated surfaces.
12+
static const Color paperElevated = Color(0xFFF5EDE0);
13+
14+
/// Warm grey for subtle separators.
15+
static const Color divider = Color(0xFFD6CFC4);
16+
17+
// — Ink / Text —
18+
/// Deep ink blue — primary brand color.
19+
static const Color inkBlue = Color(0xFF1B3A5C);
20+
21+
/// Dark charcoal for body text.
22+
static const Color inkDark = Color(0xFF2C2C2C);
23+
24+
/// Muted grey for secondary text.
25+
static const Color inkLight = Color(0xFF7A7570);
26+
27+
// — Accents —
28+
/// Stamp red — used for debts, liabilities, expenses.
29+
static const Color stampRed = Color(0xFFC0392B);
30+
31+
/// Faded stamp red for backgrounds.
32+
static const Color stampRedLight = Color(0xFFFDECEA);
33+
34+
/// Green ink — used for income, assets, positive values.
35+
static const Color inkGreen = Color(0xFF27774E);
36+
37+
/// Faded green for backgrounds.
38+
static const Color inkGreenLight = Color(0xFFE8F5EE);
39+
40+
// — Functional —
41+
/// Settlement / transfer accent.
42+
static const Color transferAmber = Color(0xFFD4A017);
43+
44+
/// Error / invalid state.
45+
static const Color error = Color(0xFFB71C1C);
46+
47+
/// Disabled / inactive elements.
48+
static const Color disabled = Color(0xFFBDB5AA);
49+
}

0 commit comments

Comments
 (0)