This paper presents an Optimization System designed to streamline factory layout planning while considering safety standards such as OSHA, and ISO, as well as sustainability standards. The system takes inputs such as available space, industry type, machine specifications (including production rates), and expected demand to generate an optimized layout. The goal is to minimize unused space, environmental impacts, and waste while maximizing safety. It also integrates lighting design of the factory to ensure compliance with safety regulations. The system relies on mathematical modeling and Operations Research techniques - specifically linear programming-, reducing the need for external consultants and adding significant value for businesses establishing new factories while the integration of AI and simulation techniques is envisioned for future enhancements. Based on the scenario provided in this paper, this system increases space utilization by up to 80%, depending on the input space, machine type, and machine sizes. Based on a comprehensive review of previous research in facilities planning, which identified a knowledge gap in integrating safety and environmental considerations into the design process, we expect this system to develop a comprehensive and integrated framework for facilities planning.