Skip to main content

Audit & Activity Logs

Role Required: SUPER_ADMIN / TNCHS_ADMIN
Navigation: Sidebar → Audit Logs
Last Updated: March 2026 | Portal Version: 1.0

Overview

The audit system provides a complete, immutable trail of every critical action taken on the platform. As Super Admin, you have cross-society querying capabilities that let you search, filter, and export audit data across all societies, users, and entity types.

How Auditing Works

Every entity decorated with the [Auditable] attribute is automatically tracked by the AuditSaveChangesInterceptor. When a tracked entity is created, updated, or deleted, the system records:

  • Who performed the action (user ID, name, role)
  • What changed (entity type, entity ID, old values, new values)
  • When it happened (UTC timestamp)
  • Where from (IP address, user agent, API endpoint)
  • Why (human-readable change summary)

Audited Entities

The following entities are automatically tracked:

EntitySeverityData Classification
UserWARNINGPII
SocietyINFOINTERNAL
LayoutINFOINTERNAL
PlotINFOINTERNAL
PlotBookingINFOINTERNAL
PaymentWARNINGCONFIDENTIAL
PaymentRefundWARNINGCONFIDENTIAL
InstallmentINFOINTERNAL
AgreementDocumentINFOCONFIDENTIAL
KycDocumentWARNINGPII
MembershipTransactionINFOINTERNAL
NotificationINFOINTERNAL
SocietyAmenityINFOINTERNAL
SocietyPaymentGatewayConfigWARNINGCONFIDENTIAL

Audit Log Fields

Each audit log entry contains:

FieldDescription
IDUnique log entry ID
Correlation IDLinks related entries (e.g., bulk operations)
Entity TypeType of entity (Layout, Plot, Booking, etc.)
Entity IDID of the affected entity
ActionCREATE, UPDATE, DELETE, STATUS_CHANGE, BULK_CREATE, PRICING_UPDATE
User IDWho performed the action
User NameUser's name at the time
User RoleUser's role at the time
Old ValuesPrevious state (JSON)
New ValuesNew state (JSON)
Change SummaryHuman-readable description
IP AddressClient IP
User AgentClient browser/app
Request PathAPI endpoint that triggered the change
Society IDTenant-scoped filter
SourceMANUAL (explicit), INTERCEPTOR (auto-captured), SYSTEM (background job)
SeverityINFO, WARNING, CRITICAL
Data ClassificationPUBLIC, INTERNAL, CONFIDENTIAL, PII
Is ArchivedWhether archived by retention policy
TimestampUTC timestamp

Querying Audit Logs

  1. Navigate to Audit Logs
  2. Use the filter panel:
FilterDescription
SearchFull-text search across entity types, IDs, change summaries
Entity TypeFilter by entity (Layout, Plot, Booking, Payment, etc.)
ActionCREATE / UPDATE / DELETE / STATUS_CHANGE
SocietyFilter by specific society
UserFilter by specific user
SeverityINFO / WARNING / CRITICAL
SourceMANUAL / INTERCEPTOR / SYSTEM
Date RangeStart and end date
  1. Results are paginated (up to 200 entries per page)

My Activity

View all actions you performed:

  1. Navigate to Audit Logs → My Activity
  2. Shows your complete action history sorted by most recent first

Summary Statistics

The audit summary provides aggregated counts:

  • By Action: How many CREATEs, UPDATEs, DELETEs, etc.
  • By Entity Type: Which entities are most frequently changed
  • By Severity: Distribution of INFO/WARNING/CRITICAL events
  • Top 10 Users: Most active users by audit entry count

Running a Summary

  1. Navigate to Audit Logs → Summary
  2. Apply optional filters (entity type, date range, severity)
  3. The dashboard shows aggregated statistics

Exporting Audit Logs

Export filtered audit logs as a CSV file (up to 10,000 rows):

  1. Set your desired filters
  2. Click Export CSV
  3. The file includes all fields: ID, Timestamp, EntityType, EntityId, Action, Severity, UserId, UserName, UserRole, SocietyId, IpAddress, Source, ChangeSummary
  4. Filename format: audit-logs-YYYY-MM-DD.csv

Retention Policy

The platform enforces a data lifecycle:

StageTimeframeWhat Happens
Active0–90 daysFully accessible, searchable
Archived90–365 daysMarked as archived, still queryable
Purged> 365 daysPermanently deleted
  • Retention job runs daily at 2:00 AM UTC
  • Retention statistics are viewable at Audit Logs → Retention Stats

Checking Retention Stats

Navigate to Audit Logs → Retention Stats to see:

  • Total audit entries
  • Active entries (< 90 days)
  • Archived entries (90–365 days)

Audit System Configuration

View the full system configuration at Audit Logs → Config:

  • Interceptor: Enabled/disabled, capture mode (automatic via [Auditable] attribute)
  • Retention Policy: Archive/purge schedule
  • Statistics: Total/active/archived counts, tracked entity types, tracked actions
  • Auditable Entities: Complete list of tracked entities with severity and data classification

Monitoring Critical Events

High-Priority Monitoring

Focus on these event types for security and compliance:

What to WatchFilter
Payment changesEntity Type = Payment, Severity = WARNING
Refund processingEntity Type = PaymentRefund
User account changesEntity Type = User, Severity = WARNING
KYC document changesEntity Type = KycDocument, Data Classification = PII
Payment gateway configEntity Type = SocietyPaymentGatewayConfig

Investigating an Incident

  1. Set the date range to the incident window
  2. Filter by the relevant entity type or society
  3. Look at the Correlation ID — bulk operations share the same ID
  4. Check Old Values vs New Values for exactly what changed
  5. Note the User, IP Address, and Request Path for tracing
  6. Export the filtered results for your investigation report

Common Scenarios

"Who modified this society's settings?"

  1. Filter: Entity Type = Society, Entity ID = the society ID
  2. The log shows every change with who, when, and what changed

"I need audit data for a regulatory review"

  1. Set date range to the review period
  2. Export all entries (or filter by relevant entity types)
  3. The CSV includes all compliance-relevant fields including Data Classification and Severity

"A payment looks suspicious"

  1. Filter: Entity Type = Payment, Entity ID = the payment ID
  2. Review the full change history
  3. Check the user who created/modified it
  4. Check their IP address and the API endpoint used
  5. Cross-reference with the OfflinePayment or Booking entity logs using Correlation ID

"I need to verify that the audit system is capturing everything"

  1. Go to Audit Logs → Config
  2. Review the list of auditable entities
  3. Verify the interceptor is enabled
  4. Check retention stats to ensure logs are being generated