Skip to content

Merge Request for this developer branch into main#20

Open
trinhhdinhh wants to merge 22 commits intomainfrom
developer
Open

Merge Request for this developer branch into main#20
trinhhdinhh wants to merge 22 commits intomainfrom
developer

Conversation

@trinhhdinhh
Copy link
Collaborator

Authentication Feature
This branch also includes the full Firebase authentication implementation powering the app's login flow.

What's implemented
AuthServices (features/auth/services/auth_service.dart)

Email/password sign-up via createUserWithEmailAndPassword
Email/password sign-in via signInWithEmailAndPassword
Google Sign-In via GoogleSignIn + Firebase credential exchange
Sign-out that clears both Google session and Firebase session
currentUser getter for accessing the active user
authStateChanges stream for reactively listening to login/logout events
Screens

WelcomeScreen — Landing page with "Get Started" and "I Already Have an Account" CTAs, plus a feature preview card row (Flash, Quiz, Fill, Learn)
LoginScreen — Email + password fields with show/hide toggle, Login button, Google Sign-In button, and a link to sign up
CreateAccountScreen — Full name, email, password, confirm password fields, Create Account button, and Google Sign-In button
Auth Flow

WelcomeScreen
├── Get Started → CreateAccountScreen → /home (FeedScreen)
└── I Already Have an Account → LoginScreen → /home (FeedScreen)

FeedScreen
└── Log Out → WelcomeScreen (clears entire navigation stack)
Firebase Services Used
firebase_auth — core authentication
google_sign_in — Google OAuth provider

File Structure Changes

Migrated all auth screens and services from a flat lib/pages/ layout into a feature-first folder structure (lib/features/auth/, lib/features/feed/)
Renamed all classes from *Page → *Screen convention to match Flutter standards
Updated all imports and route references in main.dart to reflect new paths
No logic was changed — purely a structural refactor

vrenee0 and others added 12 commits February 26, 2026 07:55
auto generated flutter application files
delete pantry pal stuff
updating colors for visibility and aesthetics
Create create account page and link it to the get started button in welcome page
changed names to follow better structure. Created login page. Linked login page to already have an account button
- Created AuthServices with signUpWithEmail, signInWithEmail,
  signInWithGoogle, signOut, currentUser, and authStateChanges
- Wired login and create account pages with TextEditingControllers
  and connected buttons to AuthServices methods
- Added Firebase initialization in main.dart with named routes
  (/home, /signup)
- Created placeholder HomePage with logout functionality
- Updated google-services.json with SHA-1 fingerprint for
  Android Google Sign-In
- Removed leftover main() from welcome_page.dart
Migrated from flat pages/ layout to feature-first architecture as defined
in CLAUDE.md. No logic was changed — this is purely a structural refactor
to reduce merge conflicts as the team builds out feed, decks, and profile
features in parallel.

Changes:
- lib/auth_services.dart → lib/features/auth/services/auth_service.dart
- lib/pages/login_page.dart → lib/features/auth/screens/login_screen.dart (LoginPage → LoginScreen)
- lib/pages/create_account_page.dart → lib/features/auth/screens/create_account_screen.dart (CreateAccountPage → CreateAccountScreen)
- lib/pages/welcome_page.dart → lib/features/auth/screens/welcome_screen.dart (WelcomePage → WelcomeScreen)
- lib/pages/home_page.dart → lib/features/feed/screens/feed_screen.dart (HomePage → FeedScreen)
- Updated all imports and route references in main.dart
@trinhhdinhh trinhhdinhh requested a review from vrenee0 March 18, 2026 19:36
CardinTran and others added 10 commits March 18, 2026 22:53
Version Control and adjusting the folder for screens.
Added a debugging button to bypass login.
Added a prototype hardcoded feed page with buttons for saving and updating if something is learned or still studying. Added a saved screen to view all of the saved contents. Shared Feed parameters into a separate file.
Screen for importing documents for generating feed contents.
Screen for viewing all of the documents imported to determine which files to omit from feed content generation.
Basic Settings Screen to view which types of settings would be available for launch.
Adjusts main.dart to show MainNavScreen whenever login is complete. MainNav contains the environment for the nav bar and the different screens.
Added functionality to each button in the settings screen. Because it is a Prototype, there is not backend for this but the frontend functionality works.
- Fixed broken Firebase Auth flow in auth_service.dart, login_screen.dart,
  and create_account_screen.dart
  Why: Auth was failing at runtime due to misconfigured Firebase
  initialization and missing error handling in the sign-in/sign-up flow

- Fixed iOS build error by bumping platform target from 13.0 to 15.0
  and wiring in CocoaPods via Runner.xcodeproj and xcworkspace
  Why: Firebase and Google Sign-In pods silently require iOS 15.0+;
  without CocoaPods properly linked, the app would fail to build on iOS

- Fixed pubspec.yaml/pubspec.lock dependency mismatch
  Why: Lockfile was out of sync with declared dependencies, causing
  inconsistent installs across team members' machines

- Fixed .gitignore to exclude iOS/Flutter auto-generated files
  (ios/Pods/, Podfile.lock, Flutter.podspec, Generated.xcconfig,
  flutter_export_environment.sh, and duplicate " 2" artifacts)
  Why: These files were being tracked unintentionally, causing noisy
  diffs on every build and pod install with no meaningful changes
- Register REVERSED_CLIENT_ID as CFBundleURLSchemes in Info.plist to enable Google Sign-In redirect handling on iOS
- Add ANDROID_CLIENT_ID to GoogleService-Info.plist for cross-platform Firebase Auth consistency
- Remove unused launch_background.xml from Android drawable resources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants