Default [Q] How do i compile am AOSP rom from source for an unknown tabet

I live in Mauritius and here, the government has initiated a project to give all form 5(16 yo) students a tablet. Though the hardware is decent, the UI lags INSANELY, and it is nearly unusable. Also the battery life is extremely poor: ~1 hour, for a 6000 mAh battery. Therefore i want to build a rom for the tablet, but with the little programming knowledge i have, i don't know where to start, and all the noob tuts i found are for devices that already exist, so plz can any1 guide me?

[I have common android knowledge, and I am currently using an HTC M8 on viper rom]