A Flutter-based e-commerce application recreating the University of Portsmouth Student Union shop. This project demonstrates modern mobile app development practices with Firebase integration, state management, and comprehensive testing.
- β Homepage: Responsive homepage with featured products and collections
- β Navigation: Full navigation system with working navbar and routing
- β Product Pages: Dynamic product detail pages with images, descriptions, and pricing
- β Collections: Browse products by category/collection
- β About Page: Company information and mission statement
- β Footer: Consistent footer across all pages with links
- β Shopping Cart: Full cart functionality with add/remove items and quantity management
- β Authentication: User login/signup with Firebase Authentication
- β State Management: Provider pattern for cart and user state
- β Responsive Design: Optimized for both mobile and desktop views
- β Sale Collection: Special promotional pages with discounted items
- β Firebase Integration: Real-time database and authentication
- β User Accounts: Account management with order history
- β Search Functionality: Product search across collections
- β Cart Persistence: Cart data persists across sessions
Mobile view of the homepage with featured products
Product detail page with size/color options
Shopping cart with item management
Individual collection with filters
Freshers sale promotional page
- Flutter SDK (3.0 or higher)
- Dart SDK (3.0 or higher)
- Git
- A code editor (VS Code recommended)
- Chrome browser (for web testing)
-
Clone the repository
git clone https://github.com/Creyas/union_shop.git cd union_shop -
Install dependencies
flutter pub get
-
Run the application
flutter run -d chrome
-
View in mobile mode
- Open Chrome DevTools (F12)
- Click "Toggle device toolbar"
- Select a mobile device preset (e.g., iPhone 12 Pro)
This project includes comprehensive widget tests for all major pages and components.
flutter testflutter test test/product_test.dartflutter test --coveragetest/home_test.dart- Homepage teststest/product_test.dart- Product page teststest/about_test.dart- About page teststest/all_products_page_test.dart- All products page teststest/cart_page_test.dart- Shopping cart teststest/collection_detail_test.dart- Collection detail teststest/freshers_sale_test.dart- Sale page teststest/login_signup_test.dart- Authentication tests
union_shop/
βββ lib/
β βββ main.dart # App entry point and routing
β βββ pages/
β β βββ about.dart # About page
β β βββ all_products_page.dart # All products listing
β β βββ cart_page.dart # Shopping cart
β β βββ collection_detail.dart # Collection detail view
β β βββ freshers_sale.dart # Sale/promotional page
β β βββ login_signup.dart # Authentication page
β β βββ product_page.dart # Product detail page
β βββ providers/
β β βββ cart_provider.dart # Cart state management
β βββ services/
β β βββ auth_service.dart # Firebase authentication
β βββ widgets/
β βββ header_widget.dart # Reusable header component
β βββ footer_widget.dart # Reusable footer component
βββ test/
β βββ about_test.dart
β βββ all_products_page_test.dart
β βββ cart_page_test.dart
β βββ collection_detail_test.dart
β βββ freshers_sale_test.dart
β βββ home_test.dart
β βββ login_signup_test.dart
β βββ product_test.dart
βββ screenshots/ # App screenshots for README
βββ pubspec.yaml # Project dependencies
βββ README.md # This file
This application uses Firebase for backend services:
- Firebase Authentication - User registration and login
- Cloud Firestore - User data and order storage
- Create a Firebase project at console.firebase.google.com
- Add a web app to your Firebase project
- Enable Authentication (Email/Password)
- Enable Cloud Firestore Database
- Add your Firebase configuration to the app
- Authentication required for cart persistence
- User data protected with Firestore security rules
- Secure password reset functionality
[Include link to hosted version if deployed]
Example: The application is hosted on Firebase Hosting and can be accessed at: https://union-shop-xxxxx.web.app
Key packages used in this project:
dependencies:
flutter:
sdk: flutter
firebase_core: ^latest
firebase_auth: ^latest
cloud_firestore: ^latest
provider: ^latest
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^latest- Regular, meaningful commits throughout development
- Clear, descriptive commit messages
- Feature branches for major functionality
- Properly formatted code (using
dart format) - No errors, warnings, or lints
- Well-structured and refactored codebase
- Minimal code repetition
- Comprehensive widget tests
- All tests passing
- High code coverage
Your Name
- GitHub: @YOUR-USERNAME
- University ID: UPXXXXXX
Module: Programming Applications and Programming Languages (M30235) / User Experience Design and Implementation (M32605)
Institution: University of Portsmouth
Academic Year: 2024/2025
- Original Union Shop website: shop.upsu.net
- Course materials: Flutter Course Homepage
- University of Portsmouth School of Computing
This project is created for educational purposes as part of university coursework.
Note: This is a student project recreating the UPSU shop for educational purposes. It is not affiliated with or endorsed by the University of Portsmouth Students' Union.



