Openacs has great support for social-networking functionality, and anything else you want to build.
First, it has a great templating system that you can see demonstrated at https://openacs.org/doc/acs-templating/demo which is really running templating code.
It has a good object system which is a base for database objects with which you can build your own kinds of objects, which is backed by its own database table. If you want you can start with these two things, and also look at how you can build custom packages which plugs into openacs.
More generally, the data model for openacs has been tested and maintained for decades, it's very stable.
You can learn about this and more, at https://openacs.org/doc/ where you can explore the pieces of openacs and also see how they fit together.
You can post questions on this forum when you're interested in hearing more.
-Jim