If you want to work on a new feature or fix any issues, create a detailed draft, file it as an issue, get approval from maintainers and start working on it. Be sure to follow this guideline for the same.
Please note we have a code of conduct, please follow it in all your interactions with the project.
- Before contributing to an issue, make sure that no one is assigned or has taken that issue. If no one is and you would like to work on the issue, please comment on the issue to let others know that someone is working on the issue.
- Before creating a pull request, it is important that you make sure your branch and repository are up to date with this one. Some conflicts can be resolved, but many are hard to resolve. Add the upstream branch and always keep your branch up to date.
-
Fork this repo
-
Clone the forked repo
git clone url-to-cloned-app
-
Go to the directory of cloned repo
cd DSC-DDU-Admin
-
Get packages
flutter pub get
-
Create a Firebase project
- Make a Firebase account if you don't already have one.
- Go to your Firebase Console
- Select Add Project
- Give your project a name and follow the steps to create a project in your account.
- Go to your project dashboard
- Add android App
- Android Package Name:
com.dscddu.dsc_admin
- Download
google-services.json
- Put this file in
DSC-DDU-Admin/android/app
folder
- Android Package Name:
- Add your fingerprint to enable debugging (follow steps to do so from https://developers.google.com/android/guides/client-auth). You can do this later from Project Settings too
-
Enable Google Sign In and add temp data to Firestore
- Go to Authentication -> Set up Sign In Method
- Enable Google Sign In
- Go to Cloud Firestore and create database
- Start a collection with Collection ID
extra_access_users
Add documents with following fields to give user access to the app.- Document ID: Auto
- Fields:
can_edit: true
(boolean)can_get_list: true
(boolean)can_live: true
(boolean)can_notify: true
(boolean)can_scan: true
(boolean)email_id: your_mail_id
(string)
- Go to Rules and add following rule:
// Allow read/write access on all documents to any user signed in to the application service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write: if request.auth.uid != null; } } }
-
Run the app in your device or an emulator.
- Create a new branch:
git branch new-branch
- Checkout new branch:
git checkout new-branch
- Add, commit and push your changes to the new branch
git add . git commit -m "changes" git push origin new-branch
- To make sure your forked repository is up to date with this repository. Add this repository as the upstream repository by doing the following:
git remote add upstream https://github.com/developer-student-clubs/DSC-DDU-Admin.git
Then, to fetch from this repository:
git fetch upstream
git merge upstream/master master
- Go to your forked repository and press the “New pull request” button.
- Once the pull request is reviewed and approved, it will be merged.
Follow https://developers.google.com/community-guidelines to check the community guidelines.