TrueOS is FreeBSD based so pretty much any documentation about how to build from source is applicable. They all assume that you are building from source to update an existing system. The executive summary is:
update your base source tree
cd to your source tree
make buildworld && make buildkernel && make installkernel && mergemaster -p && reboot to single user && make installworld && mergemaster && exit single user mode or reboot
Ports are much the same:
update your ports tree
rebuild all your installed ports
Again, The FreeBSD handbook should be available online (start at freebsd.org), the only difference is don’t pull down FreeBSD source trees from svn, pull down TrueOS source trees from github.
X is a port, so you just make and make install the appropriate port.
Lumina, LXDE, XFCE, KDE, Gnome, twm, other window managers and desktop environments are ports, so again, you simply make and make install them.
TrueOS as it is today has prebuilt pkgs that represent the ports; you simply go and install them. Yes that means you can install LXDE along side of Lumina. I believe at the login display manager you will be able to choose what you want to run or run “your last session”.
If your intent is to try and build a distribution off of TrueOS sources, that’s a whole different disscussion.
It would help if we knew more about what you are trying to accomplish.