Skip to content

Feat/config logging - #84

Merged
chamodSN merged 2 commits into
mainfrom
feat/config-logging
Nov 23, 2026
Merged

chamodSN merged 2 commits into
mainfrom
feat/config-logging

Conversation

@chamodSN

Copy link
Copy Markdown
Owner

This pull request refactors core configuration, error handling, and logging for the application, migrating them to a new structure under backend/app/core/, simplifying settings, and improving maintainability. It also updates imports throughout the codebase to use the new configuration and error modules, and introduces a new .env template for environment variables.

Core Infrastructure Refactor and Improvements:

  • Added a new .env template file for environment variables, guiding users to provide necessary configuration for the application and external APIs.
  • Replaced the old core/config.py with a new, simplified settings module at backend/app/core/config.py, using Pydantic's BaseSettings for environment-based configuration, and providing a cached get_settings() accessor. [1] [2]
  • Introduced a new error handling module at backend/app/core/errors.py with base and specialized exception classes, replacing the old core/exceptions.py. [1] [2]
  • Added a new logging configuration at backend/app/core/logging.py using structlog for structured logging, and removed the old core/logging.py. [1] [2]

Codebase-wide Import Updates:

  • Updated all relevant imports in agents, API routes, and services to use the new configuration and error modules under backend/app/core/. [1] [2] [3] [4] [5] [6] [7] [8]

Service File Organization:

  • Moved services/courtlistener.py to backend/app/services/courtlistener.py and updated relevant imports.

These changes modernize and standardize the application's configuration, logging, and error handling, making it easier to maintain and extend.

Move shared configuration, logging, error, and CourtListener service modules under backend/app, update imports across the application, and add core dependencies for the refactored backend.
Add `.env` to `.gitignore` so environment-specific configuration and secrets are not committed.
@chamodSN chamodSN self-assigned this Nov 23, 2026
@chamodSN chamodSN added the feat label Nov 23, 2026
@chamodSN chamodSN linked an issue Nov 23, 2026 that may be closed by this pull request
@chamodSN
chamodSN merged commit c56c8cf into main Nov 23, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typed settings and structured logging

1 participant