Rename Project concept to Novel across the stack

Renames the domain concept from Project to Novel throughout the backend
(entities, DTOs, services, endpoints, ProjectAccessService/Permission,
ProjectId foreign keys), MCP server (tool names and routes), and the
React/Vite frontend (types, hooks, routes, components). Adds a new EF
Core migration (RenameProjectToNovel) using RenameTable/RenameColumn to
preserve existing data instead of dropping/recreating tables. Updates
CLAUDE.md's structure section to reference Novels/ instead of Projects/.
This commit is contained in:
James Wampler
2026-08-17 23:03:09 -07:00
parent 0ab4f568b5
commit 4313c8f206
95 changed files with 3192 additions and 1660 deletions
+6 -6
View File
@@ -3,14 +3,14 @@ using Microsoft.EntityFrameworkCore;
using Novelly.Api.Common;
using Novelly.Api.Common.Validation;
using Novelly.Api.Data;
using Novelly.Api.Projects;
using Novelly.Api.Novels;
using Novelly.Api.Users;
namespace Novelly.Api.Imports;
public class ImportService(
INovelDbContext db,
ProjectService projects,
NovelService novels,
Channel<Guid> queue,
INovelUserContext userContext,
ILogger<ImportService> logger,
@@ -37,7 +37,7 @@ public class ImportService(
var readiness = ImportPaths.IsComplete(ledger, total) ? ImportReadiness.Complete : ImportReadiness.Resumable;
return Task.FromResult(new ImportInspectionResponse(
readiness, ledger.ProjectId, chaptersDone, total, ledger.CompletedPasses ?? []));
readiness, ledger.NovelId, chaptersDone, total, ledger.CompletedPasses ?? []));
}
public async Task<ImportJob> StartOrResumeAsync(StartImportRequest request, CancellationToken ct = default)
@@ -53,11 +53,11 @@ public class ImportService(
if (request.ForceRestart)
{
var ledger = ImportPaths.ReadLedger(root);
if (ledger?.ProjectId is { } existingProjectId)
if (ledger?.NovelId is { } existingNovelId)
{
logger.LogWarning(
"Force-restarting import for {SourceRoot}: deleting project {ProjectId}", root, existingProjectId);
await projects.DeleteAsync(existingProjectId, ct);
"Force-restarting import for {SourceRoot}: deleting novel {NovelId}", root, existingNovelId);
await novels.DeleteAsync(existingNovelId, ct);
}
ImportPaths.DeleteLedger(root);