Skip to content

docs: update the DocFX documentation #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 74 commits into
base: main
Choose a base branch
from
Open

docs: update the DocFX documentation #55

wants to merge 74 commits into from

Conversation

osm-Jatin
Copy link

@osm-Jatin osm-Jatin commented Jul 8, 2025

Task Link

REST-1647

Description

  • Update the DocFX documentation with the latest code.

Summary by CodeRabbit

  • New Features

    • Introduced login and token revocation endpoints with Redis-backed token management.
    • Added support for generating PDF and Word documents from templates, including placeholders, tables, and images.
    • Enhanced API documentation with detailed reference pages for all controllers, models, and services.
    • Added Docker and Redis integration for scalable deployments.
  • Improvements

    • Updated configuration, environment variable handling, and resource cleanup for better reliability.
    • Expanded usage examples and setup instructions in the documentation.
    • Improved validation and error handling in API endpoints.
  • Refactor

    • Renamed and reorganized namespaces, classes, and solution structure to "OsmoDoc".
    • Migrated from "DocumentService" to "OsmoDoc" branding throughout the codebase and documentation.
  • Documentation

    • Comprehensive API and usage documentation generated and updated for all new and existing features.
  • Chores

    • Updated project dependencies, Docker configuration, and environment variable templates for consistency and maintainability.

osm-Jatin and others added 30 commits June 15, 2025 14:51
osm-Jatin and others added 26 commits July 4, 2025 08:46
@osm-Jatin osm-Jatin requested a review from sameer-s-b July 8, 2025 09:51
@osm-Jatin osm-Jatin self-assigned this Jul 8, 2025
Copy link

coderabbitai bot commented Jul 8, 2025

Caution

Review failed

Failed to post review comments.

Walkthrough

This update migrates the project from "DocumentService" to "OsmoDoc," restructuring namespaces, solution/project files, and documentation. New features include Redis-based JWT token management, enhanced PDF and Word document generation with support for EJS templates and images, expanded configuration, and improved API controllers. Documentation and environment setup are fully revised to match the new architecture.

Changes

File(s) / Group Change Summary
All DocumentService.* files, models, generators Deleted legacy DocumentService codebase: all models, DTOs, helpers, and generators for PDF/Word.
OsmoDoc., OsmoDoc.API., OsmoDoc.Pdf., OsmoDoc.Word. Introduced new OsmoDoc codebase: new namespaces, models, DTOs, PDF/Word generators, helpers, and services.
OsmoDoc/Services/RedisTokenStoreService.cs, IRedisTokenStoreService.cs Added Redis-backed token store service and interface for JWT management.
OsmoDoc.API/Controllers/*.cs Added/rewrote API controllers for login, PDF, and Word endpoints, supporting new DTOs and Redis token validation.
OsmoDoc.API/Models/*.cs Added/rewrote DTOs for login, PDF, Word, and token revocation; improved validation.
OsmoDoc.Pdf/Models/.cs, OsmoDoc.Word/Models/.cs Added/rewrote models for PDF/Word content, metadata, enums, and image handling.
OsmoDoc.Pdf/PdfDocumentGenerator.cs, OsmoDoc.Word/WordDocumentGenerator.cs Added/rewrote static generator classes for PDF (HTML/EJS) and Word (with images/tables) with async APIs and logging.
OsmoDoc.API/Program.cs, OsmoDoc.API.csproj, OsmoDoc.csproj Updated startup: new dependencies (Redis, logging), JWT auth with Redis revocation, new project references.
Dockerfile, docker-compose.yaml, .env.example, .gitignore Updated Docker setup: renamed services, added Redis, new env vars, volume mounts, improved ignore rules.
CONTRIBUTING.md, README.md, docfx.json, docs/site/* Renamed/rebranded documentation, updated usage examples, API docs, TOC, and manifest for OsmoDoc.
OsmoDoc.API/Helpers/*.cs Updated namespaces, added/rewrote helpers, improved error handling and validation.
OsmoDoc.API/appsettings.json Added resource cleanup config flag for generated files.
OsmoDoc.API/OsmoDoc.API.sln, OsmoDoc.sln Solution/project files renamed and updated for OsmoDoc.
(Documentation HTML/JSON files) Regenerated and expanded API documentation for all new controllers, models, and services.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant LoginController
    participant AuthenticationHelper
    participant RedisTokenStoreService

    Client->>LoginController: POST /api/login (LoginRequestDTO)
    LoginController->>AuthenticationHelper: Generate JWT
    AuthenticationHelper-->>LoginController: JWT token
    LoginController->>RedisTokenStoreService: StoreTokenAsync(token, email)
    RedisTokenStoreService-->>LoginController: (ack)
    LoginController-->>Client: BaseResponse (token)

    Client->>LoginController: POST /api/revoke (RevokeTokenRequestDTO)
    LoginController->>RedisTokenStoreService: RevokeTokenAsync(token)
    RedisTokenStoreService-->>LoginController: (ack)
    LoginController-->>Client: BaseResponse (success)
Loading
sequenceDiagram
    participant Client
    participant PdfController
    participant PdfDocumentGenerator

    Client->>PdfController: POST /api/pdf/GeneratePdfUsingHtml (PdfGenerationRequestDTO)
    PdfController->>PdfDocumentGenerator: GeneratePdf(templatePath, metaDataList, outputFilePath, false, null)
    PdfDocumentGenerator-->>PdfController: (PDF generated)
    PdfController-->>Client: BaseResponse (Base64 PDF)
Loading
sequenceDiagram
    participant Client
    participant WordController
    participant WordDocumentGenerator

    Client->>WordController: POST /api/word/GenerateWordDocument (WordGenerationRequestDTO)
    WordController->>WordDocumentGenerator: GenerateDocumentByTemplate(templateFilePath, documentData, outputFilePath)
    WordDocumentGenerator-->>WordController: (Word doc generated)
    WordController-->>Client: BaseResponse (Base64 Word)
Loading

Poem

🐇✨
OsmoDoc leaps with a brand-new name,
With Redis for tokens and docs to tame.
PDFs from EJS or HTML,
Word docs with images—oh, what a spell!
New helpers and configs, containers in sync,
This bunny’s so proud—let’s raise a pink drink!
📝🚀

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@osm-Jatin osm-Jatin changed the title docs: uodate the DocFX documentation docs: update the DocFX documentation Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants