Taihō Code
The Taihō Code or Code of Taihō (大宝律令, Taihō-ritsuryō) was an administrative reorganisation enacted in 703 in Japan, at the end of the Asuka period. It was historically one of the Ritsuryō-sei (律令制, ritsuryō-sei). It was compiled at the direction of Prince Osakabe, Fujiwara no Fuhito and Awata no Mahito. The work was begun at the request of Emperor Monmu and, like many other developments in the country at the time, it was largely an adaptation of the governmental system of China's Tang dynasty.The establishment of the Taihō Code was one of the first events to include Confucianism as a significant element in the Japanese code of ethics and government. The Code was revised during the Nara period to accommodate certain Japanese traditions and practical necessities of administration.
The Taihō Code or Code of Taihō (大宝律令, Taihō-ritsuryō) was an administrative reorganisation enacted in 703 in Japan, at the end of the Asuka period.  It was historically one of the Ritsuryō-sei (律令制, ritsuryō-sei). It was compiled at the direction of Prince Osakabe, Fujiwara no Fuhito and Awata no Mahito. The work was begun at the request of Emperor Monmu and, like many other developments in the country at the time, it was largely an adaptation of the governmental system of China's Tang dynasty.The establishment of the Taihō Code was one of the first events to include Confucianism as a significant element in the Japanese code of ethics and government. The Code was revised during the Nara period to accommodate certain Japanese traditions and practical necessities of administration. The revised edition was named the Yōrō Code (養老律令, Yōrō-ritsuryō). Major work on the Yōrō Code was completed in 718.The Taihō Code contained only two major departures from the Tang model. First, government positions and class status were based on birth, as had always been the Japanese tradition, not merit, as was the Chinese way. Second, the Japanese rejected the Chinese concept of the "Mandate of Heaven," asserting that the Emperor's power comes from his imperial descent, not from his righteousness or fairness as a ruler.
This code is said to be based on the Code of Yonghui (永徽律令) implemented in China in 651 by the Emperor Gaozong of Tang.

Governmental organization
The Taihō Code established two branches of government: the Department of Worship (神祇官, Jingi-kan) and the Department of State (太政官, Daijō-kan). The Jingi-kan was the higher branch, taking precedence over the Daijō-kan and handled all spiritual, religious, or ritualistic matters. The Daijō-kan handled all secular and administrative matters.
The Jingi-kan, or Department of Worship, was responsible for annual festivals and official court ceremonies such as coronations, as well as the upkeep of shrines, the discipline of shrine wardens, and the recording and observation of oracles and divinations. It is important to note that the department, though it governed all the Shintō shrines in the country, had no connection with Buddhism.
The Daijō-kan, or Department of State, handled all secular matters and was headed by the Great Council of State, which was presided over by the Daijō-daijin (太政大臣, Chancellor). The Ministers of the Left and Right (Sadaijin 左大臣 and Udaijin 右大臣 respectively), Controllers of the Left and Right (Sadaiben 左大弁 and Udaiben 右大弁), four Great Councillors (Dainagon 大納言) and three Minor Councillors (Shōnagon 少納言) made up the Council, and were responsible to the Daijō-daijin. The eight government Ministries were, in turn, responsible to the Controllers and Ministers of the Left and Right.

Provincial organization and administration
The country was divided into provinces called kuni (国), and the central government appointed administrative governors, kokushi (国司), divided into four levels (the Shitōkan), kami, suke, jo and sakan to each province. The provinces were further divided into districts called gun (郡) or kōri, which were administered by locally appointed officials called gunji (郡司). These local officials were primarily responsible for keeping the peace, collecting taxes, recruiting labor for the corvée, and for keeping registers of population and land allotment. Within the districts' further subdivisions, local organization varied greatly, but often resembled the arrangement of a township of fifty or so homes led by a headman.
The number of provinces was not fixed, however. As new land was developed, new provinces came into being. At the time of the Code's enactment, there were sixty-six provinces comprising 592 districts.

Chinese influence
The Chinese system known as ritsuryō in Japan was adopted by both the kingdoms of the Korean peninsula and Japan at the same time.
According to Shoku Nihongi, the participation member of Taihō Code was the 18 Japanese aristocrats and one Chinese scholar (薩弘恪 Satsu Koukaku) Chinese scholar Satsu played an important role. He participated in the edit of Nihon Shoki, and often received the reward from the Japanese emperor.

