Purpose of life has to be an all encompassing one, should cover the whole gamut of life. It should lead you on a path of self recognition, recognition of your Creator, a true understanding of the expanse of responsibilities and the dynamics of relationship with fellow human beings.
The purpose of life of this stature has been comprehensively defined in the Quran as :
وَمَا خَلَقۡتُ ٱلۡجِنَّ وَٱلۡإِنسَ إِلَّا لِيَعۡبُدُونِ
And I did not create the jinn and mankind except to worship Me. (ch 51: surah Adh Dhariyat : verse 56).