Hi Shiva!
For architecting "Follow/Following" system in MongoDB, your best bet is probably creating a junction collection (Many-Many table in relational DBs). For example, you could have a collection with documents that have the following schema:
{
from: { type: ObjectId }, // Indicates who's is following
to: { type: ObjectId } , // Who's being followed
dateAdded: 'Date',
isActive: 'Boolean'
}
Or if you need a more sophisticated approach, use a graph database that gives you more freedom and flexibility. The only downside is that you will introduce another moving part into your app and you should have enough knowledge of the graph DB.
IMO, if you are just starting out go with MongoDB (assuming this is the DB of your choice), and once you hit any bottlenecks or limitations, start searching for other solutions.
Sidhant Panda
Programmer