๐ Documenting
Learn how to create and maintain documentation in NestFlux.
๐ฏ Documentation Platformโ
NestFlux uses Docusaurus as its documentation platform, providing:
- Modern Interface: Clean, professional documentation site
- Markdown Support: Write docs in Markdown with MDX extensions
- Search Functionality: Built-in search across all documentation
- Responsive Design: Works perfectly on desktop and mobile
- Version Control: Documentation lives alongside code
๐ Starting Documentationโ
Start the documentation development server:
pnpm start:docs
This launches Docusaurus at http://localhost:3000
with hot reload for instant preview of changes.
๐ Documentation Structureโ
The documentation is organized into two main sections:
๐๏ธ NestFlux Documentationโ
Located in docs/docs/nestflux/
- Template Documentation
Contains documentation about the NestFlux template itself:
- Architecture explanations
- Setup and configuration guides
- Feature patterns and conventions
- Technology stack information
- Development workflows
Purpose: Help developers understand how to use and extend the NestFlux template.
๐ฏ Project Documentationโ
Located in docs/docs/project/
- Your Project's Documentation
Reserved for your specific project documentation:
- Business logic and requirements
- Domain-specific decisions
- Project architecture choices
- Team conventions and standards
- Deployment procedures
Purpose: Document your specific project built with NestFlux.
โ๏ธ Writing Documentationโ
Creating New Pagesโ
-
Choose the right section:
- NestFlux features โ
docs/docs/nestflux/
- Project-specific content โ
docs/docs/project/
- NestFlux features โ
-
Create the file:
---
sidebar_position: 1
---
# Your Page Title
Page content here... -
Add to navigation: Files are automatically included in the sidebar based on their location and
sidebar_position
.
Markdown Featuresโ
Docusaurus supports enhanced Markdown with:
- Code blocks with syntax highlighting
- Tabs for multiple examples
- Admonitions for notes and warnings
- Mermaid diagrams for flowcharts and schemas
- MDX components for interactive content
Example Structureโ
docs/docs/
โโโ nestflux/ # Template documentation
โ โโโ index.md
โ โโโ architecture/
โ โโโ getting-started/
โ โโโ technologies/
โโโ project/ # Your project docs
โโโ index.md
โโโ business-rules/
โโโ deployment/
โโโ team-guidelines/
๐ Publishing Documentationโ
Building Documentationโ
Build the documentation site:
pnpm build:docs
Output: docs/build/
- Static site ready for deployment
Automated Pipelineโ
NestFlux comes with a pre-configured GitHub Actions pipeline that:
- Tests Documentation: Runs Playwright tests to ensure documentation works correctly
- Publishes to GitHub Pages: Automatically deploys documentation on merge to main branch
- Quality Assurance: Validates links, builds, and functionality before deployment
The pipeline ensures your documentation is always tested and up-to-date in production.
Manual Deployment Optionsโ
- GitHub Pages: Automatic deployment from repository (pre-configured)
- Netlify/Vercel: Connect to your repository for auto-deployment
- Static Hosting: Deploy the
build/
folder to any static host