docs: add README and GEMINI.md
This commit is contained in:
41
GEMINI.md
Normal file
41
GEMINI.md
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# GEMINI.md
|
||||||
|
|
||||||
|
## App: phone_login
|
||||||
|
|
||||||
|
This document describes the "phone_login" Flutter application, its purpose, implementation details, and file layout.
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
The "phone_login" app is a simple Flutter application that demonstrates a phone number-based authentication flow. It includes screens for entering a phone number, verifying an SMS code, and displaying different content based on the user's authentication status. The app also features a basic home screen and a profile screen.
|
||||||
|
|
||||||
|
## Implementation Details
|
||||||
|
|
||||||
|
The application is built using the Flutter framework and follows a layered architecture to separate concerns.
|
||||||
|
|
||||||
|
### Key Components:
|
||||||
|
|
||||||
|
* **Authentication:** The authentication flow is designed to be handled by Firebase Authentication, but it is currently mocked for demonstration purposes. The `AuthState` class manages the user's authentication state.
|
||||||
|
* **Navigation:** `go_router` is used for declarative routing and navigation. It includes a redirect mechanism to handle authentication-aware routes.
|
||||||
|
* **State Management:** `provider` is used for state management, with `ChangeNotifierProvider` making the `AuthState` available throughout the app.
|
||||||
|
* **UI:** The user interface is built with Flutter's Material Design widgets. The screens are designed to be simple and intuitive.
|
||||||
|
|
||||||
|
### File Layout:
|
||||||
|
|
||||||
|
```
|
||||||
|
lib/
|
||||||
|
├── main.dart # App entry point
|
||||||
|
├── app.dart # MaterialApp setup, theme, and routing
|
||||||
|
├── auth/ # Authentication-related screens and logic
|
||||||
|
│ ├── auth_state.dart # Manages authentication state
|
||||||
|
│ ├── phone_input_screen.dart
|
||||||
|
│ └── sms_verification_screen.dart
|
||||||
|
├── home/ # Home screen
|
||||||
|
│ └── home_screen.dart
|
||||||
|
├── profile/ # User profile screen
|
||||||
|
│ └── profile_screen.dart
|
||||||
|
├── services/ # Backend services (e.g., Firebase)
|
||||||
|
├── shared/ # Common widgets, utilities, models
|
||||||
|
│ ├── models/
|
||||||
|
│ └── widgets/
|
||||||
|
└── theme/ # Theming and styling
|
||||||
|
```
|
||||||
17
README.md
17
README.md
@@ -1 +1,16 @@
|
|||||||
# phone_login
|
# Phone Login
|
||||||
|
|
||||||
|
A new Flutter project for phone login.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
This project is a starting point for a Flutter application.
|
||||||
|
|
||||||
|
A few resources to get you started if this is your first Flutter project:
|
||||||
|
|
||||||
|
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||||
|
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
||||||
|
|
||||||
|
For help getting started with Flutter development, view the
|
||||||
|
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||||
|
samples, guidance on mobile development, and a full API reference.
|
||||||
Reference in New Issue
Block a user