Coherent X-ray diffraction imaging (CDI) method is a powerful X-ray imaging technique with high resolution up to nanometer scale. Most of the synchrotron radiation facilities and free electron laser facilities are equipped with this state-of-the-art imaging technique and have made many outstanding achievements in multiple scientific areas. Up to now, although scanning CDI (ptychography) method based on a soft X-ray source has been opened to users, the hard X-ray CDI experimental platform has not been built at Shanghai Synchrotron Radiation Facility (SSRF) which can research some relatively thick specimens and easily extend to three-dimensional imaging. As some new beamlines with undulator source were put into operation recently, it is possible and feasible to build up the CDI experimental platform with hard X-ray. In this article, we report the hard X-ray CDI experimental platform development process and preliminary experimental results of coherent diffraction pattern and image reconstruction at SSRF. Based on the operating BL19U2 biological small-angle X-ray scattering (SAXS) beamline at SSRF, the hard X-ray coherent beam is obtained through effective optical path designation at 12 keV and 13.5 keV. The hard X-ray optimization includes tuning several slits, double crystal monochromator (DCM), horizontal deflection mirror, focusing mirror system and pinhole, etc. Furthermore, hard X-ray CDI experiments are conducted. The spatial coherent length of the incident beam is also measured from the pinhole diffraction pattern. This platform can provide both conventional mode and scanning mode (ptychography) for the coherent diffraction imaging method, and the correct image reconstruction from the experimental diffraction patterns proves that the platform has the experimental capability for hard X-ray CDI. In the conventional forward scattering CDI mode, coherent diffraction patterns of pinhole are collected and used to analyse the coherence property of the optimized X-ray beam. The structure of pinhole is also reconstructed from the diffraction pattern. In the scanning CDI mode, a zone plate is used as a sample. The central area of zone plate is reconstructed correctly. About 90 nm/pixel resolution of reconstruction is achieved which is extremely dependent on the X-ray flux density from the undulator source emission. Hard X-ray CDI experimental platform based on the synchrotron radiation facility is first built in China. It will provide effective software and hardware supporting for the development and application of hard X-ray CDI experiments in China in the future.