Major codebase restructure and tooling

Reorganized the entire project into a modular architecture with new core services (session indexing, parser registry, security, caching), added test suite with unit tests, implemented code formatting with Prettier, and removed legacy backup files. New routes for models and sessions were added alongside enhanced security and storage layers.