A comprehensive Flutter mobile application that mirrors your MEAN stack e-commerce website functionality. This app provides a complete shopping experience with user authentication, product browsing, cart management, order processing, and admin capabilities.
- User registration and login
- JWT-based authentication
- Persistent sessions with SharedPreferences
- Role-based access control (User/Admin)
- Product listing with search and filtering
- Category-based navigation
- Product detail views with image galleries
- Product ratings and reviews display
- Real-time stock status
- Add/remove items from cart
- Quantity management
- Real-time price calculations
- Persistent cart data
- Cart badge with item count
- Comprehensive checkout process
- Multiple payment method support
- Order confirmation and tracking
- Order history with detailed views
- Order status updates
- Profile management and editing
- Order history access
- Account settings
- User avatar support
- User management and oversight
- Order management and status updates
- Real-time analytics
- Email notifications to customers
- Print order functionality
- Material Design principles
- Responsive design for all screen sizes
- Smooth animations and transitions
- Loading states and error handling
- Pull-to-refresh functionality
- Image caching and optimization
- Flutter 3.0+
- Dart 3.0+
- Provider for state management
- HTTP for API communication
- SharedPreferences for local storage
- CachedNetworkImage for image optimization
- Intl for internationalization
lib/
βββ core/
β βββ app.dart # Main app configuration
β βββ models/ # Data models
β β βββ user_model.dart
β β βββ product_model.dart
β βββ providers/ # State management
β β βββ auth_provider.dart
β β βββ cart_provider.dart
β β βββ product_provider.dart
β βββ services/ # API services
β βββ api_service.dart
βββ screens/ # UI screens
β βββ auth/
β β βββ login_screen.dart
β β βββ register_screen.dart
β βββ home/
β β βββ home_screen.dart
β βββ product/
β β βββ product_detail_screen.dart
β βββ cart/
β β βββ cart_screen.dart
β βββ checkout/
β β βββ checkout_screen.dart
β βββ orders/
β β βββ orders_screen.dart
β βββ profile/
β β βββ profile_screen.dart
β βββ admin/
β β βββ admin_dashboard.dart
β βββ splash_screen.dart
βββ main.dart # App entry point
The app integrates with your existing MEAN stack backend API:
- Base URL:
https://abdelrhman-dev.me/api - Authentication: JWT Bearer tokens
- Endpoints: Users, Products, Cart, Orders
POST /users/login- User authenticationPOST /users/register- User registrationGET /products- Fetch all productsGET /products/:id- Get product detailsPOST /cart- Add item to cartGET /cart- Get cart itemsPOST /orders- Create new orderGET /orders/myorders- Get user orders
- Flutter SDK 3.0 or higher
- Android Studio / VS Code
- Android/iOS device or emulator
-
Clone the repository
git clone <your-repo-url> cd E-commerce-Flutter
-
Install dependencies
flutter pub get
-
Add assets
- Place your logo in
assets/images/logo.png - Add any additional images to
assets/images/
- Place your logo in
-
Update API configuration
- Verify the base URL in
lib/core/services/api_service.dart - Ensure your backend API is running
- Verify the base URL in
-
Run the app
flutter run
- Development: Uses
https://abdelrhman-dev.me/api - Production: Update base URL in
api_service.dart
The app supports the same credentials as your web application:
- Regular User:
apdo@apdo.com/0123456789 - Admin User:
admin@ceo.apdo/123456789
- User authentication and registration
- Product listing and search
- Shopping cart functionality
- Order management
- User profile management
- Admin dashboard
- Responsive design
- Push notifications
- Offline support
- Advanced filtering
- Wishlist functionality
- Social media login
- Multiple language support
- Advanced analytics
- Product reviews and ratings
- Live chat support
# Run all tests
flutter test
# Run with coverage
flutter test --coverageUse the same test accounts as your web application:
- Regular user:
apdo@apdo.com/0123456789 - Admin user:
admin@ceo.apdo/123456789
- Build APK:
flutter build apk - Build App Bundle:
flutter build appbundle
- Build iOS:
flutter build ios - Archive in Xcode for App Store
- 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
For support or questions:
- Create an issue in the repository
- Contact: [Your contact information]
This project is licensed under the MIT License - see the LICENSE file for details.
- Built to complement the MEAN stack e-commerce website
- Designed with Material Design principles
- Optimized for performance and user experience
Note: This Flutter app is designed to work seamlessly with your existing MEAN stack backend. Ensure your API server is running and accessible for full functionality.