Fresh Save is an Android application designed to help users manage their food inventory, track expiration dates, and reduce food waste. The app provides an intuitive interface to add, categorize, and monitor food items, with smart notifications for items expiring soon.
- Food Inventory Management: Add, edit, and delete food items with details like quantity, category, and expiration dates
- Expiration Tracking: Monitor items that are expiring soon (within 7 days)
- Category Organization: Organize food items by categories (Fruits, Vegetables, Dairy, etc.)
- Favorites System: Mark frequently used items as favorites for quick access
- Statistics Dashboard: View insights about your food inventory and potential savings
- Recipe Suggestions: Get recipe recommendations based on your inventory (placeholder feature)
- Donation Feature: Track food donations and reduce waste
- Modern UI: Clean, Material Design 3 interface built with Jetpack Compose
- Language: Kotlin
- UI Framework: Jetpack Compose with Material Design 3
- Architecture: MVVM (Model-View-ViewModel)
- Database: Appwrite (Backend-as-a-Service)
- Dependency Injection: Koin
- Navigation: Jetpack Navigation Compose
- Minimum SDK: Android 10 (API 29)
- Target SDK: Android 14 (API 35)
app/src/main/java/com/bhaswat/freshsave/
βββ data/
β βββ remote/
β βββ AppwriteInventoryRepository.kt # Appwrite database operations
βββ di/
β βββ AppModule.kt # Dependency injection setup
βββ model/
β βββ InventoryItem.kt # Data models
βββ repository/
β βββ InventoryRepository.kt # Repository interface
βββ ui/
β βββ HomeScreen.kt # Main inventory screen
β βββ AddItemScreen.kt # Add/edit item screen
β βββ StatsScreen.kt # Statistics screen
β βββ RecipesScreen.kt # Recipe suggestions
β βββ DonateScreen.kt # Donation tracking
β βββ navigation/ # Navigation setup
β βββ theme/ # App theming
βββ viewmodel/
β βββ HomeViewModel.kt # Business logic
βββ FreshSaveApp.kt # Application class
βββ MainActivity.kt # Main activity
- Android Studio Hedgehog | 2023.1.1 or later
- Android SDK with API level 29 or higher
- Kotlin 1.9.0 or later
- JDK 11 or later
-
Clone the repository
git clone https://github.com/THORzero9/Fresh_Save.git cd Fresh_Save -
Open in Android Studio
- Launch Android Studio
- Click "Open an existing project"
- Navigate to the cloned repository folder
- Select the project root directory
-
Configure Appwrite Backend
β οΈ Important: You need to set up your own Appwrite instance for this app to work.- Create an Appwrite account or set up a self-hosted instance
- Create a new project (choose any project ID you prefer)
- Create a database (choose any database name)
- Create a collection for inventory items with the following attributes:
name(String, required)category(String, required)quantity(Float, required)unit(String, optional)expiryDate(DateTime, optional)isFavorite(Boolean, default: false)
- Note down your project ID, database ID, and collection ID
-
Update App Configuration
- Open
app/src/main/java/com/bhaswat/freshsave/FreshSaveApp.kt - Replace the configuration with your Appwrite details:
client = Client(this) .setEndpoint("YOUR_APPWRITE_ENDPOINT") // e.g., "https://cloud.appwrite.io/v1" .setProject("YOUR_PROJECT_ID") // Your Appwrite project ID
- Open
app/src/main/java/com/bhaswat/freshsave/data/remote/AppwriteInventoryRepository.kt - Update the database and collection IDs:
private val databaseId = "YOUR_DATABASE_ID" private val collectionId = "YOUR_COLLECTION_ID"
- Open
-
Build and Run
- Sync the project with Gradle files
- Build the project (Build β Make Project)
- Run on an emulator or physical device (API 29+)
- Open the app and navigate to the Home screen
- Tap the "+" button to add a new item
- Fill in the item details:
- Name (required)
- Category (required)
- Quantity and unit
- Expiration date
- Mark as favorite (optional)
- Tap "Save" to add the item to your inventory
- View All Items: Browse your complete food inventory on the Home screen
- Filter by Category: Use the category filter to view specific types of food
- Edit Items: Tap on any item to edit its details
- Delete Items: Long press or use the delete option to remove items
- Track Expiring Items: View items expiring within 7 days in a dedicated section
The app features a bottom navigation bar with five main sections:
- Home: Main inventory management
- Stats: View inventory statistics and savings
- Recipes: Get recipe suggestions (coming soon)
- Donate: Track food donations and waste reduction
The app uses Appwrite as the backend database. The main collection schema includes:
{
"name": "string (required)",
"category": "string (required)",
"quantity": "number (required)",
"unit": "string (optional)",
"expiryDate": "datetime (optional)",
"isFavorite": "boolean (default: false)"
}For better security, consider using environment variables or a configuration file for sensitive data:
// Example: Using BuildConfig for configuration
object AppConfig {
const val APPWRITE_ENDPOINT = BuildConfig.APPWRITE_ENDPOINT
const val APPWRITE_PROJECT_ID = BuildConfig.APPWRITE_PROJECT_ID
const val DATABASE_ID = BuildConfig.DATABASE_ID
const val COLLECTION_ID = BuildConfig.COLLECTION_ID
}Key dependencies used in the project:
// Core Android libraries
implementation("androidx.core:core-ktx")
implementation("androidx.lifecycle:lifecycle-runtime-ktx")
implementation("androidx.activity:activity-compose")
// Jetpack Compose
implementation(platform("androidx.compose:compose-bom"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.material3:material3")
// Appwrite SDK
implementation("io.appwrite:sdk-for-android")
// Dependency Injection
implementation("io.insert-koin:koin-androidx-compose")- Never commit sensitive data: Ensure Appwrite credentials are not hardcoded in your repository
- Use environment variables: Store configuration in build variants or environment files
- API Keys: Keep your Appwrite project keys secure and rotate them regularly
- Database permissions: Configure appropriate read/write permissions in your Appwrite console
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow Kotlin coding conventions
- Use meaningful commit messages
- Add comments for complex logic
- Test your changes thoroughly
- Update documentation when necessary
- Never commit sensitive configuration data
- β Basic inventory management
- β Expiration date tracking
- β Category organization
- β Appwrite integration
- β Material Design 3 UI
- π Recipe suggestions based on inventory
- π Barcode scanning for easy item addition
- π Nutrition information integration
- π Shopping list generation
- π Food waste analytics
- π Social sharing features
- π Offline mode support
- π Multiple language support
- π Enhanced security features
- Recipe suggestions are currently placeholder implementations
- Search functionality is not yet implemented
- Notification system needs enhancement
- Stats calculations are basic and need improvement
This project is licensed under the MIT License. See the LICENSE file for details.
Bhaswat (@THORzero9)
- Appwrite - Backend-as-a-Service platform
- Jetpack Compose - Modern UI toolkit
- Material Design 3 - Design system
- Koin - Dependency injection framework
If you encounter any issues or have questions:
- Check the Issues section
- Create a new issue if your problem isn't already reported
- Provide detailed information about the issue and steps to reproduce
Fresh Save - Reducing food waste, one item at a time! π±