Compiling/installing from scratch on miniSD card

Hello all o/
This is my first topic here, I'm very new into wireless routers and LEDE/OpenWRT and I need some guidance on tips and links to start researching on how to build an LEDE OS from scratch on a miniSD so I can replicate the image into my other devices. Im using an ZBT router WE826, ramips, MT7620A, and it have little space available (8Mb) to all the packages I need for my project, so I'm in the process of learning on how to build from scratch the OS into an miniSD card.

Any links and begginers tips and not to dos is very apreciated, im eager to learn the maximum I can.

Thx to all and sorry for any misspelling xD