There are different methods for constructing a PN junction. There may be varying levels of doping and there may be usage of metals as well.
Here are some figures which show a PN Junction used to do some experiment.

Usually the junction is made of P and N type materials and the outer layer of P or N type is coated with silicon dioxide just to prevent any surface abnormalities due to oxidation of the surface.
The second diagram below shows the coating of \$SiO_2\$.

This figure shows also the depletion region in the third picture and approximate scale of depletion width of a semiconductor junction. Metals are used a contact surfaces of P and N materials with voltage sources.
Reference:
Individuality of Dopants in Silicon Nano-pn Junctions
Daniel MORARU 1 ∗ , Sri PURWIYANTI 1, 2 , Roland NOWAK 1, 3 , Takeshi MIZUNO 1 ,
Arief UDHIARTO 2 , Djoko HARTANTO 2 , Ryszard JABLONSKI 3 , Michiharu TABE 1
1 Research Institute of Electronics, Shizuoka University, Japan
2 Department of Electrical Engineering, University of Indonesia, Indonesia
3 Division of Sensors and Measuring Systems, Warsaw University of Technology, Poland
Link:
http://dx.doi.org/10.5755/j01.ms.20.2.6312