Playing tennis is a lot of fun.
Is this a structure of [adjective: a lot of][noun: fun] or [adverb: a lot of][adjective: fun]?
The ‘Longman Student Grammar of Spoken and Written English’ describes a lot of as a quantifying determiner. That makes the structure of your example [determiner: a lot of] [noun: fun].
In that sentence, fun is a noun.
Informally, fun can also be a verb ("They are just funning you.") or an adjective ("It was a fun evening."), but this is not the case there.
Fun is a noun. There are many derivatives of the word. Funny is a proper adjective. Funster is someone who likes to have a good time. Fun as a verb goes into the same basket with office and movie both of which are convenient shorthand for people too lazy to put together a proper sentence. Fun as an adjective, along with "funner" and "funnest" create for me, as well as other educated people I know, an effect similar to fingernails on a blackboard. But for most people, they could (sic) care less.