Skip to content

Commit 72e37fd

Browse files
authored
Revise README with project overview and setup instructions and app icon
Updated README to provide detailed project information, key features, technology stack, architecture, and CI/CD pipeline instructions.
1 parent ad200d4 commit 72e37fd

File tree

1 file changed

+97
-10
lines changed

1 file changed

+97
-10
lines changed

README.md

Lines changed: 97 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,103 @@
1-
# azt
1+
# AZT - Modern Cross-Platform E-Commerce Application
2+
![aztlogo](web/icons/Icon-192.png?raw=true)
3+
**AZT** is a cutting-edge Flutter application designed to provide a seamless e-commerce experience across Web, Android, and iOS. Built with a robust modern tech stack, it features a feature-first architecture, role-based access control (Customer, Retailer, Wholesaler), and a fully integrated Firebase backend.
24

3-
A new Flutter project.
5+
---
46

5-
## Getting Started
7+
## Key Features
68

7-
This project is a starting point for a Flutter application.
9+
* **Cross-Platform Support**: Runs natively on Android, iOS, and the Web.
10+
* **Role-Based Access**: Distinct dashboards and functionalities for Customers, Retailers, and Wholesalers.
11+
* **Secure Authentication**: Email/Password and Google Sign-In via Firebase Auth.
12+
* **Real-Time Data**: Instant updates using Firebase Cloud Firestore and Realtime Database.
13+
* **Progressive Web App (PWA)**: Installable web experience with offline capabilities.
14+
* **Automated CI/CD**: Fully automated deployment pipeline to GitHub Pages.
815

9-
A few resources to get you started if this is your first Flutter project:
16+
---
1017

11-
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12-
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
18+
## Technology Stack
1319

14-
For help getting started with Flutter development, view the
15-
[online documentation](https://docs.flutter.dev/), which offers tutorials,
16-
samples, guidance on mobile development, and a full API reference.
20+
### Frontend & Framework
21+
* **Flutter**: SDK version `^3.9.2` for building natively compiled applications.
22+
* **Dart**: The language powering the application.
23+
24+
### State Management
25+
* **Flutter Bloc**: The application utilizes the BLoC (Business Logic Component) pattern using the `flutter_bloc` package.
26+
* **Cubits**: Specifically, `AuthCubit` handles the entire authentication flow, including state emissions for `Authenticated`, `Unauthenticated`, `RoleNotSelected`, and `EmailNotVerified`.
27+
28+
### Backend Services (Firebase)
29+
* **Firebase Auth**: Manages user sessions and identity (Google & Email providers).
30+
* **Cloud Firestore**: Stores user profiles, role data, and persistent application state.
31+
* **Realtime Database**: utilized for high-frequency data updates.
32+
33+
---
34+
35+
## Project Architecture
36+
37+
The project follows a **Feature-First Architecture** combined with the **Repository Pattern** to ensure separation of concerns and scalability.
38+
39+
* **Features Directory**: Code is organized by feature (e.g., `auth`, `home`, `retailer`) rather than layer.
40+
* **Repository Pattern**:
41+
* **Data Layer**: `FirebaseAuthRepo` handles direct communication with Firebase.
42+
* **Domain Layer**: Cubits interact with Repositories to fetch data, keeping UI logic clean.
43+
* **Dependency Injection**: `MultiRepositoryProvider` and `MultiBlocProvider` inject dependencies at the root of the app.
44+
45+
---
46+
47+
## Progressive Web App (PWA) & Accessibility
48+
49+
The web build is configured as a Progressive Web App, providing an app-like experience in the browser.
50+
51+
* **Manifest Configuration**: The `manifest.json` is configured with standalone display mode, theme colors, and maskable icons for optimal display on all devices.
52+
* **Assets**: Includes high-resolution icons for various viewports.
53+
54+
---
55+
56+
## Python Proxy Server for Notifications
57+
58+
To handle email notifications securely and efficiently without incurring cloud function costs, the application employs a custom solution.
59+
60+
**The application uses a Python-based email proxy server to send order status notifications. This proxy is necessary to bypass CORS restrictions and to avoid using paid cloud functions, when sending emails from the Flutter web client. This server can be run on cheap and minimal equipment such as Raspberry PI 3B/4 with a functioning internet connection, thus, making the project host for anyone.**
61+
62+
The client-side implementation (`MailService`) intelligently switches `localhost` addresses based on the platform (Android Emulator vs. iOS Simulator vs. Web) to communicate with this proxy.
63+
64+
---
65+
66+
## CI/CD Pipeline
67+
68+
The project utilizes **GitHub Actions** for Continuous Integration and Deployment.
69+
70+
* **Workflow**: Defined in `.github/workflows/deploy-to-gh-pages.yml`.
71+
* **Automation**:
72+
1. Triggers on push to the `main` branch.
73+
2. Sets up the Flutter environment and enables web support.
74+
3. Builds the Flutter web application in release mode (`flutter build web --release`).
75+
4. Handles SPA (Single Page Application) routing by copying `index.html` to `404.html`.
76+
5. Deploys the build artifacts directly to the `gh-pages` branch.
77+
78+
---
79+
80+
## Installation & Setup
81+
82+
1. **Clone the repository**:
83+
```bash
84+
git clone [https://github.com/yourusername/azt.git](https://github.com/yourusername/azt.git)
85+
cd azt
86+
```
87+
88+
2. **Install Dependencies**:
89+
```bash
90+
flutter pub get
91+
```
92+
93+
3. **Run the Python Proxy Server**:
94+
Ensure your Python environment is set up and run the server script (not included in this snippet) to handle email requests.
95+
96+
4. **Run the App**:
97+
* **Web**: `flutter run -d chrome`
98+
* **Mobile**: `flutter run` (ensure an emulator or device is connected)
99+
100+
---
101+
102+
## Link to the Application
103+
https://gmbcode.github.io/azt/

0 commit comments

Comments
 (0)