Project Structure
This page describes the folder and file structure of BlazorForge. Every folder has a specific purpose.
The project root contains build files and top-level configuration.
BlazorForge.csproj is the project file. It defines .NET version, packages, and the MSBuild target that runs the Markdown compiler before each build.
Program.cs is the application entry point. It registers services and starts the Blazor WebAssembly host.
App.razor is the root component. It configures the router and 404 handling.
_Imports.razor contains global using statements for all Razor components.
build.sh is a shell script used by hosting platforms to install the .NET SDK before building.
netlify.toml configures the build command and publish directory for Netlify.
wrangler.toml configures the build output for Cloudflare Pages.
README.md is the quick-start guide.
LICENSE contains the commercial license.
Layout
Section titled “Layout”The Layout/ folder contains one file.
MainLayout.razor wraps every page with the site header, footer, SEO head, and main content area.
The Pages/ folder contains routable components. Each file has a @page directive that defines its URL.
Index.razor is the home page at /.
About.razor is the about page at /about.
Services.razor is the services index at /services.
ServiceDetail.razor is a single service page at /services/{slug}.
Journal.razor is the journal index at /journal.
JournalDetail.razor is a single journal article at /journal/{slug}.
Contact.razor is the contact page at /contact.
Shared
Section titled “Shared”The Shared/ folder contains components used across multiple pages.
SiteHeader.razor renders the site header with navigation and CTA.
SiteFooter.razor renders the site footer with brand, columns, social links, and legal text.
SeoHead.razor injects SEO meta tags into the document head.
The Shared/Components/ subfolder contains smaller components.
PostCard.razor renders a journal article card.
ServiceCard.razor renders a service card.
Pagination.razor renders pagination controls.
Breadcrumb.razor renders a breadcrumb trail.
TagList.razor renders a list of tags.
AuthorCard.razor renders an author bio card.
NextPrevNav.razor renders previous and next navigation for detail pages.
Models
Section titled “Models”The Models/ folder contains C# classes that represent all data.
SiteConfig.cs maps to wwwroot/data/site.json.
SeoConfig.cs maps to wwwroot/data/seo.json.
NavbarConfig.cs maps to wwwroot/data/navbar.json.
FooterConfig.cs maps to wwwroot/data/footer.json.
WidgetConfig.cs maps to wwwroot/data/widget.json.
HomeContent.cs maps to wwwroot/metadata/home.json.
AboutContent.cs maps to wwwroot/metadata/about.json.
ContactContent.cs maps to wwwroot/metadata/contact.json.
PageContent.cs maps to wwwroot/metadata/journal-index.json and wwwroot/metadata/services-index.json.
JournalItem.cs maps to items in wwwroot/metadata/journal.json.
ServiceItem.cs maps to items in wwwroot/metadata/services.json.
Services
Section titled “Services”The Services/ folder contains the business logic classes.
ConfigService.cs loads the five JSON config files from wwwroot/data/.
MarkdownService.cs loads the compiled metadata JSON files from wwwroot/metadata/.
SeoService.cs generates all meta tags, Open Graph tags, Twitter Card tags, and JSON-LD structured data.
The Tools/ folder contains the Markdown compiler.
Tools.csproj is the project file for the compiler.
Program.cs is the compiler entry point.
MarkdownCompiler.cs reads Markdown files, parses YAML frontmatter, converts Markdown to HTML, and writes JSON metadata. It also generates sitemap.xml, feed.xml, and robots.txt.
The Tools/ folder is excluded from the Blazor build in BlazorForge.csproj.
Properties
Section titled “Properties”The Properties/ folder contains launchSettings.json. This file defines the development URL, environment variables, and launch profile.
wwwroot
Section titled “wwwroot”The wwwroot/ folder contains all static files served to the browser.
index.html is the HTML shell. It loads the Blazor WebAssembly runtime and the global stylesheet.
favicon.png is the browser tab icon.
wwwroot/admin
Section titled “wwwroot/admin”The wwwroot/admin/ folder contains Decap CMS.
index.html is the CMS entry point. It loads the Decap CMS JavaScript and the Netlify Identity widget.
config.yml defines the CMS collections, fields, and backend configuration.
wwwroot/content
Section titled “wwwroot/content”The wwwroot/content/ folder contains all Markdown source files.
home.md, about.md, and contact.md are the static pages.
journal.md and services.md are the index pages for the two collections.
journal/ contains one Markdown file per journal article.
services/ contains one Markdown file per service page.
wwwroot/css
Section titled “wwwroot/css”The wwwroot/css/ folder contains style.css. This is the single global stylesheet for the entire site.
wwwroot/data
Section titled “wwwroot/data”The wwwroot/data/ folder contains all JSON config files.
site.json contains site identity.
seo.json contains SEO defaults and Organization JSON-LD.
navbar.json contains navigation menu items.
footer.json contains footer columns and legal text.
widget.json contains global widgets.
wwwroot/images
Section titled “wwwroot/images”The wwwroot/images/ folder contains all images.
Blazor.png is the Open Graph image.
journal/ and services/ contain cover images for collections.
uploads/ is where Decap CMS stores uploaded images.
wwwroot/js
Section titled “wwwroot/js”The wwwroot/js/ folder contains main.js. This is the only JavaScript file in the project besides the Blazor runtime.
wwwroot/metadata
Section titled “wwwroot/metadata”The wwwroot/metadata/ folder contains the compiled JSON metadata. It is generated by the compiler and can be safely deleted. It is regenerated on the next build.
Summary Table
Section titled “Summary Table”The table below shows where each type of content lives.
| Type | Folder | Format |
|---|---|---|
| Site identity | wwwroot/data/ | JSON |
| SEO defaults | wwwroot/data/ | JSON |
| Navigation | wwwroot/data/ | JSON |
| Footer | wwwroot/data/ | JSON |
| Widgets | wwwroot/data/ | JSON |
| Home page | wwwroot/content/ | Markdown |
| About page | wwwroot/content/ | Markdown |
| Contact page | wwwroot/content/ | Markdown |
| Journal index | wwwroot/content/ | Markdown |
| Services index | wwwroot/content/ | Markdown |
| Journal articles | wwwroot/content/journal/ | Markdown |
| Service pages | wwwroot/content/services/ | Markdown |
| Compiled metadata | wwwroot/metadata/ | JSON (generated) |
| Images | wwwroot/images/ | PNG, JPG, SVG |
| Stylesheet | wwwroot/css/ | CSS |
| JavaScript | wwwroot/js/ | JS |
| Decap CMS | wwwroot/admin/ | HTML, YAML |
Next Steps
Section titled “Next Steps”Continue to Tech Stack for a list of frameworks, libraries, and tools used.