This paper considers the optimal control and optimal estimation problems for a class of linear parabolic diffusion-reaction partial differential equations (PDEs) with actuators and sensors at the boundaries. Diffusion-reaction PDEs with boundary actuation and sensing arise in a multitude of relevant physical systems (e.g. magneto-hydrodynamic flows, chemical reactors, and electrochemical conversion devices). We formulate both the control and estimation problems using finite-time optimal control techniques, where the key results represent first order necessary conditions for optimality. Specifically, the time-varying state-feedback and observer gains are determined by solving Riccati-type PDEs. These results are analogous to the Riccati differential equations seen in linear quadratic regulator and optimal estimator results. In this sense, this paper extends LQR and optimal estimation results for finite-dimensional systems to infinite-dimensional systems with boundary actuation and sensing. These results are unique in two important ways. First, the derivations completely avoid discretization until the implementation stage. Second, they bypass formulating infinite-dimensional systems on an abstract Hilbert space and applying semigroup theory. Instead, Riccati equations are derived by applying weak-variations directly on the PDEs. Simulation examples and comparative analyses to backstepping are included for demonstration purposes.