A leave management application built with Flutter and Supabase.
The application has two user roles: Manager and Owner. Managers can submit leave applications and view their requests, while Owners can review, approve, or reject submitted applications.
- User authentication with Supabase
- Manager and Owner roles
- Leave application form
- Leave application history
- Leave request details
- Approve and reject leave requests
- Form validation
- Success and error notifications
- Light and dark theme
- Responsive layout
- Flutter
- Dart
- Supabase
- PostgreSQL
- Material 3
lib/
├── main.dart
├── app.dart
│
├── screens/
│ ├── login_screen.dart
│ ├── manager_dashboard.dart
│ ├── owner_dashboard.dart
│ └── leave_application_screen.dart
│
├── widgets/
│ ├── app_toast.dart
│ ├── gradient_background.dart
│ ├── gradient_button.dart
│ ├── leave_details_sheet.dart
│ └── leave_request_card.dart
│
└── services/
└── supabase_service.dart
A Manager can:
- Log in using their account
- Submit a leave application
- View their submitted leave applications
- Open an application to view its details
An Owner can:
- Log in using their account
- View submitted leave applications
- Open an application to view its details
- Approve a leave application
- Reject a leave application
Supabase is used for authentication and database operations.
The application uses:
- Supabase Authentication for login
- PostgreSQL for storing profiles and leave applications
- User roles stored in the
profilestable - Leave requests stored in the
leave_applicationstable
- Flutter SDK
- Dart SDK
- A Supabase project
git clone https://github.com/azmil666/leave_application.git
cd leave_applicationflutter pub getCreate a .env file in the project root:
SUPABASE_URL=your_supabase_url
SUPABASE_PUBLISHABLE_KEY=your_supabase_publishable_keyDo not commit the .env file to the repository.
flutter runThe application expects the following main tables:
Stores user information and their role.
| Column | Description |
|---|---|
id |
User ID from Supabase Authentication |
role |
User role (manager or owner) |
Stores submitted leave applications, including employee details, leave dates, reason, ticket information, and application status.
Users log in with their email and password. After authentication, they are taken to the dashboard corresponding to their role.
Managers can view their leave applications and submit a new application.
Managers can enter their employee details, leave dates, reason, and other required information before submitting a request.
Owners can view all submitted leave applications and approve or reject them.
The .env file is intentionally excluded from version control.
Make sure the following is included in .gitignore:
.env
.env.*