• A film-type Ag3PO4/CdS photocatalyst in a porous substrate configuration is designed and prepared to avoid photocorrosion and ensure outstanding firmness.
• Both the S and Ag vacancy-rich surface and the heterojunction within the space charge region are found to be the key for high solar-to-hydrogen efficiency and excellent stability in seawater over 300 h.
• The first fully solar-driven hydrogen production prototype is constructed to work outdoors, exhibiting a high H2 evolution rate of 68.01 mmol h−1 m−2.
• The separation of oxidation and reduction reactions in space inhibits reverse recombination, enabling operation at atmospheric pressure and scalable practical solar H2 production.