How to write a swiss pairing software I'm thinking about to develop an online service to provide free software for helping chess tournaments organizers with pairing systems like swiss, round robin, team-swiss, team-round robin.

Could you, please, send me some learning materials how those pairing systems work?
You should start with the section of the FIDE web site which describes the Swiss Rules. This has sections giving detailed descriptions of the different systems for making the pairings along with much other useful information.

It is also worth looking at the FIDE Tournament Rules which includes tables for round robin tournaments and descriptions of tie break methods which it is good to also have in a pairing program.