This document provides instructions on how to set up, configure, and run the Plannify project locally.
- Habit Tracker
- Task Management
- Budget Planner
- Split Fund with friends
- Daily Journal
- Social to share your life with friends in private groups
- Bucket List
- Attendance
- Node.js installed on your machine.
- MongoDB Atlas account.
- Cloudinary account.
- Google Cloud Console project (for Google Sign-In).
- Android Studio (for Android Emulator) or a physical Android device.
- Backend: Contains the Express.js server, API routes, and database models.
- Plannify: Contains the React Native (Expo) frontend application.
- Navigate to the
Backenddirectory:cd Backend - Install dependencies:
npm install
-
Create a file named
.envin theBackenddirectory. -
Add the following environment variables to the
.envfile:PORT=5000 MONGO_URI=your_mongodb_connection_string GOOGLE_CLIENT_ID=your_google_client_id CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret
- Log in to your MongoDB Atlas account.
- Create a new Cluster or use an existing one.
- Click on "Connect" for your cluster.
- Choose "Drivers" (Node.js).
- Copy the connection string.
- Replace
<password>with your database user password. - Paste this string as the value for
MONGO_URIin theBackend/.envfile.
- Log in to your Cloudinary account.
- Go to the Dashboard.
- Copy the "Cloud Name", "API Key", and "API Secret".
- Paste these values into the
Backend/.envfile corresponding toCLOUDINARY_CLOUD_NAME,CLOUDINARY_API_KEY, andCLOUDINARY_API_SECRET.
To start the backend server locally:
npm run devThis will start the server on port 5000 http://localhost:5000.
- Navigate to the
Plannifydirectory:cd Plannify - Install dependencies:
npm install
To connect the frontend to your local backend:
-
Open
Plannify/src/services/ApiService.js. -
Locate the
API_URLconstant. -
Uncomment the local address and comment out the production address.
For Android Emulator:
const API_URL = 'http://10.0.2.2:5000/api';
For Physical Device (using ADB Reverse):
const API_URL = 'http://localhost:5000/api';
To start the Expo development server:
npm startThen, you can press a to run on Android Emulator.
The app supports two build variants via the APP_VARIANT environment variable:
Includes all features: login, cloud sync, premium, notifications, etc.
# Local dev
npm start
# EAS builds
eas build --profile preview # APK (internal testing)
eas build --profile production # AAB (Play Store)Hides cloud/online features and disables all notifications. Use this for releasing a completely offline version.
Hidden features:
- Login / Sign Up
- Premium Features toggle
- Cloud Backup & Restore
- Notifications toggle & all scheduling
- Clear Cloud Database
- Reset App
# Local dev
npm run start:offline
# EAS builds
eas build --profile offline-preview
eas build --profile offline-production | File | Purpose |
|---|---|
Plannify/app.config.js |
Reads APP_VARIANT env var, injects into Expo config |
Plannify/src/config/buildConfig.js |
Exports FEATURES flags based on variant |
Plannify/eas.json |
Defines offline-* build profiles with APP_VARIANT=offline |
Components check FEATURES.* to conditionally render UI. NotificationService.js no-ops all functions when IS_OFFLINE_BUILD is true.
If you are running the backend locally on your computer (localhost:5000) and want to access it from a physical Android device connected via USB or an emulator, you need to map the device's port to your computer's port.
-
Ensure the backend is running on port 5000.
-
Connect your Android device via USB (ensure USB Debugging is on) or start the Emulator.
-
Run the following command in your terminal:
adb reverse tcp:5000 tcp:5000
This allows requests to
http://localhost:5000on the phone/emulator to be forwarded tohttp://localhost:5000on your computer.
To make Google Sign-In work, you need to add your machine's SHA-1 fingerprint to your Firebase project.
Run the following command in your terminal to get your debug SHA-1 key:
For Windows:
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass androidFor Mac/Linux:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass androidIf asked for a password, type android and press Enter.
- Copy the
SHA1fingerprint from the terminal output. - Go to the Firebase Console.
- Open your project.
- Go to Project Settings (gear icon) > General.
- Scroll down to Your apps and select your Android app.
- Click Add fingerprint.
- Paste the SHA-1 key you copied and save.
- (Optional) Download the updated
google-services.jsonand replace the existing one inPlannify/google-services.jsonif you haven't already.
- Network Requests Failed: Ensure your computer and device are on the same network if not using
adb reverse. - Google Sign-In: Ensure your
google-services.jsonis correctly placed in thePlannifyroot and the package name matches your Firebase project updates.