One possibility: the Beloved Disciple is Lazarus
The primary source for laying out a case for the author's identity is John 21.24-25, the final two verses of the book. Here we are given a brief glimpse at the book's origin: it seems to have been written by or based on the testimony of an individual we identify as the Beloved Disciple ('This is the disciple who is bearing witness about these things', 'I suppose that...') for the benefit of his Christian community ('we know that his testimony is true').
Tradition has long said this Beloved Disciple was John, the son of Zebadiah. Some of the earliest surviving manuscripts of the Gospel (P66 and P75) contain the title 'According to John'. This was also the opinion of several early Church writers, including Dionysius of Alexandria, Origen, Eusebius, Clement of Alexandria, Irenaeus, and the Muratorian fragement.
It should be clear: without the Gospel directly naming its author, all evidence is circumstantial at best. The most we can do is formulate an opinion based around possible interpretations of this circumstantial evidence. So my answer here is not meant to be a definitive answer to the question, only one possible answer.
Internal evidence of who the Beloved Disciple is not
We should clarify a few cases of who the Beloved Disciple cannot be. Unless we assume a later editorial process took place to purposely obscure his identity, the Beloved Disciple cannot be:
- Peter: the two of them are mentioned together several times, and interact with one another (13.21-25; 18.15-18; 20.2-10; 21.7,20-23),
- Thomas: the disciple is described as a witness to the empty tomb and 'believed' (20.8-9), contrary to Thomas who refuses to 'believe' until he sees Jesus in person (20.24-25),
- Mary Magdalene: the disciple is consistently portrayed as a male.
Internal evidence regarding John, the son of Zebadiah
In the fourth Gospel, John, the son of Zebadiah, is mentioned only once. This single reference (John 21.2) is indirect – he is not even mentioned by name, we infer his presence in the epithet 'the sons of Zebedee'. This is the only passage where John is mentioned (even indirectly) in proximity to the Beloved Disciple (who is found in 21.7).
While tradition strongly favors equating the two, the text itself makes no effort to do so, and even implies against it. Objectively speaking, the Beloved Disciple could just as well have been Nathanael, the other 'son of Zebedee', or one of the other 'two disciples' mentioned in John 21.2.
Internal evidence regarding Lazarus
A handful of scholars have suggested the Beloved Disciple should be understood as Lazarus. Ben Witherington III makes perhaps the strongest case, but some of his arguments depend on a close corroboration between the fourth Gospel and the Synoptics, which is not what the present question is allowing. I will here lay out some of the internal evidence that, though ultimately circumstantial, may be seen to identify Lazarus as the Beloved Disciple, and thus the author/source of the book's content.
1. 'Love' is one of the major themes of the fourth Gospel, but for the first ten chapters of the book, no individual is singled out as the recipient of Jesus' love. None of the disciples are a singular focus when it comes to Jesus 'loving' someone. When we get to chapter 11, we are suddenly introduced to the siblings Lazarus, Martha, and Mary. While verse 11.5 does identify all three as people 'Jesus loved', it is clear that Lazarus is the primary focus of this 'love' (11.3,36).
But just as Lazarus disappears from the narrative (last mentioned in 12.17), the Beloved Disciple suddenly enters the story (first mentioned in 13.23). Again, of all of Jesus' followers, this particular disciple is the only one described as 'loved' by Jesus in a unique way. It is quite possible readers were meant to make this connection, and infer that Lazarus was the Beloved Disciple.
It otherwise becomes an extremely unusual coincidence that chapters 11-13, the place where the book's narrative pivots from signs narrative to passion narrative, would introduce two individuals uniquely identified as the one(s) 'whom Jesus loved'.
2. 'Life' is another one of the major themes of the fourth Gospel. The pre-passion narrative (chapters 1-12) are structured around seven 'signs' that Jesus performs as evidence for his identity as the messiah. The seventh sign, which is the turning point of the book from the signs narrative over to the passion narrative, is the raising of Lazarus from the dead.
3. The Beloved Disciple is specifically portrayed as the first to 'believe' that Jesus has been raised from the dead (20.8-9). This could possibly be because, internal to the narrative, the Beloved Disciple himself had been raised from the dead.
4. The final bit of narration in the Gospel is 21.15-23. After having just been told he will die for Jesus' sake (21.18-19), Peter asks Jesus what would become of the Beloved Disciple (21.20-21). Peter's question and Jesus' response are mistakenly understood by the rest of the group as meaning the Beloved Disciple 'was not to die'; the narrator goes out of his way to stamp out this misconception. But we must ask, why was Peter prompted to ask about the Beloved Disciple's fate after having just learned his own fate involved martyrdom? Why did the other disciples seem to think Jesus' answer meant the Beloved Disciple would never die? This could possibly be because, internal to the narrative, the Beloved Disciple had been raised from the dead once, and the other disciples considered that he would not die again.