Retirement tax questions

If I have this right, your net self-employment income from your side gig is shown on schedule C, line 31.  The deductible portion of self-employment tax is on line 13 of schedule SE.  Net profit minus the deductible portion of SE tax is your "compensation" for purposes of make a Roth contribution.  You can divide that any way you like between a Roth in your name and in your spouse's name, as long as you don't go over that total.