Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Code Coverage][coverage_badge]][coverage_link]
[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]

An application for teenage makers.
Sharing and Growing!

[ci_badge]: https://github.com/PHS-TSA/nexus/actions/workflows/ci.yaml/badge.svg?branch=main
[ci_link]: https://github.com/PHS-TSA/nexus/actions/workflows/ci.yaml
Expand Down
4 changes: 2 additions & 2 deletions packages/app/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

android {
namespace = "org.psdr3.nexus"
namespace = "org.psdr3.harvest_hub"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion

Expand All @@ -21,7 +21,7 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "org.psdr3.nexus"
applicationId = "org.psdr3.harvest_hub"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
Expand Down
2 changes: 1 addition & 1 deletion packages/app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="Town Talk"
android:label="Harvest Hub"
android:name="${applicationName}"
android:icon="@mipmap/launcher_icon">
<activity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.psdr3.nexus
package org.psdr3.harvest_hub

import io.flutter.embedding.android.FlutterActivity

Expand Down
Binary file modified packages/app/android/app/src/main/res/drawable-hdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/app/android/app/src/main/res/drawable-mdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/app/android/app/src/main/res/drawable/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/app/assets/icons/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/app/assets/icons/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/app/assets/icons/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed packages/app/assets/pictures/kid.png
Binary file not shown.
Binary file added packages/app/assets/pictures/login_image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed packages/app/assets/pictures/login_image.png
Binary file not shown.
Binary file removed packages/app/assets/pictures/old.png
Binary file not shown.
12 changes: 6 additions & 6 deletions packages/app/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = org.psdr3.nexus;
PRODUCT_BUNDLE_IDENTIFIER = org.psdr3.harvest_hub;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand All @@ -503,7 +503,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.psdr3.nexus.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = org.psdr3.harvest_hub.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -521,7 +521,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.psdr3.nexus.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = org.psdr3.harvest_hub.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
Expand All @@ -537,7 +537,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = org.psdr3.nexus.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = org.psdr3.harvest_hub.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
Expand Down Expand Up @@ -671,7 +671,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = org.psdr3.nexus;
PRODUCT_BUNDLE_IDENTIFIER = org.psdr3.harvest_hub;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -694,7 +694,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = org.psdr3.nexus;
PRODUCT_BUNDLE_IDENTIFIER = org.psdr3.harvest_hub;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions packages/app/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Town Talk</string>
<string>Harvest Hub</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Town Talk</string>
<string>Harvest Hub</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
Expand All @@ -23,7 +23,7 @@
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true />
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand All @@ -42,13 +42,13 @@
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true />
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true />
<true/>
<key>UIStatusBarHidden</key>
<true />
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false />
<false/>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to location when open.</string>
<key>NSLocationAlwaysUsageDescription</key>
Expand Down
4 changes: 2 additions & 2 deletions packages/app/lib/src/app/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import '../utils/design.dart';
import '../utils/router.dart';
import 'bootstrap.dart';

/// {@template nexus.app}
/// {@template harvest_hub.app}
/// The widget that configures your application.
/// {@endtemplate}
class App extends ConsumerStatefulWidget with Bootstrap {
/// {@macro nexus.app}
/// {@macro harvest_hub.app}
///
/// Construct a new [App] widget.
const App({super.key});
Expand Down
4 changes: 2 additions & 2 deletions packages/app/lib/src/app/create_post.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import '../features/home/domain/uploaded_image_entity.dart';
import '../utils/hooks.dart';
import '../utils/responsive.dart';

/// {@template nexus.app.create_post}
/// {@template harvest_hub.app.create_post}
/// A dialog that allows for a user to create a new post.
/// {@endtemplate}
class CreatePost extends HookConsumerWidget {
/// {@macro nexus.app.create_post}
/// {@macro harvest_hub.app.create_post}
///
/// Construct a new [CreatePost] widget.
const CreatePost({super.key});
Expand Down
4 changes: 2 additions & 2 deletions packages/app/lib/src/app/wrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import 'package:flutter/material.dart';
import '../utils/responsive.dart';
import 'create_post.dart';

/// {@template nexus.app.wrapper}
/// {@template harvest_hub.app.wrapper}
/// Wrap the pages in a Material Design scaffold.
/// {@endtemplate}
class Wrapper extends StatelessWidget {
/// {@macro nexus.app.wrapper}
/// {@macro harvest_hub.app.wrapper}
///
/// Construct a new [Wrapper] widget.
const Wrapper({required this.child, super.key});
Expand Down
4 changes: 2 additions & 2 deletions packages/app/lib/src/app/wrapper_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'router.gr.dart';
import 'wrapper.dart';

/// {@template nexus.app.wrapper_page}
/// {@template harvest_hub.app.wrapper_page}
/// Wrap the pages in a Material Design scaffold.
/// {@endtemplate}
@RoutePage(deferredLoading: true)
class WrapperPage extends ConsumerWidget {
/// {@macro nexus.app.wrapper_page}
/// {@macro harvest_hub.app.wrapper_page}
///
/// Construct a new [WrapperPage] widget.
const WrapperPage({super.key});
Expand Down
4 changes: 2 additions & 2 deletions packages/app/lib/src/env/env.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ abstract class Env {
@EnviedField(defaultValue: false)
static final bool selfSigned = _Env.selfSigned;

/// Nexus database ID
/// Database ID
@EnviedField(defaultValue: 'database-id')
static final String databaseId = _Env.databaseId;

/// Nexus posts collection ID
/// Post collection ID
@EnviedField(defaultValue: 'post-coolection-id')
static final String postsCollectionId = _Env.postsCollectionId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
await logInUser(email, password);

return user;
} on AppwriteException {
} on AppwriteException catch (e) {
log('Failed to create account', error: e);

Check warning on line 59 in packages/app/lib/src/features/auth/data/auth_repository.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/features/auth/data/auth_repository.dart#L58-L59

Added lines #L58 - L59 were not covered by tests

return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import '../../../../utils/toast.dart';
import '../../application/auth_service.dart';
import '../../domain/auth_callback.dart';

/// {@template nexus.features.auth.presentation.auth.login_page}
/// {@template harvest_hub.features.auth.presentation.auth.login_page}
/// A page that displays an interface for signing in users.
/// {@endtemplate}
@RoutePage(deferredLoading: true)
class LogInPage extends HookConsumerWidget {
/// {@macro nexus.features.auth.presentation.auth.login_page}
/// {@macro harvest_hub.features.auth.presentation.auth.login_page}
///
/// Construct a new [LogInPage] widget.
const LogInPage({super.key, AuthCallback? onResult}) : _onResult = onResult;
Expand Down Expand Up @@ -89,8 +89,7 @@ class _DesktopLogInPage extends HookConsumerWidget {
decoration: BoxDecoration(
image: DecorationImage(
image: Assets.pictures.loginImage.provider(),
// TODO(MattsAttack): I need to find a better image or move the photo down.
fit: BoxFit.fill,
fit: BoxFit.cover,
),
),
child: Column(
Expand All @@ -106,7 +105,7 @@ class _DesktopLogInPage extends HookConsumerWidget {
child: Column(
children: [
Text(
'Welcome to Town Talk!',
'Welcome to Harvest Hub!',
style: TextStyle(
fontSize: 28,
color: Theme.of(context).colorScheme.onPrimaryContainer,
Expand Down Expand Up @@ -248,7 +247,7 @@ class _MobileLogInPage extends HookConsumerWidget {
child: Column(
children: [
Text(
'Welcome to Town Talk!',
'Welcome to Harvest Hub!',
style: TextStyle(
fontSize: 24,
color:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

// TODO(lishaduck): Extract most of this out to a widget that can be shared with the log in page.

/// {@template nexus.features.auth.presentation.auth.sign_up_page}
/// {@template harvest_hub.features.auth.presentation.auth.sign_up_page}
/// A page that displays an interface for signing up new users.
/// {@endtemplate}
@RoutePage(deferredLoading: true)
class SignUpPage extends HookConsumerWidget {
/// {@macro nexus.features.auth.presentation.auth.sign_up_page}
/// {@macro harvest_hub.features.auth.presentation.auth.sign_up_page}
///
/// Construct a new [SignUpPage] widget.
const SignUpPage({super.key, AuthCallback? onResult}) : _onResult = onResult;
Expand Down Expand Up @@ -90,8 +90,7 @@
decoration: BoxDecoration(
image: DecorationImage(
image: Assets.pictures.loginImage.provider(),
// TODO(MattsAttack): I need to find a better image or move the photo down.
fit: BoxFit.fill,
fit: BoxFit.cover,
),
),
child: Container(
Expand All @@ -105,7 +104,7 @@
child: Column(
children: [
Text(
'Welcome to Town Talk!',
'Welcome to Harvest Hub!',
style: TextStyle(
fontSize: 28,
color: Theme.of(context).colorScheme.onPrimaryContainer,
Expand Down Expand Up @@ -199,17 +198,17 @@
Widget build(BuildContext context, WidgetRef ref) {
final formKey = useGlobalKey<FormState>();

final name = useState('');

Check warning on line 201 in packages/app/lib/src/features/auth/presentation/auth/sign_up_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/features/auth/presentation/auth/sign_up_page.dart#L201

Added line #L201 was not covered by tests
final email = useState('');
final password = useState('');

final handleSubmit = useCallback(() async {
if (formKey.currentState?.validate() ?? false) {
formKey.currentState?.save();

// Log in the user.
await ref
.read(authServiceProvider.notifier)
.logInUser(email.value, password.value);
.createUser(name.value, email.value, password.value);

Check warning on line 211 in packages/app/lib/src/features/auth/presentation/auth/sign_up_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/features/auth/presentation/auth/sign_up_page.dart#L211

Added line #L211 was not covered by tests

// Check that the widget still exists after the async operation.
if (!context.mounted) return;
Expand All @@ -220,7 +219,7 @@
// Runs the function passed in by the guard and brings user back to previous page.
_onResult(didLogIn: true);
} else {
// Replace the route so user won't come back to login.
// Replace the route so user won't come back to sign up.
await context.router.replace(const LocalFeedRoute());
}
} else {
Expand Down Expand Up @@ -260,7 +259,7 @@
child: Column(
children: [
Text(
'Welcome to Town Talk!',
'Welcome to Harvest Hub!',
style: TextStyle(
fontSize: 24,
color:
Expand All @@ -271,6 +270,20 @@
textAlign: TextAlign.center,
),
const SizedBox(height: 24),
TextFormField(
initialValue: name.value,
onSaved: (value) {

Check warning on line 275 in packages/app/lib/src/features/auth/presentation/auth/sign_up_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/features/auth/presentation/auth/sign_up_page.dart#L273-L275

Added lines #L273 - L275 were not covered by tests
if (value == null) return;

name.value = value;

Check warning on line 278 in packages/app/lib/src/features/auth/presentation/auth/sign_up_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/features/auth/presentation/auth/sign_up_page.dart#L278

Added line #L278 was not covered by tests
},
keyboardType: TextInputType.name,
decoration: const InputDecoration(
border: OutlineInputBorder(),
labelText: 'First and Last Name',
),
),
const SizedBox(height: 16),
TextFormField(
initialValue: email.value,
onSaved: (value) {
Expand Down Expand Up @@ -304,20 +317,18 @@
width: double.infinity,
child: ElevatedButton(
onPressed: handleSubmit,
child: const Text('Log in'),
child: const Text('Sign up'),
),
),
Padding(
padding: const EdgeInsets.only(top: 16),
child: TextButton(
onPressed: () async {
await context.router.push(
SignUpRoute(onResult: _onResult),
LogInRoute(onResult: _onResult),

Check warning on line 328 in packages/app/lib/src/features/auth/presentation/auth/sign_up_page.dart

View check run for this annotation

Codecov / codecov/patch

packages/app/lib/src/features/auth/presentation/auth/sign_up_page.dart#L328

Added line #L328 was not covered by tests
);
},
child: const Text(
"Don't have an account? Sign up!",
),
child: const Text('Back to login'),
),
),
],
Expand Down
4 changes: 2 additions & 2 deletions packages/app/lib/src/features/home/domain/feed_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import 'post_id.dart';

part 'feed_model.freezed.dart';

/// {@template nexus.features.home.domain.feed}
/// {@template harvest_hub.features.home.domain.feed}
/// Represent a feed of posts.
/// {@endtemplate}
@immutable
@freezed
sealed class FeedModel with _$FeedModel {
/// {@macro nexus.features.home.domain.feed}
/// {@macro harvest_hub.features.home.domain.feed}
///
/// Create a new, immutable instance of [FeedModel].
const factory FeedModel({
Expand Down
Loading
Loading