Hello virtouso,
yes, Nakama is completely open source and that is the correct repository, you may just clone it and do any changes you like.
By following the desired function calls in the code you can track all functionalities behind them.
The runtime file in the server package gives a pretty nice overview over all the available functions and is a good starting point to track references in the code.
You may also implement custom logic without modifying the base repository, by writing custom modules as explained here.
The nakama runtime accepts custom modules in multiple programming languages (go, typescript, lua).