TGM Manager includes a comprehensive knowledge base system for documenting maintenance procedures, best practices, FAQs, and training materials.

Overview

The knowledge base provides:

  • Articles - Detailed documentation and guides
  • FAQs - Frequently asked questions and answers
  • Best Practices - Industry and company-specific recommendations
  • Learning Modules - Training content with videos and assessments

Content Types

Articles

Articles are detailed documentation pieces that can include: - Maintenance procedures - Technical specifications - Troubleshooting guides - Safety guidelines

Base URL: /api/articles

FAQs

Frequently asked questions organized by categories.

Base URL: /api/faqs

Best Practices

Industry and company-specific best practices and recommendations.

Base URL: /api/best-practices

Learning Modules

Training content including videos, documents, and assessments.

Base URL: /api/module-learnings

REST API

All knowledge base endpoints follow the standard CRUD pattern:

Standard Operations

Method Endpoint Description
GET /api/{resource} List all with pagination
GET /api/{resource}/{id} Get single item
POST /api/{resource} Create new item
PUT /api/{resource}/{id} Update item
DELETE /api/{resource}/{id} Delete item
GET /api/{resource}/count Count items

Articles

List Articles

GET /api/articles?page=0&size=20&sort=createdAt,desc

Response:

{
  "data": [
    {
      "id": 1,
      "title": "Pump Maintenance Guide",
      "slug": "pump-maintenance-guide",
      "content": "Detailed content here...",
      "excerpt": "Overview of pump maintenance procedures",
      "categoryId": 5,
      "category": {
        "id": 5,
        "name": "Equipment Maintenance"
      },
      "author": {
        "id": 3,
        "name": "John Doe"
      },
      "status": "PUBLISHED",
      "viewCount": 245,
      "createdAt": "2024-01-10T08:00:00",
      "updatedAt": "2024-01-15T10:30:00"
    }
  ],
  "meta": {
    "pagination": {
      "page": 0,
      "size": 20,
      "totalElements": 45,
      "totalPages": 3
    }
  }
}

Create Article

POST /api/articles
Content-Type: application/json

{
  "title": "Bearing Replacement Procedure",
  "slug": "bearing-replacement-procedure",
  "content": "<h2>Introduction</h2><p>This guide covers...</p>",
  "excerpt": "Step-by-step guide for replacing bearings",
  "categoryId": 5,
  "status": "DRAFT",
  "tags": ["bearings", "maintenance", "procedure"]
}

Article Categories

GET /api/article-categories
POST /api/article-categories

FAQs

List FAQs

GET /api/faqs?page=0&size=20

Response:

{
  "data": [
    {
      "id": 1,
      "question": "How often should pumps be inspected?",
      "answer": "Pumps should be inspected monthly as part of routine maintenance...",
      "categoryId": 3,
      "category": {
        "id": 3,
        "name": "Pumps"
      },
      "isPublished": true,
      "sortOrder": 1,
      "helpful": 42,
      "notHelpful": 3
    }
  ]
}

Create FAQ

POST /api/faqs
Content-Type: application/json

{
  "question": "What is the recommended oil change interval?",
  "answer": "Oil should be changed every 500 operating hours or 6 months...",
  "categoryId": 4,
  "isPublished": true,
  "sortOrder": 5
}

FAQ Categories

GET /api/faq-categories
POST /api/faq-categories

Best Practices

List Best Practices

GET /api/best-practices?page=0&size=20

Response:

{
  "data": [
    {
      "id": 1,
      "title": "Preventive Maintenance Scheduling",
      "description": "Best practices for scheduling preventive maintenance tasks",
      "content": "Detailed best practice content...",
      "categoryId": 2,
      "category": {
        "id": 2,
        "name": "Maintenance Management"
      },
      "applicability": "ALL",
      "priority": "HIGH",
      "isActive": true
    }
  ]
}

Create Best Practice

POST /api/best-practices
Content-Type: application/json

{
  "title": "Lockout/Tagout Procedures",
  "description": "Safety procedures for equipment isolation",
  "content": "Detailed LOTO procedures...",
  "categoryId": 1,
  "applicability": "ALL",
  "priority": "HIGH",
  "isActive": true
}

Best Practice Categories

GET /api/best-practice-categories
POST /api/best-practice-categories

Learning Modules

List Learning Modules

GET /api/module-learnings?page=0&size=20

Response:

