### Preparation:
1. **Prepare the cod**: The salted cod must be soaked for 24 to 48 hours in water, changing the water a few times to remove excess salt. After soaking, the fish is typically poached in water until it becomes tender and easy to flake.
2. **Fry the potatoes**: You can either boil or fry the potatoes, slicing them into thin rounds or wedges. They will be used as a base for the dish or mixed into the casserole-style preparation.
3. **Sauté the aromatics**: In a large pan, heat olive oil over medium heat. Add thinly sliced onions, garlic, and bay leaves, and sauté until softened and fragrant.
4. **Prepare the sauce**: Add the tomatoes and bell peppers to the pan, allowing them to cook down into a chunky sauce. Season with salt and pepper to taste.
5. **Combine the cod**: Add the cooked cod into the pan with the sauce, gently flaking it into large chunks. Stir to combine.
6. **Finish with potatoes and garnish**: If you’ve fried the potatoes, layer them in the dish. Alternatively, mix them in with the cod and sauce. Garnish with black olives, fresh parsley, and hard-boiled eggs for a traditional touch.
7. **Serve**: The dish is best served with additional olive oil and crusty bread.
### Variation:
Some versions of **Bacalhau à la Portugaise** might include a spicy element like **piri-piri** (Portuguese chili sauce) for added heat. Other ingredients, like bell peppers or white wine, may also be used, depending on the region or personal taste.
This dish showcases the rich flavors of Portugal, with the salted cod being the star, complemented by the vibrant vegetables and savory seasonings. It is typically enjoyed during festive occasions, family gatherings, or any time of year as a comforting meal.