Peel and finely chop the onions and garlic together.
In a large pot, heat 1/4 cup olive oil on medium heat and add the chopped onions and garlic. Cook for 5 -10 minutes until the onions begin to brown and caramelize.
While the onions are cooking, scrub and finely chop or shred the carrots and celery. Add to the cooking pot along with the oregano and rosemary when the onions have started to brown.
Let the vegetables cook on high heat, stirring often for 5-10 minutes or until the carrots are tender.
Chop or grate the tomatoes, and add to the cooking pot when the vegetables have started to brown. Carefully add the cooked beans and just enough of the cooking water to make it stew-like.
Simmer on low to blend the flavors. Add the salt, pepper and red pepper flakes. Taste to adjust seasonings.
Directions to cook beans:
Place desired amount of beans in a large bowl and add 4 times the amount of water. The beans should have an inch of water over them. Soak overnight or at least 8 hours.
Prior to cooking, drain any remaining water and rinse with fresh water. This helps reduce the gas producing properties of the beans. Put the bean into a slow cooker or a regular cooking pot that has a lid.
Cover the beans with fresh water, one onion peeled and cut in half, 2 peeled garlic cloves and 2 bay leaves.
If using a slow cooker, turn it on low for 8 hours.
If cooking on the stove, bring the beans to a boil and then turn down to medium-low heat. Gently simmer until the beans are tender, approximately 2-3 hours.
Directions for the tomato basil salad:
Rinse the tomatoes and cut into quarters. Place in a serving dish or bowl.
Wash the basil, spin in a salad spinner or gently towel dry. Remove each leaf and finely chop, or stack a few leaves together and cut with kitchen scissors into small pieces. This can be done right over the tomatoes.
Measure the olive oil and vinegar into a jar with a tight fitting lid, shake well and pour over the tomatoes. Sprinkle with a little salt and a few grinds of fresh pepper.
To serve, add a tablespoon of the tomato salad on top of each bowl of white bean stew.