Chronology
Current understanding of the conditions which preceded the Taihō reforms remains replete with unanswerable questions, but there is much which can be inferred—for example:  

"The Reform of 645 was much more abrupt and radical than the similar change of 1868.  In the former, the nation at large was morely [sic] passive, for a few statesmen accomplished the sweeping transformation.  In 1868, although the Imperial throne was the inspiration of the movement, the actual work was participated [sic] by a considerable section of the nation.  Moreover, the Japanese of the nineteenth century were more prepared, politically, socially, and intellectually, for their new life, than were those of the seventh for theirs.  To say nothing of the training of the feudal regime which the former had received, they had been incomparably better trained mentally than their forefathers of 645, for there had been among them an intellectual revival, and some of them had sharpened their appetite for knowledge by studying Dutch books".Any examinations of the earliest known texts become exercises in historiography—for example: 

"Something must be said respecting the form in which the [Taihō] Code has come down to us.  It exists only in the edition of 833, which contains, besides the text of 701, the official commentaries compiled in 718 and 833.  The dates are not noted, and hence it will be an important question how much was the original law of 701.  The work is written in three different types which interlace one another in each article, the first being the largest, the second smaller, and the third in the form of double-lined gloss.  Of these, the first forms the main text, while the other two are comments on it.  Of the latter, again, the second type occupies a far smaller portion of the commentary than the third.  We establish that the third type was written after and the other two before 809, for an edict of that year cites passages from the latter two, but does not refer to the corresponding portion of the former which, if it had then existed, could not from its nature have escaped reference.  This evidence would seem tantamount to saying that the third type represents the commentary of 833, for no other comment was made between 809 and 833 which has been accepted in the work of the latter year."Although essential as a starting point, any list of serial events will reveal only part of the unfolding story - for example: 

645, 6th month: Emperor Kōtoku enthroned.
The three ministers appointed.
The naming of the first year-period, Taika.
645, 8th month:
The eastern governors are appointed and instructions given to them.
Appeals of the people from their group-heads to the government and Emperor granted.
Status of the free and the unfree defined.
The Buddhist church organized, protected and controlled.
645, 9th month:
The revolt and fall of Prince Furubito; an opposition party eliminated.
Arms of the country collected.
The powerful men forbidden to engross land.
646, 1st month:
The Decree of the Reform, abolishing miyake, tomo and the private estates, establishing salaries for the officers, defining the central region and the smaller administrative units, and regulating land-allotment and taxation.
Armories ordered to be built in the kuni and kiri.
646, 3rd month:
The mita and miyake confiscated.
Abuses of burial and marriage and some popular evil customs corrected.
646, 8th month: Intention of establishing a new order of rank and office announced.
647, 1st month: Intention of establishing a new order of rank and office announced.
647, 10th month: Thirteen cap-ranks established.
649, 2nd month: Nineteen cap-ranks established.
Eight departments and numerous offices established.
652, 4th month: The allotment of land completed, and the census made.  Villages organized in units of five houses.

See also
Ritsuryō
Yōrō Code
Ōmi Code
Asuka Kiyomihara Code
Historiographical Institute of the University of Tokyo
Kōkyū
Protected appointments system for hereditary privileges in asia

Notes
References
Asakawa, Kan'ichi. (1903). The Early Institutional Life of Japan. Tokyo: Shueisha. OCLC 4427686; see online, multi-formatted, full-text book at openlibrary.org
Ferris, William Wayne. (1998). Sacred Texts and Buried Treasures: Issues in the Historical Archaeology of Ancient Japan. Honolulu: University of Hawaii Press. ISBN 0-8248-2030-4 & ISBN 978-0-8248-2030-5
Nussbaum, Louis-Frédéric and Käthe Roth. (2005). Japan encyclopedia. Cambridge: Harvard University Press. ISBN 978-0-674-01753-5; OCLC 58053128
Ponsonby-Fane, Richard Arthur Brabazon. (1959). The Imperial House of Japan. Kyoto: Ponsonby Memorial Society. OCLC 194887
Sansom, George Bailey. (1958). A History of Japan to 1334. Stanford: Stanford University Press. ISBN 0-8047-0523-2