Get it wrong and Li-ion cells will let you know in a spectacular reaction.
Battery University web site will tell you most of what is known about them.
Other than that, why try to re-invent the wheel so-to-speak?
There are literally thousands of chargers out there, smart chargers, built by ones...