The increasing penetration of Renewable Energy Resources (RES) is an opportunity to empower citizens to actively participate in energy markets through energy communities. At the local level, the Peer-to-Peer (P2P) trade and exchange of renewable energy represents a valid solution to fulfil the energy demand of the members, increase self-consumption and obtain economic benefits. However, a proper evaluation of the benefits for the community would require new considerations in designing typologies, composition, sharing and pricing mechanisms. Based on these premises, this paper explores the possible influences of different community-based P2P trading systems by examining several categories, ranging from aggregation structures, market mechanisms, sharing policies and pricing mechanisms internal to the local market. Furthermore, a flexible Mixed Integer Linear Programming model was formulated to optimise the day-ahead scheduling of community members participating in the P2P energy market. In this way, different community types, sharing policies, and pricing mechanisms were tested. Finally, the optimisation results were evaluated based on several key parameters.