Some of the ground work for the future Soviet nuclear program has been performed as early as in 1939-41.
It was in 1943 when it has actually begun under the leadership of physicist Igor Kurchatov. Obviously soviet intelligence
wouldn't miss all the nuclear activities in the US Los-Alamos, and the weak security there was a big help to USSR nuclear
developments. Immediately after WW II and US nuclear bombardments of Japan, Soviet Nuclear Program has been made the top
priority by J.l Stalin himself. A man appointed to head the entire project was no less than Lavrenti Beria himself. The head
of MGB(former NKVD, later transformed to KGB). Everyone involved in the project understood very well where they may end up
in case of failure, and very unlikely that Beria would survive himself, should the project fail.
Probably the most important help provided by Beria's spies to the program, were the detailed design schemes of the US
Fat Man bomb, which they in turn obtained from Klaus Fuchs, who played very important
role in US nuclear weapons development. David Greenglass also provided important information to the Soviet intelligence.
Because of all those details, pressure and fear(which was very real) of the failure RDS-1 was basically an exact copy of
the US design. The production system was very hazardous and inefficient, It took 2 years and enormous efforts to transform
it to something more suitable for the serial production and produce second bomb.