Moving to a user-centric approach is seen as a key change of paradigm in order to increase the efficiency and sustainability of energy systems. Massive integration of new economic agents such as prosumers and mobile or stationary storage will play a key role in the energy transition. In this paper, a design of a community-based local energy market (CB-LEM) is proposed where the members are allowed to trade energy among each other through a local pool. The price is set on a day-ahead basis under the coordination of a Community Manager (CM). The novel aspect of this work is that every agent takes part in the determination of the local market price while deciding its own scheduling problem under uncertainty concerning renewable-energy generation and storage. After day-ahead clearing, real time operation and ex-post settlement of the local market by the CM are also explained in order to complete the proposed design. A real case study in a neighbourhood in Amsterdam, The Netherlands, is used for testing the proposed framework. In addition, the performance of the ADMM-based clearing process is analyzed in terms of scalability and convergence.