How pulipati0443-web/audit-log-service works
Audit Log Service is a FastAPI prototype for recording, querying, verifying, archiving, and exporting tamper-evident audit events. The principal workflow accepts an event, assigns its timestamp, hashes it into an append-only chain, and persists it; users can later query or verify that chain, archive records logically, or export filtered and optionally redacted bundles. The graph follows the sampled API, service, integrity, and SQLite code. Other README capabilities, including concurrent-write validation, are reflected where evidenced by the persistence implementation.
Main entry points: database.py SQLite audit store · routes.py Audit routes · main.py FastAPI application · audit_service.py Chain verification entry
Components 11
HTTP API
- FastAPI application
app/main.py - Audit routes
app/api/routes.py
Audit Services
- Event creation
app/services/audit_service.py - Filtered query
app/services/audit_service.py - Chain verification entry
app/services/audit_service.py - Filtered export
app/services/export.py - Payload redaction
app/services/redaction.py
Integrity
- Chain verification
app/integrity/verification.py - Canonical hashing
app/integrity/hashing.py
Persistence
- SQLite audit store
app/persistence/database.py
Other components
- API client
Connections 16
- API client → FastAPI application: sends requests
- FastAPI application → Audit routes: mounts router
- FastAPI application → SQLite audit store: initializes schema
- Audit routes → Event creation: creates event
- Event creation → SQLite audit store: persists event
- SQLite audit store → Canonical hashing: hashes records
- Audit routes → Filtered query: queries events
- Filtered query → SQLite audit store: reads records
- Audit routes → Chain verification entry: requests verification
- Chain verification entry → SQLite audit store: loads records
- Chain verification entry → Chain verification: checks chain
- Chain verification → Canonical hashing: recomputes hashes
- Audit routes → SQLite audit store: archives event
- Audit routes → Filtered export: requests export
- Filtered export → SQLite audit store: reads records
- Filtered export → Payload redaction: redacts payload