Add GitHub-style activity contribution graph
Record create/update/delete events across novel content (chapters, beats, characters, arc stages, tags, locations, questions) into an append-only ActivityEvent log, aggregate by UTC day, and surface as a heatmap on the novels list and each novel's dashboard. Backfills history from existing CreatedAt timestamps on first boot after the migration.
This commit is contained in:
@@ -2,6 +2,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json.Serialization;
|
||||
using Microsoft.AspNetCore.Diagnostics;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Novelly.Api.Activity;
|
||||
using Novelly.Api.Agent;
|
||||
using Novelly.Api.Beats;
|
||||
using Novelly.Api.Chapters;
|
||||
@@ -66,6 +67,7 @@ using (var scope = app.Services.CreateScope())
|
||||
}
|
||||
|
||||
await ServiceUser.EnsureSeededAsync(db, builder.Configuration[ServiceApiKeyAuthenticationHandler.ConfigurationKey], app.Logger);
|
||||
await ActivityBackfill.RunAsync(db, app.Logger);
|
||||
}
|
||||
|
||||
app.UseSerilogRequestLogging();
|
||||
@@ -119,7 +121,8 @@ app.MapNovelEndpoints()
|
||||
.MapGenreEndpoints()
|
||||
.MapOpenQuestionEndpoints()
|
||||
.MapAgentEndpoints()
|
||||
.MapImportEndpoints();
|
||||
.MapImportEndpoints()
|
||||
.MapActivityEndpoints();
|
||||
|
||||
app.Run();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user