{
  "data": [
    {
      "id": 1,
      "title": "Basic Pump Maintenance",
      "description": "Introduction to pump maintenance fundamentals",
      "categoryId": 5,
      "category": {
        "id": 5,
        "name": "Equipment Training"
      },
      "duration": 45,
      "difficulty": "BEGINNER",
      "isPublished": true,
      "requiredForRoles": ["TECHNICIAN", "OPERATOR"],
      "completionCount": 125
    }
  ]
}

Create Learning Module

POST /api/module-learnings
Content-Type: application/json

{
  "title": "Advanced Vibration Analysis",
  "description": "Learn to analyze equipment vibration patterns",
  "categoryId": 5,
  "duration": 90,
  "difficulty": "ADVANCED",
  "isPublished": false,
  "requiredForRoles": ["TECHNICIAN"]
}

Learning Module Categories

GET /api/learning-module-categories
POST /api/learning-module-categories

Module Videos

GET /api/module-videos?moduleId=1
POST /api/module-videos

User Learning Progress

Track user progress through learning modules.

GET /api/user-learnings?userId=5
POST /api/user-learnings
PUT /api/user-learnings/{id}

Community Features

Community Posts

User-generated content and discussions.

GET /api/community-posts
POST /api/community-posts

Response:

{
  "data": [
    {
      "id": 1,
      "title": "Tip: Extending bearing life",
      "content": "Here's a technique I've found helpful...",
      "authorId": 5,
      "author": {
        "id": 5,
        "name": "John Doe"
      },
      "likes": 15,
      "commentCount": 8,
      "createdAt": "2024-01-20T14:30:00"
    }
  ]
}

Community Comments

GET /api/community-comments?postId=1
POST /api/community-comments

Lessons Learned

Capture and share lessons from incidents and projects.

GET /api/lesson-learneds
POST /api/lesson-learneds

Response:

{
  "data": [
    {
      "id": 1,
      "title": "Pump failure root cause",
      "summary": "Identified lack of lubrication schedule as root cause",
      "details": "During the investigation of pump P-101 failure...",
      "category": "EQUIPMENT_FAILURE",
      "impactLevel": "HIGH",
      "recommendations": "Implement automated lubrication alerts",
      "relatedFailureId": 456,
      "relatedRcaId": 12,
      "approvalStatus": "APPROVED",
      "createdBy": {
        "id": 3,
        "name": "Jane Smith"
      }
    }
  ]
}

Usage Examples

Creating an Article

curl -X POST http://localhost:1337/api/articles \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Conveyor Belt Inspection Guide",
    "slug": "conveyor-belt-inspection",
    "content": "<h2>Overview</h2><p>This guide covers inspection procedures...</p>",
    "excerpt": "Complete guide for conveyor belt inspections",
    "categoryId": 5,
    "status": "PUBLISHED"
  }'

Adding an FAQ

curl -X POST http://localhost:1337/api/faqs \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "How do I reset a tripped motor?",
    "answer": "1. Identify the cause of the trip\n2. Verify the fault is cleared\n3. Press the reset button...",
    "categoryId": 2,
    "isPublished": true
  }'

Creating a Learning Module

curl -X POST http://localhost:1337/api/module-learnings \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Safety Orientation",
    "description": "Required safety training for all employees",
    "categoryId": 1,
    "duration": 30,
    "difficulty": "BEGINNER",
    "isPublished": true,
    "requiredForRoles": ["TECHNICIAN", "OPERATOR", "MANAGER"]
  }'

Recording Lesson Learned

curl -X POST http://localhost:1337/api/lesson-learneds \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Importance of vibration monitoring",
    "summary": "Early vibration detection prevented major failure",
    "details": "During routine monitoring, we detected abnormal vibration...",
    "category": "PREDICTIVE_MAINTENANCE",
    "impactLevel": "MEDIUM",
    "recommendations": "Install vibration sensors on all critical rotating equipment"
  }'

Content Statuses

Status Description
DRAFT Work in progress, not visible
REVIEW Pending review/approval
PUBLISHED Visible to users
ARCHIVED No longer active, kept for reference

Best Practices

  1. Use categories - Organize content into logical categories
  2. Keep content current - Review and update regularly
  3. Include visuals - Add images and diagrams where helpful
  4. Cross-reference - Link related articles and FAQs
  5. Track engagement - Monitor view counts and feedback
  6. Capture lessons - Document learnings from incidents
  7. Require training - Assign learning modules by role