Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 79 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,101 +1,136 @@
# 🍽️ MessApp Frontend
# 🍽️ MessApp Frontend

A Flutter-based frontend for the Mess Management App.
This repository only contains the mobile frontend UI & state management.
➡️ Backend and Firebase setup are not included here.
This repository contains the mobile frontend UI & state management.
➡️ Backend and Firebase setup need to be configured after cloning.

---

## 📌 Features
## 📌 Features

- Role-based navigation (Student, Admin)
- Digital Mess Card view
- Student photo upload page
- Mess menu & dinner provider with state management
- Organized Flutter architecture (core, models, pages, providers)
- Role-based navigation (Student, Admin)
- Digital Mess Card view
- Student photo upload page
- Mess menu & dinner provider with state management
- Organized Flutter architecture (core, models, pages, providers)

---

## 🚀 Tech Stack
## 🚀 Tech Stack

- Flutter (Dart)
- Provider (State management)
- SharedPreferences (Local storage)
- Flutter (Dart)
- Provider (State management)
- SharedPreferences (Local storage)
- Firebase: Authentication, Firestore, Storage

---

## ✅ Prerequisites
## ✅ Prerequisites

Before running the app, install:
Before running the app, install:

- Flutter SDK (latest stable)
- Android Studio or VS Code
- Xcode (macOS only, for iOS builds)
- Emulator or physical device
- Flutter SDK (latest stable)
- Android Studio or VS Code
- Xcode (macOS only, for iOS builds)
- Emulator or physical device

Check Flutter setup:
Check Flutter setup:

```bash
flutter doctor
```

---

## 📦 Installation
## 📦 Installation

1. Clone this repository
### 1. Clone this repository

```bash
git clone <repo_url>
cd MessApp
git clone <repo_url>
cd MessApp
```

2. Install dependencies
### 2. Install dependencies

```bash
flutter pub get
flutter pub get
```

---

## ▶️ Running the App
## 🔧 Firebase Setup

### Android
### 1. Create a Firebase Project:

- Go to [Firebase Console](https://console.firebase.google.com/) → Add Project → Follow steps.

### 2. Add Your Apps:

**Android:**
- Add your app using the package name (e.g., `com.example.messapp`)
- Download `google-services.json` → Place it in `android/app/`

**iOS:**
- Add your app using the Bundle ID
- Download `GoogleService-Info.plist` → Place it in `ios/Runner/`
- Open Xcode → Add `GoogleService-Info.plist` to the Runner target

### 3. Enable Firebase Services:

- **Authentication:** Enable Email/Password (or Google Sign-In if required)
- **Firestore:** Create collections like `users` and `mess`
- **Storage:** Create a storage bucket for profile pictures

🔹 Firebase initialization is already implemented in the code, so no further code changes are needed. You just need to add the config files.

---

## ▶️ Running the App

### Android

```bash
flutter run
flutter run
```

### iOS (macOS only)
### iOS (macOS only)

```bash
flutter run -d ios
flutter run -d ios
```

### Web
### Web

```bash
flutter run -d chrome
flutter run -d chrome
```

---

## 📂 Project Structure
## 📂 Project Structure

```
lib/
├── core/ → App-level utilities, themes, constants
├── models/ → Data models (user, mess, menu, etc.)
├── pages/ → Screens and UI pages
├── providers/ → State management logic
└── main.dart → Entry point of the app
lib/
├── core/ → App-level utilities, themes, constants
├── models/ → Data models (user, mess, menu, etc.)
├── pages/ → Screens and UI pages
├── providers/ → State management logic
└── main.dart → Entry point of the app
```

---

## 🧹 Useful Commands
## 🧹 Useful Commands

- Clean build cache → `flutter clean`
- Analyze code → `flutter analyze`
- Run tests (if available) → `flutter test`

---

- Clean build cache → `flutter clean`
- Analyze code → `flutter analyze`
- Run tests (if available) → `flutter test`
## 🔐 Notes

- SharedPreferences stores Auth Tokens and Email information locally.
- Provider handles UI state like menu selection, mess card balance, and photo upload.
- Firebase is already integrated; just ensure you add the correct configuration files for your project.
1 change: 1 addition & 0 deletions lib/Pages/admin_login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:mess_management_app/Pages/admin_page.dart';
import 'package:mess_management_app/Services/admin_service.dart';
import 'package:mess_management_app/services/admin_auth_service.dart';
import 'package:shared_preferences/shared_preferences.dart';

class AdminLoginPage extends StatefulWidget {
const AdminLoginPage({super.key});
Expand Down
Loading