theres a lot of info on building midi controllers already out there
arduino and teensy are the most common starting points prolly
building something in that small of a space is gunna be more challenging
but really depends on where youre at,
what skills u have soldering,coding,building,etc, what tools u have/are familiar w/.
i’ve built a couple of controllers for myself. they were fun projects and i use them a lot