The basic elements of a good contract are that language is specific and tasks, roles and requirements are clearly defined. Use clear language and break your contract into sections. Your client should be able to give their feedback before signing.
If necessary, ask a lawyer to look over your contract. This will protect you from any errors or loopholes that could play against you in the future.