OffCampus is an essential app for university life, meeting new friends and discussing about courses and interests.
With all the university courses shifted into an online teaching and learning environment, students have barely been going onto the campus, making it almost impossible to meet new friends and very hard to discuss about your courses informally.
OffCampus is a platform for university students to:
- Meet new friends from the same degree or across different universities and faculties
- Find and join from the list of pre-loaded course chats to discuss about your coursework (No need to ask for group chats for courses on CSESoc Facebook group anymore!)
- Chat and send messages with your friends and colleagues
- Flutter for building the mobile app
- flutter_bloc for state management
- Firebase for authentication, database and storage
.
├── lib/ # App source code
│ ├── blocs/ # Blocs for state management
│ ├── common/ # Constants and app theme
│ ├── repos/ # Repositories for making API calls
│ ├── screens/ # Screens for the app
│ └── widgets/ # Widgets shared across multiple screens
└── scripts/ # Helper scripts for adding data into the database
To install and setup Flutter, follow the instructions here.
Create a new project on Firebase.
- For iOS, create an iOS app and download the config file
GoogleService-info.plist
, and place it underios/Runner/
. - For Android, create and Android app and download the config file
google-services.json
, and place it underandroid/app/
.
Enable authentication by going into Authentication > Sign-In method > Email/Password > Enable > save.
Enable Cloud Firestore and Storage by going into the corresponding tabs and select a region.
Create a service account by going into Settings > Project settings > Service accounts > Firebase Admin SDK > Generate new private key. Rename the file to keyfile.json
and place it under scripts/.
We provide some Python scripts to initialise and add data into Cloud Firestore. The scripts require Python 3.6+.
Install the required packages with the command below:
cd scripts/
pip3 install -r requirements.txt
Currently we have data for University of New South Wales (UNSW) and University of Sydney (USYD). Run the following command to insert the data:
python3 add_unis.py
The script defaults to scrape all available courses in Term 3 for UNSW and Semester 2 for USYD. For testing purposes, we recommend NOT to scrape and insert all the courses. The -c
option can be used to filter courses by subject and -l
to limit the number of courses to be inserted for each university. Below is an example of running the script with the options:
python3 add_chats.py -c COMP -l 5
We also included a script to insert some dummy user data and included a set of user profile pictures under scripts/images/
. You can create more users by adding more pictures under that folder.
Note that this script runs a machine learning model to classify the gender of the profile pictures. It requires some extra packages and to download the model (~500 MB) in order to prcess the pictures.
To get started, install the extra packages:
pip3 install -r requirements_extra.txt
Run the script to insert the user data:
python3 add_users.py
Navigate back to the root of the project and run the command below to install the Flutter packages:
flutter pub get
Run the code generator to generate files for the model classes:
flutter pub run build_runner build
Run the app:
flutter run
- Email verification of university students
- Unread status of new messages
- Notifications for new messages
- Profile page for updating user details
- Add widgets tests
- App icon made by Freepik from www.flaticon.com
- Onboarding images designed by pch.vector / Freepik