This document describes the folder structure and architecture of the CV Generator application built with Blazor Web Server.
The CV Generator is a Blazor Web Server application that allows users to create, customize, and export professional curriculum vitae (CVs) and resumes using various templates. Blazor enables rich interactive web UI using C# instead of JavaScript.
- Blazor Web Server - Server-side Blazor with SignalR for real-time UI updates
- ASP.NET Core - Hosting framework
- C# - Primary programming language
- Razor Components - Component-based UI architecture
CVGenerator/
├── src/ # Application source code
│ ├── Components/ # Reusable Blazor components
│ ├── Pages/ # Routable Blazor pages (with @page directive)
│ ├── Shared/ # Shared layouts and navigation components
│ ├── Models/ # Data models and entities
│ ├── Services/ # Business logic and external integrations
│ ├── Utils/ # Utility functions and helpers
│ └── Config/ # Application configuration
├── wwwroot/ # Static web assets
│ ├── css/ # Stylesheets
│ ├── js/ # JavaScript for interop
│ └── images/ # Image assets
├── tests/ # Test files
│ ├── unit/ # Unit tests
│ └── integration/ # Integration tests
├── templates/ # CV template designs
├── data/ # Sample data and schemas
└── docs/ # Documentation
The main application logic is organized following Blazor Web Server patterns:
- Components: Reusable Blazor components (.razor files) for forms, cards, dialogs, etc.
- Pages: Routable pages with
@pagedirectives for different app sections - Shared: Shared components like layouts, navigation menus, headers, and footers
- Models: C# classes defining data structures (User, CV, WorkExperience, Education, Skills)
- Services: Business logic and integrations (injected via dependency injection)
- Utils: Helper functions and extension methods
- Config: Configuration classes and settings
Static files served directly to the browser:
- CSS stylesheets (including component-specific isolated CSS)
- JavaScript files for Blazor JS interop
- Images, icons, and other media
Comprehensive testing using bUnit for Blazor components:
- Unit tests: Test individual components, services, and utility functions
- Integration tests: Test component interactions and service integrations
Pre-designed CV layouts as Blazor components or data templates:
- Professional templates
- Creative templates
- Academic templates
- Each template is a customizable Blazor component or layout
Supporting data files:
- JSON schemas for validation
- Sample CV data
- Seed data for development
Blazor uses a component-based architecture where:
- Components are reusable UI elements defined in
.razorfiles - Components can have parameters for data binding
- Components support two-way binding with
@binddirective - Event handling is done with C# methods, not JavaScript
Services are registered in Program.cs and injected into components:
@inject ICVService CVService
@inject NavigationManager NavigationState can be managed through:
- Component parameters and cascading parameters
- Scoped services for user session state
- Application state services for global state
- Browser storage (via JS interop) for persistence
Blazor Web Server maintains a real-time SignalR connection:
- UI updates are sent from server to client
- User interactions are sent from client to server
- Efficient delta updates minimize bandwidth
- Component-Based Design: UI built from composable, reusable Blazor components
- Separation of Concerns: Components handle UI, services handle business logic
- Dependency Injection: Services injected where needed for testability
- Type Safety: C# throughout the stack provides compile-time safety
- Server-Side Rendering: UI logic runs on server, reducing client-side complexity
Each major directory contains its own README.md file with specific details about its contents and usage. Please refer to these files for more information:
- src/README.md - Source code organization
- src/Components/README.md - Blazor components
- src/Pages/README.md - Routable pages
- src/Shared/README.md - Shared layouts
- wwwroot/README.md - Static assets
- tests/README.md - Testing guidelines
- templates/README.md - CV templates
- data/README.md - Data resources
- C# everywhere: Write both frontend and backend in C#
- Rich interactive UI: Real-time updates without page refreshes
- Code sharing: Share models and logic between client and server
- Secure: Business logic stays on server
- SEO friendly: Server-side rendering for initial load
- Easy debugging: Debug C# code in Visual Studio or VS Code
This architecture is designed to accommodate future features such as:
- User authentication with ASP.NET Core Identity
- Real-time collaboration via SignalR
- Cloud storage integration (Azure Blob Storage, AWS S3)
- Template marketplace with component library
- Export to multiple formats (PDF, Word, LaTeX)
- AI-powered content suggestions using Azure OpenAI
- Progressive Web App (PWA) capabilities
- Offline support with local storage