Habitit is a Flutter application designed to help users build and maintain habits. The app utilizes Firebase for authentication, Firestore for data storage, and a Node.js backend for periodic and user-triggered notifications.
Due to time constraints, the development approach was feature-driven rather than test-driven, meaning tests are demonstrational rather than exhaustive.
- ✅ User authentication via Firebase
- 📊 Habit tracking and management
- 🔔 Notification system powered by a Node.js backend
- 🌍 Web and Android support (No iOS support due to lack of testing tools)
Ensure you have the following installed:
- Flutter (latest stable version)
- Dart
- Firebase CLI
- Node.js (for backend notifications, if needed locally)
git clone https://github.com/conykay/habitit.git
cd habititflutter pub get- Create a Firebase project.
- Enable Firestore, Authentication, and Firebase Hosting.
- Download the
google-services.jsonfile and place it insideandroid/app/. - Run Firebase emulators locally (optional):
firebase emulators:startFor Android/Web:
flutter runSince the project was developed with a feature-driven approach, tests are included for demonstration purposes but do not cover all functionality.
Run tests with:
flutter testThe project utilizes GitHub Actions to automate testing, building, and deployment.
- On push to
productionbranch:- ✅ Runs tests
- 📤 Builds & deploys the web app to Firebase Hosting
- 📱 Generates an APK for Android
- On pull request:
- ✅ Runs tests
Ensure Firebase CLI is installed and authenticated:
firebase login
firebase use --addTo deploy manually:
firebase deploy --only hostingThe workflow (.github/workflows/main.yml) automates:
- Running tests
- Deploying the web app
- Building an APK
- Web App: Habitit Web
- Latest APK: Download APK
The app relies on a Node.js server (hosted on Render) for handling scheduled and user-triggered notifications.
To set up the backend locally:
git clone https://github.com/conykay/HabititService.git
cd HabititService
npm install
node server.jsThe CI/CD workflow automatically updates the links in this README with the latest web app and APK after each release.
This is done via:
sed -i "s|https://your-project-id.web.app|$WEB_APP_URL|g" README.md
sed -i "s|https://your-artifact-apk-url.com|$APK_URL|g" README.md✅ Ensuring that every deployment provides an up-to-date README.
- ❌ No iOS support due to lack of testing tools.
- 📉 Limited test coverage due to a feature-driven development approach.
- ⏰ Improved notification scheduling could enhance user experience.
MIT License
Cornelius Korir