NotesApp is a modern note-taking Android app built using Jetpack Compose, Firebase Authentication, and Cloud Firestore. It supports:
- Email/password login
- Google Sign-In (One Tap)
- Viewing and editing notes
- Profile and note-taking statistics
- Email & Password Authentication
- Google One Tap Sign-In
- Home screen with welcome message & recent notes
- Create, tag, and save notes
- Profile view with note statistics
- Bottom navigation for quick access
- Firebase Firestore backend
git clone https://github.com/brianronock/notesapp.git
cd NotesApp- Go to Firebase Console
- Click Add Project β name it
NotesAppβ continue with default settings.
- Register Android app using your package name (e.g.
com.example.notesapp) - Download the
google-services.jsonfile. - Place the file in:
NotesApp/app/google-services.json
- Go to Authentication > Sign-in method
- Enable the following providers:
- Email/Password
- Still in Firebase console:
- Go to Project Settings > General
- Under Your apps, find Web API Key and Web client ID
- Copy the Web client ID from the "OAuth 2.0 Client IDs" section
- In the Firebase Console:
- Select your project.
- Go to Build > Firestore Database.
- Click Create Database.
- Choose Start in test mode (for development only).
- Select your preferred location and click Enable.
This creates a Firestore instance for storing and syncing your appβs notes.
To protect user data and allow only logged-in users to access their own information, you must configure Firestore security rules.
- Go to Firebase Console.
- Select your project.
- In the left sidebar, click Build β Firestore Database.
- Click the Rules tab at the top.
- Replace the content with the following:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, write: if request.auth.uid == userId;
}
}
}- A signed-in user can only access their own document in the
userscollection. - No public access to other users' data.
- This rule is strongly recommended for apps using authentication.
β If you previously used a temporary rule like this:
match /{document=**} {
allow read, write: if true;
}That rule allowed unrestricted access and should now be removed.
Open GoogleAuthUiClient.kt and replace the setServerClientId(...) value with your Web client ID from the Firebase console:
.setServerClientId("YOUR_WEB_CLIENT_ID_HERE")You can find this value under Firebase Console > Project Settings > OAuth 2.0 Client IDs.
In Android Studio:
- File > Sync Gradle
- Or from terminal:
./gradlew clean build- Open
MainActivity.kt - Run the app on an emulator or connected device
- Register with email & password
- Login using the same credentials
- Tap βSign in with Googleβ
- Uses One Tap authentication
- Requires valid
WEB_CLIENT_ID
- Kotlin
- Jetpack Compose
- Firebase Authentication
- Cloud Firestore
- MVVM Architecture
- Material 3 UI
- Gradle Version Catalogs
-
Generate your appβs SHA-1 fingerprint using this command:
./gradlew signingReport
Look under
Variant: debugfor theSHA1key. -
Go to Firebase Console > Project Settings > Your apps > Add Fingerprint
-
Paste your SHA-1 and save.
-
Re-download the updated
google-services.jsonand replace the one in:NotesApp/app/google-services.json -
Sync Gradle again.
NotesApp/
βββ app/
β βββ auth/
β β βββ GoogleAuthUiClient.kt # Handles Google One Tap authentication logic and integrates with FirebaseAuth
β
β βββ components/
β β βββ BottomBar.kt # Bottom navigation bar used across screens
β β βββ FormattingButton.kt # Rich text formatting button for styling note content
β
β βββ data/
β β βββ NotesRepository.kt # Provides abstraction for interacting with Firestore (CRUD operations for notes)
β
β βββ model/
β β βββ Note.kt # Data class representing a note (title, content, tags, timestamp)
β β βββ (TODO) User.kt # (Suggestion) Add model for user data like display name, email, profile image
β
β βββ navigation/
β β βββ AppNavigation.kt # Contains top-level navigation setup and route configuration
β β βββ NavGraph.kt # Defines composable destinations and screen transitions using Jetpack Navigation
β
β βββ screens/
β β βββ auth/
β β β βββ LoginScreen.kt # UI for signing in using email/password or Google Sign-In
β β β βββ ProfileScreen.kt # Displays logged-in user's info, logout button, and placeholder for stats
β β β βββ RegisterScreen.kt # UI for creating a new user account with email and password
β β βββ home/
β β β βββ EditProfileScreen.kt # Screen for editing user display name (incomplete)
β β β βββ HomeScreen.kt # Main screen showing welcome message, recent notes, and navigation
β β βββ note/
β β βββ AddNoteScreen.kt # Screen to create or edit notes, includes tagging and formatting UI
β β βββ ViewNoteScreen.kt # Displays the content of a selected note in read-only format
β
β βββ ui/
β β βββ theme/
β β βββ Color.kt # Defines app color scheme and Material3 theming
β β βββ Theme.kt # Root Compose Material theme setup
β β βββ Type.kt # Font and typography definitions
β
β βββ viewmodel/
β β βββ AuthViewModel.kt # Handles user authentication state and events (login, register, logout)
β β βββ NotesViewModel.kt # Manages Firestore note data, live state for note list, create/edit/delete logic
β
β βββ MainActivity.kt # App's main entry point; hosts the Compose UI and calls AppNavigation
β βββ NotesApp.kt # Composable app container applying theme and surface scaffold
- Add Google profile picture and display name to Profile screen
- Implement working Edit Profile button
- Finish statistics calculations:
- Most Active Day
- Favorite Category based on tags
- Organize notes by tag and make them searchable
- Add note sharing functionality
- UI polish and animations for smoother transitions
- Google Sign-In button branding