| | | 1 | | @page "/getting-started" |
| | | 2 | | @attribute [Authorize] |
| | | 3 | | @inject IUserApiService UserApi |
| | | 4 | | @inject IWorldApiService WorldApi |
| | | 5 | | @inject NavigationManager Navigation |
| | | 6 | | @inject ISnackbar Snackbar |
| | | 7 | | |
| | | 8 | | @code { |
| | | 9 | | private readonly ILogger<GettingStarted> _logger; |
| | | 10 | | |
| | | 11 | | // Direct constructor injection |
| | 0 | 12 | | public GettingStarted(ILogger<GettingStarted> logger) |
| | | 13 | | { |
| | 0 | 14 | | _logger = logger; |
| | 0 | 15 | | } |
| | | 16 | | } |
| | | 17 | | |
| | | 18 | | <PageTitle>Quick Start Guide - Chronicis</PageTitle> |
| | | 19 | | |
| | | 20 | | <div class="getting-started-page"> |
| | | 21 | | <div class="getting-started-content"> |
| | 0 | 22 | | @if (_currentStep == 0) |
| | | 23 | | { |
| | | 24 | | <!-- Step 1: Welcome --> |
| | | 25 | | <div class="step-container chronicis-fade-in"> |
| | | 26 | | <div class="welcome-icon">📖✨</div> |
| | 0 | 27 | | <h1>@(_isReturningUser ? "Quick Start Guide" : "Welcome to Chronicis")</h1> |
| | | 28 | | <p class="welcome-subtitle"> |
| | | 29 | | Your personal chronicle for tabletop adventures |
| | | 30 | | </p> |
| | | 31 | | |
| | | 32 | | <div class="welcome-features"> |
| | | 33 | | <div class="feature-item"> |
| | | 34 | | <span class="feature-icon">🌍</span> |
| | | 35 | | <div> |
| | | 36 | | <strong>Build Your World</strong> |
| | | 37 | | <p>Create rich settings with locations, NPCs, and lore</p> |
| | | 38 | | </div> |
| | | 39 | | </div> |
| | | 40 | | <div class="feature-item"> |
| | | 41 | | <span class="feature-icon">📝</span> |
| | | 42 | | <div> |
| | | 43 | | <strong>Track Your Sessions</strong> |
| | | 44 | | <p>Document adventures and never forget what happened</p> |
| | | 45 | | </div> |
| | | 46 | | </div> |
| | | 47 | | <div class="feature-item"> |
| | | 48 | | <span class="feature-icon">🔗</span> |
| | | 49 | | <div> |
| | | 50 | | <strong>Connect Everything</strong> |
| | | 51 | | <p>Link articles together with wiki-style [[brackets]]</p> |
| | | 52 | | </div> |
| | | 53 | | </div> |
| | | 54 | | <div class="feature-item"> |
| | | 55 | | <span class="feature-icon">🤖</span> |
| | | 56 | | <div> |
| | | 57 | | <strong>AI-Powered Summaries</strong> |
| | | 58 | | <p>Let AI help you remember the important details</p> |
| | | 59 | | </div> |
| | | 60 | | </div> |
| | | 61 | | </div> |
| | | 62 | | |
| | | 63 | | <MudButton Variant="Variant.Filled" |
| | | 64 | | Color="Color.Primary" |
| | | 65 | | Size="Size.Large" |
| | | 66 | | OnClick="NextStep" |
| | | 67 | | Class="mt-6" |
| | | 68 | | EndIcon="@Icons.Material.Filled.ArrowForward"> |
| | 0 | 69 | | @(_isReturningUser ? "Review the Basics" : "Let's Get Started") |
| | | 70 | | </MudButton> |
| | | 71 | | </div> |
| | | 72 | | } |
| | 0 | 73 | | else if (_currentStep == 1) |
| | | 74 | | { |
| | | 75 | | <!-- Step 2: Understanding the Structure --> |
| | | 76 | | <div class="step-container chronicis-fade-in"> |
| | | 77 | | <div class="step-icon">🏗️</div> |
| | | 78 | | <h1>How Chronicis is Organized</h1> |
| | | 79 | | <p class="step-subtitle"> |
| | | 80 | | Your content is organized in a hierarchy that mirrors how tabletop campaigns work. |
| | | 81 | | </p> |
| | | 82 | | |
| | | 83 | | <div class="structure-explanation"> |
| | | 84 | | <div class="structure-item"> |
| | | 85 | | <div class="structure-header"> |
| | | 86 | | <span class="structure-icon">🌍</span> |
| | | 87 | | <strong>World</strong> |
| | | 88 | | </div> |
| | | 89 | | <p> |
| | | 90 | | Your campaign setting — the universe where your adventures take place. |
| | | 91 | | This could be an official setting like <em>Forgotten Realms</em> or <em>Eberron</em>, |
| | | 92 | | or your own homebrew creation. Everything else lives inside a World. |
| | | 93 | | </p> |
| | | 94 | | </div> |
| | | 95 | | |
| | | 96 | | <div class="structure-item"> |
| | | 97 | | <div class="structure-header"> |
| | | 98 | | <span class="structure-icon">📜</span> |
| | | 99 | | <strong>Campaign</strong> |
| | | 100 | | </div> |
| | | 101 | | <p> |
| | | 102 | | A specific adventure or ongoing game with your group. You might run |
| | | 103 | | <em>Curse of Strahd</em> and <em>Tomb of Annihilation</em> in the same world — |
| | | 104 | | those would be two separate campaigns. Each campaign tracks its own story. |
| | | 105 | | </p> |
| | | 106 | | </div> |
| | | 107 | | |
| | | 108 | | <div class="structure-item"> |
| | | 109 | | <div class="structure-header"> |
| | | 110 | | <span class="structure-icon">📚</span> |
| | | 111 | | <strong>Arc</strong> |
| | | 112 | | </div> |
| | | 113 | | <p> |
| | | 114 | | Story chapters within a campaign. Maybe your party spent several sessions |
| | | 115 | | in Waterdeep, then traveled to Baldur's Gate — those could be separate arcs. |
| | | 116 | | Arcs help you organize sessions into meaningful chunks. |
| | | 117 | | </p> |
| | | 118 | | </div> |
| | | 119 | | |
| | | 120 | | <div class="structure-item"> |
| | | 121 | | <div class="structure-header"> |
| | | 122 | | <span class="structure-icon">🎲</span> |
| | | 123 | | <strong>Session</strong> |
| | | 124 | | </div> |
| | | 125 | | <p> |
| | | 126 | | A single game night. Each session belongs to an arc and captures what |
| | | 127 | | happened during that play session — encounters, discoveries, memorable moments. |
| | | 128 | | </p> |
| | | 129 | | </div> |
| | | 130 | | </div> |
| | | 131 | | |
| | | 132 | | <div class="button-row"> |
| | | 133 | | <MudButton Variant="Variant.Text" |
| | | 134 | | Color="Color.Default" |
| | | 135 | | OnClick="PreviousStep" |
| | | 136 | | StartIcon="@Icons.Material.Filled.ArrowBack"> |
| | | 137 | | Back |
| | | 138 | | </MudButton> |
| | | 139 | | <MudButton Variant="Variant.Filled" |
| | | 140 | | Color="Color.Primary" |
| | | 141 | | Size="Size.Large" |
| | | 142 | | OnClick="NextStep" |
| | | 143 | | EndIcon="@Icons.Material.Filled.ArrowForward"> |
| | | 144 | | Continue |
| | | 145 | | </MudButton> |
| | | 146 | | </div> |
| | | 147 | | </div> |
| | | 148 | | } |
| | 0 | 149 | | else if (_currentStep == 2) |
| | | 150 | | { |
| | | 151 | | <!-- Step 3: Sidebar Sections --> |
| | | 152 | | <div class="step-container chronicis-fade-in"> |
| | | 153 | | <div class="step-icon">📂</div> |
| | | 154 | | <h1>Your Sidebar Sections</h1> |
| | | 155 | | <p class="step-subtitle"> |
| | | 156 | | Each world has four main sections in the sidebar to organize your content. |
| | | 157 | | </p> |
| | | 158 | | |
| | | 159 | | <div class="sections-explanation"> |
| | | 160 | | <div class="section-item campaigns"> |
| | | 161 | | <div class="section-header"> |
| | | 162 | | <span class="section-badge">📁</span> |
| | | 163 | | <strong>CAMPAIGNS</strong> |
| | | 164 | | </div> |
| | | 165 | | <p> |
| | | 166 | | Where your game sessions live. Create campaigns, add arcs to organize |
| | | 167 | | the story, then log sessions as you play. This is your adventure timeline. |
| | | 168 | | </p> |
| | | 169 | | <div class="section-tip"> |
| | | 170 | | <strong>Tip:</strong> After each session, jot down key events, NPCs met, |
| | | 171 | | and decisions made. Future you will thank present you. |
| | | 172 | | </div> |
| | | 173 | | </div> |
| | | 174 | | |
| | | 175 | | <div class="section-item characters"> |
| | | 176 | | <div class="section-header"> |
| | | 177 | | <span class="section-badge">👥</span> |
| | | 178 | | <strong>PLAYER CHARACTERS</strong> |
| | | 179 | | </div> |
| | | 180 | | <p> |
| | | 181 | | Home for player characters in your group. Create a character articles on the World Detail pa |
| | | 182 | | then <strong>claim it as yours</strong> to see it on your dashboard. |
| | | 183 | | Track backstory, goals, relationships, and growth. |
| | | 184 | | </p> |
| | | 185 | | <div class="section-tip"> |
| | | 186 | | <strong>Tip:</strong> Link your character to NPCs and locations using |
| | | 187 | | [[wiki links]] to build a web of connections. |
| | | 188 | | </div> |
| | | 189 | | </div> |
| | | 190 | | |
| | | 191 | | <div class="section-item wiki"> |
| | | 192 | | <div class="section-header"> |
| | | 193 | | <span class="section-badge">📖</span> |
| | | 194 | | <strong>WIKI</strong> |
| | | 195 | | </div> |
| | | 196 | | <p> |
| | | 197 | | Your world-building encyclopedia. Document locations, NPCs, factions, |
| | | 198 | | items, lore, religions, history — anything that makes your world feel alive. |
| | | 199 | | Nest articles to create hierarchies (e.g., Continent → Region → City → District). |
| | | 200 | | </p> |
| | | 201 | | <div class="section-tip"> |
| | | 202 | | <strong>Tip:</strong> Use the AI Summary feature on articles with lots of |
| | | 203 | | backlinks to auto-generate useful overviews. |
| | | 204 | | </div> |
| | | 205 | | </div> |
| | | 206 | | |
| | | 207 | | <div class="section-item resources"> |
| | | 208 | | <div class="section-header"> |
| | | 209 | | <span class="section-badge">🔗</span> |
| | | 210 | | <strong>EXTERNAL RESOURCES</strong> |
| | | 211 | | </div> |
| | | 212 | | <p> |
| | | 213 | | Quick links to tools your group uses — D&D Beyond character sheets, |
| | | 214 | | Roll20 or Foundry VTT, shared Google Drives, Discord servers. |
| | | 215 | | Plus, upload documents like character sheets, maps, handouts, and reference |
| | | 216 | | materials (PDFs, Office files, images up to 200MB) to keep everything in one place. |
| | | 217 | | </p> |
| | | 218 | | <div class="section-tip"> |
| | | 219 | | <strong>Tip:</strong> Only the world owner can upload and manage documents, |
| | | 220 | | but all members can download them. |
| | | 221 | | </div> |
| | | 222 | | </div> |
| | | 223 | | </div> |
| | | 224 | | |
| | | 225 | | <div class="button-row"> |
| | | 226 | | <MudButton Variant="Variant.Text" |
| | | 227 | | Color="Color.Default" |
| | | 228 | | OnClick="PreviousStep" |
| | | 229 | | StartIcon="@Icons.Material.Filled.ArrowBack"> |
| | | 230 | | Back |
| | | 231 | | </MudButton> |
| | | 232 | | <MudButton Variant="Variant.Filled" |
| | | 233 | | Color="Color.Primary" |
| | | 234 | | Size="Size.Large" |
| | | 235 | | OnClick="NextStep" |
| | | 236 | | EndIcon="@Icons.Material.Filled.ArrowForward"> |
| | | 237 | | Continue |
| | | 238 | | </MudButton> |
| | | 239 | | </div> |
| | | 240 | | </div> |
| | | 241 | | } |
| | 0 | 242 | | else if (_currentStep == 3) |
| | | 243 | | { |
| | | 244 | | <!-- Step 4: Ready to Go --> |
| | | 245 | | <div class="step-container chronicis-fade-in"> |
| | | 246 | | <div class="step-icon">🎉</div> |
| | | 247 | | <h1>You're Ready!</h1> |
| | | 248 | | <p class="step-subtitle"> |
| | | 249 | | Here's how to get the most out of Chronicis: |
| | | 250 | | </p> |
| | | 251 | | |
| | | 252 | | <div class="tips-grid"> |
| | | 253 | | <div class="tip-card"> |
| | | 254 | | <div class="tip-icon">🔗</div> |
| | | 255 | | <strong>Link Everything</strong> |
| | | 256 | | <p>Type <code>[[Article Name]]</code> to create links between articles. |
| | | 257 | | This builds a connected knowledge base.</p> |
| | | 258 | | </div> |
| | | 259 | | |
| | | 260 | | <div class="tip-card"> |
| | | 261 | | <div class="tip-icon">👤</div> |
| | | 262 | | <strong>Claim Your Character</strong> |
| | | 263 | | <p>Open your character article and click "Claim as My Character" |
| | | 264 | | to see it on your dashboard.</p> |
| | | 265 | | </div> |
| | | 266 | | |
| | | 267 | | <div class="tip-card"> |
| | | 268 | | <div class="tip-icon">🤖</div> |
| | | 269 | | <strong>Generate Summaries</strong> |
| | | 270 | | <p>Articles with backlinks can generate AI summaries. |
| | | 271 | | Click the summary button in the article sidebar.</p> |
| | | 272 | | </div> |
| | | 273 | | |
| | | 274 | | <div class="tip-card"> |
| | | 275 | | <div class="tip-icon">⌨️</div> |
| | | 276 | | <strong>Keyboard Shortcuts</strong> |
| | | 277 | | <p><code>Ctrl+S</code> to save, <code>Ctrl+N</code> to create a new article. |
| | | 278 | | Your work also auto-saves as you type.</p> |
| | | 279 | | </div> |
| | | 280 | | |
| | | 281 | | <div class="tip-card"> |
| | | 282 | | <div class="tip-icon">📂</div> |
| | | 283 | | <strong>Drag to Organize</strong> |
| | | 284 | | <p>Drag articles in the sidebar to reorganize your hierarchy. |
| | | 285 | | Nest content however makes sense for your world.</p> |
| | | 286 | | </div> |
| | | 287 | | |
| | | 288 | | <div class="tip-card"> |
| | | 289 | | <div class="tip-icon">🌐</div> |
| | | 290 | | <strong>Share Your World</strong> |
| | | 291 | | <p>Make your world public in World Settings to share it with anyone |
| | | 292 | | via a custom URL—no login required for viewers.</p> |
| | | 293 | | </div> |
| | | 294 | | |
| | | 295 | | <div class="tip-card"> |
| | | 296 | | <div class="tip-icon">🔒</div> |
| | | 297 | | <strong>Keep Secrets Private</strong> |
| | | 298 | | <p>Toggle any article to private in the metadata panel. |
| | | 299 | | Only you can see private articles—perfect for DM notes or plot twists.</p> |
| | | 300 | | </div> |
| | | 301 | | |
| | | 302 | | <div class="tip-card"> |
| | | 303 | | <div class="tip-icon">❓</div> |
| | | 304 | | <strong>Need Help?</strong> |
| | | 305 | | <p>Click the help icon in the top bar anytime to return to this guide.</p> |
| | | 306 | | </div> |
| | | 307 | | </div> |
| | | 308 | | |
| | | 309 | | <div class="button-row"> |
| | | 310 | | <MudButton Variant="Variant.Text" |
| | | 311 | | Color="Color.Default" |
| | | 312 | | OnClick="PreviousStep" |
| | | 313 | | StartIcon="@Icons.Material.Filled.ArrowBack"> |
| | | 314 | | Back |
| | | 315 | | </MudButton> |
| | | 316 | | <MudButton Variant="Variant.Filled" |
| | | 317 | | Color="Color.Primary" |
| | | 318 | | Size="Size.Large" |
| | | 319 | | OnClick="CompleteOnboarding" |
| | | 320 | | Disabled="_isCompleting" |
| | | 321 | | EndIcon="@Icons.Material.Filled.Check"> |
| | 0 | 322 | | @if (_isCompleting) |
| | | 323 | | { |
| | | 324 | | <MudProgressCircular Size="Size.Small" Indeterminate="true" Class="mr-2" /> |
| | | 325 | | <span>Finishing up...</span> |
| | | 326 | | } |
| | 0 | 327 | | else if (_isReturningUser) |
| | | 328 | | { |
| | | 329 | | <span>Back to Dashboard</span> |
| | | 330 | | } |
| | | 331 | | else |
| | | 332 | | { |
| | | 333 | | <span>Start Your Chronicle</span> |
| | | 334 | | } |
| | | 335 | | </MudButton> |
| | | 336 | | </div> |
| | | 337 | | </div> |
| | | 338 | | } |
| | | 339 | | |
| | | 340 | | <!-- Progress Dots --> |
| | | 341 | | <div class="progress-dots"> |
| | 0 | 342 | | @for (int i = 0; i < 4; i++) |
| | | 343 | | { |
| | 0 | 344 | | var step = i; |
| | | 345 | | <div class="dot @(step == _currentStep ? "active" : "") @(step < _currentStep ? "completed" : "")" |
| | 0 | 346 | | @onclick="() => GoToStep(step)"></div> |
| | | 347 | | } |
| | | 348 | | </div> |
| | | 349 | | </div> |
| | | 350 | | </div> |
| | | 351 | | |
| | | 352 | | @code { |
| | | 353 | | private int _currentStep = 0; |
| | | 354 | | private bool _isCompleting = false; |
| | | 355 | | private bool _isReturningUser = false; |
| | | 356 | | |
| | | 357 | | protected override async Task OnInitializedAsync() |
| | | 358 | | { |
| | 0 | 359 | | var profile = await UserApi.GetUserProfileAsync(); |
| | 0 | 360 | | _isReturningUser = profile?.HasCompletedOnboarding == true; |
| | 0 | 361 | | } |
| | | 362 | | |
| | | 363 | | private void NextStep() |
| | | 364 | | { |
| | 0 | 365 | | if (_currentStep < 3) |
| | | 366 | | { |
| | 0 | 367 | | _currentStep++; |
| | 0 | 368 | | StateHasChanged(); |
| | | 369 | | } |
| | 0 | 370 | | } |
| | | 371 | | |
| | | 372 | | private void PreviousStep() |
| | | 373 | | { |
| | 0 | 374 | | if (_currentStep > 0) |
| | | 375 | | { |
| | 0 | 376 | | _currentStep--; |
| | 0 | 377 | | StateHasChanged(); |
| | | 378 | | } |
| | 0 | 379 | | } |
| | | 380 | | |
| | | 381 | | private void GoToStep(int step) |
| | | 382 | | { |
| | 0 | 383 | | if (step >= 0 && step <= 3) |
| | | 384 | | { |
| | 0 | 385 | | _currentStep = step; |
| | 0 | 386 | | StateHasChanged(); |
| | | 387 | | } |
| | 0 | 388 | | } |
| | | 389 | | |
| | | 390 | | private async Task CompleteOnboarding() |
| | | 391 | | { |
| | 0 | 392 | | if (_isReturningUser) |
| | | 393 | | { |
| | 0 | 394 | | Navigation.NavigateTo("/dashboard"); |
| | 0 | 395 | | return; |
| | | 396 | | } |
| | | 397 | | |
| | 0 | 398 | | _isCompleting = true; |
| | 0 | 399 | | StateHasChanged(); |
| | | 400 | | |
| | | 401 | | try |
| | | 402 | | { |
| | 0 | 403 | | var success = await UserApi.CompleteOnboardingAsync(); |
| | 0 | 404 | | if (success) |
| | | 405 | | { |
| | 0 | 406 | | Navigation.NavigateTo("/dashboard", replace: true); |
| | | 407 | | } |
| | | 408 | | else |
| | | 409 | | { |
| | 0 | 410 | | Snackbar.Add("Failed to complete setup. Please try again.", Severity.Error); |
| | | 411 | | } |
| | 0 | 412 | | } |
| | 0 | 413 | | catch (Exception ex) |
| | | 414 | | { |
| | 0 | 415 | | _logger.LogErrorSanitized(ex, "Error completing onboarding"); |
| | 0 | 416 | | Snackbar.Add("An error occurred. Please try again.", Severity.Error); |
| | 0 | 417 | | } |
| | | 418 | | finally |
| | | 419 | | { |
| | 0 | 420 | | _isCompleting = false; |
| | 0 | 421 | | StateHasChanged(); |
| | | 422 | | } |
| | 0 | 423 | | } |
| | | 424 | | } |