Television White Space (TVWS) emerges as an encouraging solution to address the challenge of a restricted wireless communication spectrum. It denotes the frequency range spanning from 54-790 MHz and researchers have increasingly explored its propagation characteristics in recent years. Nonetheless, a notable hindrance to its effective utilization lies in the interference between primary and secondary users, as well as interference among secondary users themselves. Approaches involving spectrum sensing and resource allocation have been extensively employed independently to tackle these issues, yet they have not been integrated or utilized in combination. Hence, in this study, we formulated an architectural model that combines spectrum sensing and allocation components. This integrated model aims to detect the presence of primary users while simultaneously minimizing interference among secondary users. The spectrum sensing component utilized an energy detection model to identify primary users, mitigating interference with secondary users. Meanwhile, the spectrum allocation component employed the Particle Swarm Optimization (PSO) algorithm to determine the optimal distribution of channels among secondary users. We implemented the architectural model in a simulated TVWS network using MATLAB R2020a. Its performance was then evaluated and compared with that of matched filter and Artificial Bee Colony (ABC) algorithms, which were utilized for spectrum sensing and allocation, respectively. Based on the simulation findings, when the Signal-to-Noise Ratio (SNR) was configured at -10 dB, the detection probability for the energy detection model reached 98.23%, surpassing the matched filter's detection probability of 92.55%. With a false alarm probability of 0.51, the energy detection model exhibited a misdetection probability of 0.13%, outperforming the matched filter which had a higher misdetection probability of 2.61%. In scenarios with 10 channels and 100 secondary users, the particle swarm optimization algorithm attained a maximum throughput of 279.9 Mbps, slightly outperforming the artificial bee colony algorithm, which achieved 278.7 Mbps. In scenarios with 30 channels and 200 secondary users, the particle swarm optimization algorithm achieved throughputs of 1.575 Gbps, whereas the artificial bee colony algorithm achieved a comparable throughput of 1.571 Gbps. In the scenario where the number of channels was set to 50 and users to 300, the particle swarm optimization algorithm achieved a throughput of 3.879 Gbps, slightly surpassing the artificial bee colony algorithm, which achieved 3.864 Gbps. While the designed components consistently outperformed the matched filter and artificial bee colony algorithms across all cases, it's important to note that the model faced limitations. Specifically, it was unable to detect more than one primary user or allocate spectrum for a new incoming secondary user.