To make the dipping sauce: In a mortar, pound together the garlic and red chili with a pestle until pureed (or pass the garlic clove through a garlic press). Mix in the lime juice, fish sauce, sugar and water and add the carrot. Set aside.
Noodles: Drain the noodles in a colander, then pour boiling water over them. Let them sit in the hot water for about 5 minutes until tender. Drain, rinse thoroughly with cold running water and drain again. Set aside.
Salad: To make the salad, in a large bowl, toss together the lettuce, cucumber, bean sprouts, carrot, basil and mint.
Beef and onions: In a mortar and pestle, pound together the lemongrass, 3 garlic cloves and sugar until it is well combined. Add fish sauce and pepper to produce a paste. Add one tablespoon of the oil, mix well and add the meat; cover and set aside to marinate for at least 30 minutes.
Preheat a wok or deep-fry pan over medium-high heat. When the pan is hot, add the remaining 2 Tbs. oil and the remaining 3 garlic cloves and stir-fry until light golden brown, about 30 seconds. Add the onion and stir-fry until the layers separate, about 30 seconds more. Remove the onion and garlic from the pan.
Add additional oil if the pan is dry (it shouldn't be). When the oil is hot, add a batch of the beef mixture and spread it over the bottom of the pan. Cook until the beef is nicely seared on the bottom, about 1 minute. Turn the beef over and sear the other side, about 1 minute more. Transfer the beef and onion to a plate. Fry the remaining beef mixture in batches.
When all of the beef is seared, return the beef and onion to the wok and toss for a few seconds to reheat if required.
To assemble: Divide the salad and noodles evenly among 4 shallow bowls or plates. Spoon one quarter of the beef-onion mixture over each salad. Garnish with the peanuts and fried shallots. Pour the dipping sauce into individual bowls and encourage diners to toss the salad to their liking, and add their own nuoc cham to taste.