App to let you go on sidequests and post about it. React Native + Expo with Firebase auth and posts (title, caption, photo).
-
Install dependencies
npm install
-
Firebase
- Create a project at Firebase Console.
- Enable Authentication → Sign-in method → Email/Password.
- Create a Firestore Database (start in test mode for dev).
- Create a Storage bucket (use default rules for dev).
- Add a Web app, copy the config, then copy
.env.exampleto.envand fill in:
EXPO_PUBLIC_FIREBASE_API_KEY=... EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=... EXPO_PUBLIC_FIREBASE_PROJECT_ID=... EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=... EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=... EXPO_PUBLIC_FIREBASE_APP_ID=... -
Assets (optional)
If you see missing asset errors, add
assets/icon.png(1024×1024) andassets/splash.png. You can generate them with Expo’s asset tool or copy from a new Expo app:npx create-expo-app@latest temp --template blank, then copytemp/assets/*intoassets/. -
Run
npx expo start
Then scan the QR code with Expo Go (Android) or the Camera app (iOS).
- Auth: Email/password sign up and log in via Firebase Auth.
- Posts: After logging in, create a post with:
- Title (required)
- Caption (optional)
- Photo (optional, from library)
- Feed: Home screen shows your posts and others’ in reverse chronological order.
For development you can use test mode. For production, lock down like this:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /posts/{postId} {
allow read: if request.auth != null;
allow create: if request.auth != null;
allow update, delete: if request.auth != null && request.auth.uid == resource.data.userId;
}
}
}
Allow authenticated users to upload under their userId:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /posts/{userId}/{allPaths=**} {
allow read: if request.auth != null;
allow write: if request.auth != null && request.auth.uid == userId;
}
}
}