Add cross-origin resource sharing support to the backend API to fix
frontend console errors when accessing resources from different origins.
The middleware handles preflight requests and includes necessary CORS
headers for API endpoints.
Fixes: Cross-Origin Request Blocked error
Downgrade eslint to v8.57.0 and TypeScript to v4.9.5 to match
react-scripts@5.0.1 requirements. Force install ajv@8.17.1 and
ajv-keywords@5.1.0 to resolve peer dependency conflicts. Add missing
dependencies (remark-gfm, rehype-highlight, @testing-library/dom).
Update test imports to work with @testing-library/react@16.