i got a 90 crx si with rust all the way around, anyway just a few days ago my car die, when i turn the key it wont start at all

it try to turn over but it wont

then i try it a few more time and the dash light get dimmer n dimmer, THEN it start making clicking sound n it wont even try to turn over.
so what could it be, could it be the alternator??????? oh and the stero and blower work so i dont think the battery is dead. and the last time i had problem is when it ran hella hard and it wont start till the next day, that was the only time and it was over a year ago.