Is It Possible To Get The ID Before It Was Added?

This is covered in the documentation. See the last paragraph of the add a document section.

DocumentReference ref = db.collection("my_collection").doc();
String myId = ref.id;

const db = firebase.firestore();
const ref = db.collection('your_collection_name').doc();
const id = ref.id;

You can do this in following manner (code is for AngularFire2 v5, which is similar to any other version of firebase SDK say web, node etc.)

const pushkey = this.afs.createId();
const project = {' pushKey': pushkey, ...data };
this.projectsRef.doc(pushkey).set(project);

projectsRef is firestore collection reference.

data is an object with key, value you want to upload to firestore.

afs is angularfirestore module injected in constructor.

This will generate a new document at Collection called projectsRef, with its id as pushKey and that document will have pushKey property same as id of document.

Remember, set will also delete any existing data

Actually .add() and .doc().set() are the same operations. But with .add() the id is auto generated and with .doc().set() you can provide custom id.