Skyhawk 172/Cutlass 172
Flight Crew Student
Flight Crew Total 75
Communication Breakdown
Aircraft Equipment Problem Critical; Deviation / Discrepancy - Procedural Landing Without Clearance; Inflight Event / Encounter Fuel Issue
Flight Crew Took Evasive Action
Aircraft
I am a student pilot taking [flying] lessons. I was on the final leg of my solo cross country flight and was given runway 15 to land. I was asked to enter traffic pattern right downwind and report mid-field. However; when I reached mid-field and was about to report my position; all communications went dead and shortly thereafter all avionics shut down.I was unable to communicate at all. All avionics including transponder went dead and I couldn't squawk 7600 for communications failure. I decided to move away from the airport and gain altitude and perhaps land at a non-towered airport and as I was taking that action; my fuel gauge had me at almost empty. This could have been part of the electrical issue (I had more than enough fuel for the entire flight) but not taking any chances; I circled the airport to visually check for any traffic and landed [on another runway]. After that I called the tower on my cell phone once I was clear of the runway. Under instructions from the tower; I was able to taxi to parking.At this point not sure what happened that caused the failure. Prior to take-off I checked the ammeter which indicated normal readings.
C172 student pilot reported a complete electrical system failure while entering the traffic pattern.