A mobile application for travelers at Halifax Stanfield International Airport (YHZ) providing real-time flight information, airport shop directory, and item reservation system.
Click on Features to view the explanation of features implemented in the application.
| Layer | Technologies |
|---|---|
| Frontend | React Native 0.82.1, TypeScript, React 19.1.1 |
| Backend | Python Flask, Flask-SQLAlchemy |
| Database | MariaDB (db-5308.cs.dal.ca) |
| Authentication | JWT (PyJWT) |
| Push Notifications | Firebase Cloud Messaging |
| Background Jobs | APScheduler |
| Package | Version | Purpose |
|---|---|---|
| react | 19.1.1 | React library |
| react-native | 0.82.1 | Mobile framework |
| @react-navigation/native | ^7.1.19 | Navigation framework |
| @react-navigation/stack | ^7.6.3 | Stack navigation |
| @react-native-firebase/app | ^23.5.0 | Firebase core SDK |
| @react-native-firebase/messaging | ^23.5.0 | Push notifications |
| axios | ^1.12.2 | HTTP client |
| react-native-gesture-handler | ^2.20.2 | Gesture handling |
| react-native-safe-area-context | ^5.6.2 | Safe area handling |
| react-native-screens | ^4.18.0 | Native screen components |
| react-native-vector-icons | ^10.2.0 | Icon library |
| Package | Version | Purpose |
|---|---|---|
| typescript | ^5.8.3 | TypeScript compiler |
| @babel/core | ^7.25.2 | Babel compiler |
| jest | ^29.6.3 | Testing framework |
| eslint | ^8.19.0 | Code linting |
| prettier | 2.8.8 | Code formatting |
| Package | Purpose |
|---|---|
| flask | Web framework for REST API |
| flask_sqlalchemy | SQLAlchemy integration |
| PyMySQL | MySQL/MariaDB database driver |
| python-dotenv | Environment variable management |
| pyjwt | JWT token encoding/decoding |
| firebase-admin | Firebase Admin SDK for push notifications |
| pytz | Timezone handling (America/Halifax) |
| APScheduler | Background job scheduling |
| pytest | Testing framework |
| pytest-flask | Flask testing utilities |
| pytest-cov | Test coverage reporting |
- Node.js >= 20
- Python 3.8+
- Android Studio (for Android development, make an android simulator)
- Firebase project with Cloud Messaging enabled
-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install
-
Configure API base URL:
Edit
src/services/axiosProvider.tsand update thebaseURL:const axiosInstance: AxiosInstance = axios.create({ baseURL: 'http://172.17.1.217', timeout: 10000, headers: { 'Content-Type': 'application/json', }, });
-
Add Firebase configuration:
Place
google-services.jsoninfrontend/android/app/ -
Start Metro bundler:
npm start
-
Run on Android (in a new terminal):
npx react-native run-android
-
Navigate to backend directory:
cd flask_app -
Create virtual environment:
python -m venv venv
-
Activate virtual environment:
On Linux/Mac:
source venv/bin/activateOn Windows:
venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Create
.envfile:Create a
.envfile inflask_app/with the following configuration:FLASK_ENV=production DATABASE_URL=jdbc:mariadb://db-5308.cs.dal.ca:3306/CSCI5308_1_DEVINT DB_HOST=db-5308.cs.dal.ca DB_NAME=CSCI5308_1_DEVINT DB_USER=CSCI5308_1_DEVINT_USER DB_PASSWORD=<your_password> AIRPORT_NAME=Halifax (YHZ)
-
Add Firebase service account key:
Place your Firebase service account JSON file in the
flask_app/directory. -
Run the server:
flask run --host=0.0.0.0
Or for production:
python app.py
Run the database connection test:
cd flask_app
python test_db_connection.pyExpected output:
[OK] Connected successfully!
[OK] MariaDB/MySQL version: 10.6.12
[OK] Flights table exists with 42 rows
[OK] Database connection test passed!
Click on Deployment to check the complete deployment instructions along with major issues and its solution.
group01/
├── frontend/ # React Native mobile app
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── screens/ # Screen components
│ │ │ ├── auth/ # Login, Loading, GuestFlight
│ │ │ ├── shops/ # Shop views and catalog
│ │ │ └── tabs/ # Main tab screens
│ │ ├── hooks/ # Custom React hooks
│ │ ├── services/ # API communication (Axios)
│ │ ├── navigation/ # Navigation configuration
│ │ ├── types/ # TypeScript definitions
│ │ └── utils/ # Helper functions
│ ├── android/ # Android native code
│ └── package.json # Frontend dependencies
│
├── flask_app/ # Flask REST API backend
│ ├── app.py # Main application
│ ├── auth.py # JWT authentication
│ ├── shop.py # Shop endpoints
│ ├── booking.py # Booking endpoints
│ ├── helper/ # Firebase & cron helpers
│ ├── tests/ # Pytest test suite
│ ├── requirements.txt # Python dependencies
│ └── .env # Environment configuration
│
└── README.md # This file
| Method | Endpoint | Description |
|---|---|---|
| POST | /login |
Authenticate with flight_number and ticket_number |
| Method | Endpoint | Description |
|---|---|---|
| GET | /flights |
Get all flights |
| GET | /flights/<flight_id> |
Get flight details |
| GET | /flights/arrivals |
Get arriving flights |
| GET | /flights/departures |
Get departing flights |
| Method | Endpoint | Description |
|---|---|---|
| GET | /shops |
List all shops |
| GET | /shops/<shop_id> |
Get shop details |
| GET | /shops/<shop_id>/hours |
Get shop hours |
| GET | /shops/<shop_id>/items |
Get shop items |
| GET | /shops/categories |
Get shop categories |
| Method | Endpoint | Description |
|---|---|---|
| GET | /bookings |
Get user's bookings |
| POST | /bookings |
Create reservation |
| POST | /bookings/<id>/cancel |
Cancel reservation |
| Method | Endpoint | Description |
|---|---|---|
| POST | /send-notification |
Send push notification |
| POST | /subscribe |
Subscribe to flight updates |
Click on Usage to find all the usage scenarios of all the features implemented in the applicaton.
We followed Build ----> Test(80% Code Coverage) -----> Deploy ----> Code quality with four stages for CI/CD pipeline development.
Click on CI/CD to know about the complete CI/CD Pipeline setup for the application along with proper explanation with commans and some issues and its solution.
Click on TDD to see the complete documentation on TDD.
Click on Design to know about the implementation of design principles in the development part of the application.
Click on Code-Quality to find the refactoring documentation and also gives explanation of smells identified and refactored.
Go to Documentation/Code_Quality_Files(Before Refactoring) for code quality reports before refactoring.
Go to Documentation/Code_Quality_Files(After Refactoring) for code quality reports after refactoring.
Click on Other_Clean_Code_Practices for information about clean code practices followed in the main files of the backend part.