diff --git a/PlotLine/Controllers/AcceptanceController.cs b/PlotLine/Controllers/AcceptanceController.cs index 10f3030..86db732 100644 --- a/PlotLine/Controllers/AcceptanceController.cs +++ b/PlotLine/Controllers/AcceptanceController.cs @@ -1,8 +1,10 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; namespace PlotLine.Controllers; +[Authorize] public sealed class AcceptanceController(IAcceptanceService acceptance) : Controller { public async Task Phase1(int? projectId) diff --git a/PlotLine/Controllers/AnalyticsController.cs b/PlotLine/Controllers/AnalyticsController.cs index 3c9c89e..cd0409c 100644 --- a/PlotLine/Controllers/AnalyticsController.cs +++ b/PlotLine/Controllers/AnalyticsController.cs @@ -1,8 +1,10 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; namespace PlotLine.Controllers; +[Authorize] public sealed class AnalyticsController(IAnalyticsService analytics) : Controller { public async Task Index( diff --git a/PlotLine/Controllers/ArchivesController.cs b/PlotLine/Controllers/ArchivesController.cs index af92aee..e1c5a12 100644 --- a/PlotLine/Controllers/ArchivesController.cs +++ b/PlotLine/Controllers/ArchivesController.cs @@ -1,8 +1,10 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; namespace PlotLine.Controllers; +[Authorize] public sealed class ArchivesController(IArchiveService archives) : Controller { public async Task Index(int? projectId, string? entityType) diff --git a/PlotLine/Controllers/BooksController.cs b/PlotLine/Controllers/BooksController.cs index e865963..1e94a71 100644 --- a/PlotLine/Controllers/BooksController.cs +++ b/PlotLine/Controllers/BooksController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class BooksController(IBookService books) : Controller { public async Task Details(int id) diff --git a/PlotLine/Controllers/ChaptersController.cs b/PlotLine/Controllers/ChaptersController.cs index 1646a26..3dcd231 100644 --- a/PlotLine/Controllers/ChaptersController.cs +++ b/PlotLine/Controllers/ChaptersController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class ChaptersController(IChapterService chapters) : Controller { public async Task Details(int id) diff --git a/PlotLine/Controllers/CharactersController.cs b/PlotLine/Controllers/CharactersController.cs index 43c0ac7..a8b0ab1 100644 --- a/PlotLine/Controllers/CharactersController.cs +++ b/PlotLine/Controllers/CharactersController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class CharactersController(ICharacterService characters) : Controller { public async Task Index(int projectId) diff --git a/PlotLine/Controllers/DynamicsController.cs b/PlotLine/Controllers/DynamicsController.cs index 599ca33..fea7aa5 100644 --- a/PlotLine/Controllers/DynamicsController.cs +++ b/PlotLine/Controllers/DynamicsController.cs @@ -1,8 +1,10 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; namespace PlotLine.Controllers; +[Authorize] public sealed class DynamicsController(IDynamicsService dynamics) : Controller { public async Task Story(int projectId) diff --git a/PlotLine/Controllers/ExportsController.cs b/PlotLine/Controllers/ExportsController.cs index f312824..6b11866 100644 --- a/PlotLine/Controllers/ExportsController.cs +++ b/PlotLine/Controllers/ExportsController.cs @@ -1,8 +1,10 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; namespace PlotLine.Controllers; +[Authorize] public sealed class ExportsController(IExportService exports, IProjectExportService projectExports, ILogger logger) : Controller { public async Task StoryBible(int projectId, string format = "html") => diff --git a/PlotLine/Controllers/HelpController.cs b/PlotLine/Controllers/HelpController.cs index 6cacd0f..bf8282c 100644 --- a/PlotLine/Controllers/HelpController.cs +++ b/PlotLine/Controllers/HelpController.cs @@ -1,10 +1,12 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; [Route("Help")] +[Authorize] public sealed class HelpController(IHelpService help, IHelpMarkdownRenderer markdown) : Controller { [HttpGet("")] diff --git a/PlotLine/Controllers/HelpDiagnosticsController.cs b/PlotLine/Controllers/HelpDiagnosticsController.cs index 1ed3adc..85eb890 100644 --- a/PlotLine/Controllers/HelpDiagnosticsController.cs +++ b/PlotLine/Controllers/HelpDiagnosticsController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class HelpDiagnosticsController(IHelpService help) : Controller { public IActionResult Index() diff --git a/PlotLine/Controllers/HelpDrawerController.cs b/PlotLine/Controllers/HelpDrawerController.cs index 2497c58..99d6efb 100644 --- a/PlotLine/Controllers/HelpDrawerController.cs +++ b/PlotLine/Controllers/HelpDrawerController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class HelpDrawerController( IHelpService help, IHelpMarkdownRenderer markdown, diff --git a/PlotLine/Controllers/HomeController.cs b/PlotLine/Controllers/HomeController.cs index bf4cc63..006432a 100644 --- a/PlotLine/Controllers/HomeController.cs +++ b/PlotLine/Controllers/HomeController.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Models; @@ -6,6 +7,7 @@ using System.Diagnostics; namespace PlotLine.Controllers { + [AllowAnonymous] public class HomeController : Controller { public IActionResult Index() diff --git a/PlotLine/Controllers/ImportsController.cs b/PlotLine/Controllers/ImportsController.cs index 618644c..5c718cb 100644 --- a/PlotLine/Controllers/ImportsController.cs +++ b/PlotLine/Controllers/ImportsController.cs @@ -1,10 +1,12 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; using System.Text; namespace PlotLine.Controllers; +[Authorize] public sealed class ImportsController(IImportService imports) : Controller { public IActionResult Index() => View(new ImportIndexViewModel diff --git a/PlotLine/Controllers/LocationsController.cs b/PlotLine/Controllers/LocationsController.cs index 76a40b1..c311b64 100644 --- a/PlotLine/Controllers/LocationsController.cs +++ b/PlotLine/Controllers/LocationsController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class LocationsController(ILocationService locations) : Controller { public async Task Index(int projectId) diff --git a/PlotLine/Controllers/PlotLinesController.cs b/PlotLine/Controllers/PlotLinesController.cs index e8d6fcd..fb2da8c 100644 --- a/PlotLine/Controllers/PlotLinesController.cs +++ b/PlotLine/Controllers/PlotLinesController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class PlotLinesController(IPlotService plots) : Controller { public async Task Index(int projectId) diff --git a/PlotLine/Controllers/PlotThreadsController.cs b/PlotLine/Controllers/PlotThreadsController.cs index 3189e34..bee8f44 100644 --- a/PlotLine/Controllers/PlotThreadsController.cs +++ b/PlotLine/Controllers/PlotThreadsController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class PlotThreadsController(IPlotService plots) : Controller { public async Task Index(int projectId) diff --git a/PlotLine/Controllers/ProjectMetricsController.cs b/PlotLine/Controllers/ProjectMetricsController.cs index f62f66e..c4f6cdf 100644 --- a/PlotLine/Controllers/ProjectMetricsController.cs +++ b/PlotLine/Controllers/ProjectMetricsController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class ProjectMetricsController(ISceneMetricTypeService metrics) : Controller { public async Task Index(int projectId) diff --git a/PlotLine/Controllers/ProjectRestorePointsController.cs b/PlotLine/Controllers/ProjectRestorePointsController.cs index fbff42d..3c0c343 100644 --- a/PlotLine/Controllers/ProjectRestorePointsController.cs +++ b/PlotLine/Controllers/ProjectRestorePointsController.cs @@ -1,8 +1,10 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; namespace PlotLine.Controllers; +[Authorize] public sealed class ProjectRestorePointsController( IProjectRestorePointService restorePoints, IProjectRestoreService projectRestore, diff --git a/PlotLine/Controllers/ProjectsController.cs b/PlotLine/Controllers/ProjectsController.cs index 3e73770..02fad02 100644 --- a/PlotLine/Controllers/ProjectsController.cs +++ b/PlotLine/Controllers/ProjectsController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class ProjectsController(IProjectService projects) : Controller { public async Task Index() => View(await projects.ListAsync()); diff --git a/PlotLine/Controllers/RelationshipMapController.cs b/PlotLine/Controllers/RelationshipMapController.cs index 4ddcd10..3fd15d2 100644 --- a/PlotLine/Controllers/RelationshipMapController.cs +++ b/PlotLine/Controllers/RelationshipMapController.cs @@ -1,8 +1,10 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; namespace PlotLine.Controllers; +[Authorize] public sealed class RelationshipMapController(IRelationshipMapService relationshipMap) : Controller { public async Task Index(int projectId, int? bookId, int? chapterId, int? sceneId, int? focusCharacterId, bool showFullNetwork = false) diff --git a/PlotLine/Controllers/ScenariosController.cs b/PlotLine/Controllers/ScenariosController.cs index d693d2b..7ac1727 100644 --- a/PlotLine/Controllers/ScenariosController.cs +++ b/PlotLine/Controllers/ScenariosController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class ScenariosController(IScenarioService scenarios) : Controller { public async Task Index(int projectId) diff --git a/PlotLine/Controllers/ScenesController.cs b/PlotLine/Controllers/ScenesController.cs index f6ac475..b88aa33 100644 --- a/PlotLine/Controllers/ScenesController.cs +++ b/PlotLine/Controllers/ScenesController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class ScenesController( ISceneService scenes, IPlotService plots, diff --git a/PlotLine/Controllers/StoryAssetsController.cs b/PlotLine/Controllers/StoryAssetsController.cs index b4eea13..7cbfcda 100644 --- a/PlotLine/Controllers/StoryAssetsController.cs +++ b/PlotLine/Controllers/StoryAssetsController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class StoryAssetsController(IAssetService assets) : Controller { public async Task Index(int projectId) diff --git a/PlotLine/Controllers/StoryBibleController.cs b/PlotLine/Controllers/StoryBibleController.cs index be0476f..4f9d820 100644 --- a/PlotLine/Controllers/StoryBibleController.cs +++ b/PlotLine/Controllers/StoryBibleController.cs @@ -1,8 +1,10 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; namespace PlotLine.Controllers; +[Authorize] public sealed class StoryBibleController(IStoryBibleService storyBible) : Controller { public async Task Index(int projectId, string? q) diff --git a/PlotLine/Controllers/TimelineController.cs b/PlotLine/Controllers/TimelineController.cs index 5b7ed20..e7f1ac6 100644 --- a/PlotLine/Controllers/TimelineController.cs +++ b/PlotLine/Controllers/TimelineController.cs @@ -1,10 +1,12 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Models; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class TimelineController(ITimelineService timeline) : Controller { public async Task Index([FromQuery] TimelineFilterViewModel filter) diff --git a/PlotLine/Controllers/WarningsController.cs b/PlotLine/Controllers/WarningsController.cs index da16bf8..2ffcd35 100644 --- a/PlotLine/Controllers/WarningsController.cs +++ b/PlotLine/Controllers/WarningsController.cs @@ -1,8 +1,10 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; namespace PlotLine.Controllers; +[Authorize] public sealed class WarningsController(IContinuityValidationService validation) : Controller { public async Task Index( diff --git a/PlotLine/Controllers/WriterController.cs b/PlotLine/Controllers/WriterController.cs index 037ad7c..4e06eaf 100644 --- a/PlotLine/Controllers/WriterController.cs +++ b/PlotLine/Controllers/WriterController.cs @@ -1,9 +1,11 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; using PlotLine.Services; using PlotLine.ViewModels; namespace PlotLine.Controllers; +[Authorize] public sealed class WriterController(IWriterWorkspaceService writerWorkspace) : Controller { public async Task Index(int? projectId) diff --git a/PlotLine/Program.cs b/PlotLine/Program.cs index c97584a..2280da9 100644 --- a/PlotLine/Program.cs +++ b/PlotLine/Program.cs @@ -152,7 +152,7 @@ public class Program app.MapStaticAssets(); app.MapControllerRoute( name: "default", - pattern: "{controller=Projects}/{action=Index}/{id?}") + pattern: "{controller=Home}/{action=Index}/{id?}") .WithStaticAssets(); app.Run(); diff --git a/PlotLine/Views/Home/Index.cshtml b/PlotLine/Views/Home/Index.cshtml index bcfd79a..44fcc13 100644 --- a/PlotLine/Views/Home/Index.cshtml +++ b/PlotLine/Views/Home/Index.cshtml @@ -1,8 +1,43 @@ -@{ - ViewData["Title"] = "Home Page"; +@{ + ViewData["Title"] = "PlotWeaver Studio"; } -
-

Welcome

-

Learn about building Web apps with ASP.NET Core.

-
+
+
+

Story planning workspace

+

PlotWeaver Studio

+

+ A story planning workspace for writers who need to track plots, scenes, characters, clues, threads, and continuity without losing their minds. +

+
+
+ @if (User.Identity?.IsAuthenticated == true) + { + Go to Projects + } + else + { + Sign in + Create account + } +
+
+ +
+
+

Plan books, chapters, and scenes

+

Shape a novel, a series, or a messy first draft into a structure you can actually see and revise.

+
+
+

Track characters and relationships

+

Follow appearances, arcs, knowledge, relationships, locations, and the changing emotional pressure of the story.

+
+
+

Follow plot lines and clues

+

Keep promises, reveals, unresolved threads, objects, and story assets visible from setup to payoff.

+
+
+

Review story health

+

Use timelines, metrics, warnings, and continuity checks to find problems before they spread through the manuscript.

+
+
diff --git a/PlotLine/Views/Shared/_Layout.cshtml b/PlotLine/Views/Shared/_Layout.cshtml index 241ea82..a21980e 100644 --- a/PlotLine/Views/Shared/_Layout.cshtml +++ b/PlotLine/Views/Shared/_Layout.cshtml @@ -27,7 +27,7 @@