Olater is a full-stack mobile application built with Flutter for the frontend and Node.js for the backend. It features Firebase authentication (including Google Sign-In) and MongoDB for data storage.
- Framework: Flutter
- State Management: Provider
- Maps: flutter_map
- Location: geolocator
- Auth: firebase_auth & google_sign_in
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB (via Mongoose)
- Admin SDK: Firebase Admin SDK
olater/
├── android/ # Android native project
├── ios/ # iOS native project
├── lib/ # Flutter source code
│ ├── core/ # App-wide constants, themes, utils
│ ├── features/ # Feature-based modules (auth, home, etc.)
│ └── main.dart # App entry point
├── backend/ # Node.js backend
│ ├── controllers/ # Business logic
│ ├── models/ # Mongoose schemas
│ ├── routes/ # API endpoints
│ ├── server.js # Server entry point
│ └── .env # Environment variables (local only)
├── firebase.json # Firebase configuration
└── pubspec.yaml # Flutter dependencies
- Flutter SDK: ^3.10.3
- Node.js: Latest LTS version
- MongoDB: A running local instance or MongoDB Atlas cluster
- Firebase Project: Created in the Firebase Console
- Navigate to the backend folder:
cd backend - Install dependencies:
npm install
- Create a
.envfile in thebackend/directory (use.env.exampleas a template):PORT=3000 MONGO_URI=mongodb://localhost:27017/olater
- Firebase Admin Setup:
- Download your
serviceAccountKey.jsonfrom the Firebase Console (Project Settings > Service Accounts). - Place it in the
backend/folder.
- Download your
- From the root directory, install Flutter dependencies:
flutter pub get
- Firebase Configuration:
- Run
flutterfire configure(if you have FlutterFire CLI) or manually download:google-services.jsonfor Android (android/app/)GoogleService-Info.plistfor iOS (ios/Runner/)
- Generate
lib/firebase_options.dart. Uselib/firebase_options.dart.exampleas a template if needed.
- Run
- Backend API URL:
- Update the
baseUrlinlib/features/auth/presentation/provider/auth_provider.dartto point to your machine's IP address (needed for physical device testing).
- Update the
cd backend
node server.jsflutter runSensitive files are ignored in Git to prevent leaks:
backend/.envbackend/serviceAccountKey.jsonlib/firebase_options.dart**/google-services.json**/GoogleService-Info.plist
Always use the provided .example files as templates when setting up the project on a new machine.