Asterisk reading prob

I’m planning to modify asterisk according to my own need and then use it as my final year project
so can anyone tell me where i could get the architectural layout of the API that is what each folder does eg: Keys
cause i need to study the whole architecture and then is when i can modify it
PLzzz help