An Expo and React Native notes application with Firebase Authentication and user-scoped Cloud Firestore storage.
- Email/password account creation and sign-in
- Sign out
- Create notes with a title and content
- View the full note in a modal
- Edit and delete notes
- Mark notes as favorites
- Filter between all notes and favorite notes
- Display the total number of notes
- Display each note's creation date
- Live synchronization with Cloud Firestore
- Firestore rules that restrict notes to their authenticated owner
- Expo SDK 58
- React Native
- Expo Router
- TypeScript
- Firebase Authentication
- Cloud Firestore
- Node.js
- An Expo-compatible device, simulator, or web browser
- A Firebase project with:
- Email/password Authentication enabled
- Cloud Firestore enabled
The application is currently configured for the Firebase project
webdev-class-setup.
Install dependencies:
npm installStart the Expo development server:
npm run startRun on the web:
npm run webRun on Android or iOS:
npm run android
npm run ios- Open the
webdev-class-setupproject in the Firebase Console. - Enable Authentication → Sign-in method → Email/Password.
- Create a Cloud Firestore database.
- Publish the rules from firestore.rules in the Firestore Rules tab.
The Firebase project configuration is initialized in
src/app/index.tsx from Expo public environment
variables. Copy .env.example to .env.local and fill in the
values from Project settings → Your apps → Firebase SDK snippet. The
.env.local file is ignored by Git.
Required variables:
EXPO_PUBLIC_FIREBASE_API_KEY=your-firebase-api-key
EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
EXPO_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project.firebasestorage.app
EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your-messaging-sender-id
EXPO_PUBLIC_FIREBASE_APP_ID=your-firebase-app-id
EXPO_PUBLIC_FIREBASE_MEASUREMENT_ID=your-measurement-idRestart the Expo development server after creating or changing .env.local:
npm run startFirebase web API keys are intended to be used in client applications, while access control is enforced by Authentication and Firestore Security Rules.
The repository includes .firebaserc and firebase.json, so the rules can also be deployed with:
npm install --global firebase-tools
firebase login
firebase deploy --only firestore:rulesNotes are stored in the notes collection. Each document contains:
title string
content string
favorite boolean
userId string
createdAt timestamp
Every read is filtered by the authenticated user's UID. The rules also verify ownership for reads, creates, updates, and deletes.
Run the TypeScript check:
npx tsc --noEmitBuild the web export:
npx expo export --platform web