The movie, The Dragon Code, was adapted from Husseini's novel of the same name. The novel was a fantasy adventure novel about the adventures of the protagonist, Li Yang, on the mysterious road to find the dragon. The movie, The Dragon Search Code, was adapted from the novel, retaining the fantasy elements and thrilling plot in the novel and presented it in a unique way.
Code Geass did start as a manga. However, its anime version became even more widely known and beloved. The manga provided the foundation for the rich story and characters that were further developed in the anime.
Code Geass started as an anime. The manga was based on the anime's success and came after to expand the story for fans. Some elements might differ between the two, but the anime was the original form.