Skip to content

Latest commit

 

History

History
147 lines (102 loc) · 2.65 KB

File metadata and controls

147 lines (102 loc) · 2.65 KB

Secure Notes App

Overview

Secure Notes is an Android application built with Kotlin and Jetpack Compose. It allows users to create, edit, delete, and securely share notes with other users in real time.

The goal of this project was to practice modern Android development while also learning how to connect a mobile app to a secure cloud backend using Firebase Authentication and Cloud Firestore.


Features

Authentication

  • User registration and login with Firebase Authentication
  • Persistent login state
  • Input validation and error handling

Notes Management

  • Create, edit, and delete notes
  • Real-time updates using Firestore listeners
  • Automatic UI updates when note data changes

Collaboration

  • Share notes with other users by email
  • Role-based access:
    • Owner: full control
    • Editor: can edit notes
    • Reader: read-only access
  • Ability to remove shared access

Security

  • Firebase Authentication required for access
  • Firestore security rules for protected data access
  • Owners control note permissions
  • Shared users have limited read/edit access
  • Client-side and backend validation

Architecture

This project follows the MVVM architecture pattern.

Model

  • Note
  • User

ViewModel

  • AuthViewModel
  • NotesViewModel

Repository

  • AuthRepository
  • NotesRepository

UI

  • LoginScreen
  • RegisterScreen
  • NotesScreen
  • NoteEditorScreen

Tech Stack

  • Kotlin
  • Jetpack Compose
  • MVVM
  • StateFlow
  • Firebase Authentication
  • Cloud Firestore
  • Kotlin Coroutines

Firestore Structure

users/{userId}
notes/{noteId}

Note Model Example

{
  "id": "String",
  "title": "String",
  "content": "String",
  "ownerId": "String",
  "sharedWith": {
    "userId": "read | edit"
  },
  "createdAt": 0,
  "updatedAt": 0
}

Key Learnings

  • Building Android apps with Jetpack Compose
  • Managing app state with StateFlow
  • Connecting Android apps to Firebase
  • Writing Firestore security rules
  • Designing role-based sharing features
  • Structuring an app using MVVM

Current Limitations

  • No offline mode yet
  • No push notifications
  • Limited role types
  • Basic UI styling

Future Improvements

  • Add offline support with Room database
  • Add push notifications with Firebase Cloud Messaging
  • Improve UI animations and theming
  • Add more detailed permission controls
  • Compare Firebase backend with AWS services

What This Project Demonstrates

  • Android app development with Kotlin
  • Real-time cloud database integration
  • Secure authentication and access control
  • MVVM architecture
  • Collaborative app features