First of all, I recommend using two parts - one for each hand. The upper part will have a melodic interest while the lower part will provide a harmonic foundation. Use basic chordal notes of the tonic, dominant and subdominant chords in the left hand.
1. A: Play a melody of 4 measures long. (measures 1-4).
2. B: Repeat the same melody but with intervals inverted and finish on the dominant note (measures 5-8).
3. A: Repeat Step 1 (measures 9-12).
4. B: Repeat Step 2 but finish on the tonic note (measures 13-16).
5. (Optional) Repeat measures 1-16 with additional melodic ornamentation and figuration.
6. A: Similar melody but start modulating to the dominant key - raise 4th scale degree (measures 17-20).
7. B: Create a cadence in the dominant key (measures 21-24).
8. A: Start returning to the tonic key (measures 25-28).
9. B: Create a final cadence in the tonic key (measures 29-32).
10. (Optional) Repeat measures 17-32 with additional melodic ornamentation and figuration.
So in reality you can see how the first half starts and finishes in the tonic key while the second half starts in the tonic, moves to the dominant and finally finishes in the tonic key.
NOTE: If the piece is a minor key, then the modulation is best done to the relative major key (a key with the same number of accidentals).
In each measure, use any combination of quarter-note and eighth-note rhythms. For the end of the cadences, finish with the dotted half note. If you like challenges, feel free to alternate the rhythms between the hands which will create imitations.
By the way, if you want to learn to play simple and beautiful menuets and other dances from the Notebook of Anna Magdalena Bach, check out this course.