1 small red or yellow onion, thinly sliced into rings
2 tablespoons fresh lime juice, plus more if desired
Kosher salt and freshly ground pepper
4 tablespoons vegetable oil
2 garlic cloves, thinly sliced
1 1/2 pounds tomatoes, cored and sliced into 1-inch wedges
1 small Serrano or jalapeño chile, seeds removed if you like, finely chopped (optional)
6 ounces tortilla chips or tostadas, broken up into chip-size pieces
4 large eggs
4 ounces queso fresco, crumbled
1 cup cilantro, tender leaves and stems
1/2 cup crema (or sour cream, thinned with a bit of water)(optional)
Place half the onions in a small bowl and cover with lime juice. Season with salt and pepper, toss and set aside.
Heat oil in a large skillet (12-inch works well) over medium-high heat. Add remaining onions and garlic and season with salt and pepper. Cook, stirring occasionally until they are tender and starting to brown, about 4 minutes. Add tomatoes and half of chile (if using) and season with salt and pepper.
Cook, stirring occasionally, until the tomatoes have started to burst and simmer in their own juices, 5 to 8 minutes. Add 1 cup of water and continue to simmer until tomatoes are totally softened and melted down, another 5 to 8 minutes; larger bits of the skin are O.K., but they should feel mostly broken down into a nice, thick sauce.
Add chips and toss to coat evenly. Simmer a minute or two and remove the pan from the heat while you fry the eggs.
Heat remaining 2 tablespoons oil in another large skillet over medium-high heat. Add eggs and season with salt and pepper. Cook, undisturbed, until the whites of the egg are fried and lightly crisped but the yolks are still bright orange and runny, about 2 minutes.
Divide chips among plates and top with fried egg, queso fresco, cilantro, crema, remaining green chile, reserved red onions and a squeeze of lime if you like.