Documentation Setup
This documentation site is built with Docusaurus and runs independently from the HRMS application.
Prerequisites
- Node.js 18+ (20+ recommended)
- npm 10+
Install and Run
cd c:\laragon\www\hrms-docs
npm install
npm start
The docs site opens at http://localhost:3000.
Port Conflict
If the HRMS frontend is also running on port 3000, start the docs on a different port:
npm start -- --port 4000
Build Static Output
npm run build
This generates a build/ directory with static HTML, CSS, and JS files.
Preview the Build
npm run serve
Folder Structure
hrms-docs/
├── docs/ # Markdown documentation pages
│ ├── intro.md # Landing page (/)
│ ├── setup/ # Setup guides
│ ├── architecture/ # Technical architecture
│ ├── user-guide/ # End-user task guides
│ ├── modules/ # Module-level documentation
│ ├── roles/ # Role-based access documentation
│ ├── api/ # API documentation & reference
│ └── changelog/ # Release notes
├── static/
│ └── img/ # Images, logos, screenshots
│ └── screenshots/ # Add screenshots here
├── src/
│ └── css/custom.css # Theme customizations
├── docusaurus.config.ts # Site configuration
├── sidebars.ts # Sidebar navigation structure
└── package.json
Adding or Editing Pages
- Create or edit a
.mdfile in thedocs/directory. - Add YAML frontmatter at the top:
---
sidebar_position: 3
title: Page Title
description: Brief description for SEO and link previews.
---
# Page Title
Your content here.
- If the page belongs to a new section, register it in
sidebars.ts. - The dev server hot-reloads — changes appear immediately.
Adding Screenshots
- Place image files in
static/img/screenshots/. - Reference them in markdown:

Screenshots are optional — all documentation reads well without them and can be enriched later.
Deployment
The site is designed for local-first usage. When ready to deploy to a server:
- Run
npm run build. - Copy the
build/directory to the web server's document root. - Configure the server to serve
index.htmlfor all routes (SPA fallback). - If deploying to a subdirectory (e.g.,
/docs/), updatebaseUrlindocusaurus.config.ts:
baseUrl: '/docs/',
- Update the
urlfield to match the production domain. - Rebuild and redeploy.
Contribution Guidelines
- Keep pages focused — one topic per page.
- Use task-oriented language for user guides ("How to create an employee").
- Use accurate, concise language for technical docs.
- Mark unimplemented features with a clear admonition:
:::info[Not Yet Implemented]
This feature is planned for a future phase and is not available in the current release.
:::
- Update the changelog when features ship.