SakibAhmed commited on
Commit
25435eb
·
verified ·
1 Parent(s): d634ca2

Upload 37 files

Browse files
Files changed (36) hide show
  1. .gitattributes +12 -0
  2. app.py +85 -25
  3. chunker.py +189 -0
  4. faiss_storage/faiss_index/index.faiss +2 -2
  5. faiss_storage/faiss_index/index.pkl +2 -2
  6. faiss_storage/faiss_index/processed_files.json +1 -1
  7. faiss_storage/pre_chunked_sources.json +3 -0
  8. groq_fb.py +90 -44
  9. postman_collection 2.json +380 -0
  10. requirements.txt +5 -4
  11. sources/AMO GE - Company Summary.txt +102 -0
  12. sources/NAFFCO - IndustrialCatalog_Bangladesh.pdf +3 -0
  13. sources/NAFFCO Company Profile -2023.pdf +3 -0
  14. sources/NFPA 1, 2009 Edition.pdf +3 -0
  15. sources/NFPA 10, 2010 Edition.pdf +3 -0
  16. sources/NFPA 101, 2012 Edition.pdf +3 -0
  17. sources/NFPA 13, 2013 Edition.pdf +3 -0
  18. sources/NFPA 14, 2013 Edition.pdf +3 -0
  19. sources/NFPA 20 -2019.pdf +3 -0
  20. sources/NFPA 25, 2011 Edition.pdf +3 -0
  21. sources/NFPA 72, 2013 Edition.pdf +3 -0
  22. sources/Top Project List - AMO Green Energy Limited_Sep-2023.pdf +3 -0
  23. templates/chat-bot.html +431 -0
  24. templates/chat-bot_live.html +463 -0
  25. text_extractions/AMO GE - Company Summary.txt.txt +102 -0
  26. text_extractions/NAFFCO - IndustrialCatalog_Bangladesh.pdf.txt +878 -0
  27. text_extractions/NAFFCO Company Profile -2023.pdf.txt +296 -0
  28. text_extractions/NFPA 1, 2009 Edition.pdf.txt +0 -0
  29. text_extractions/NFPA 10, 2010 Edition.pdf.txt +0 -0
  30. text_extractions/NFPA 101, 2012 Edition.pdf.txt +0 -0
  31. text_extractions/NFPA 13, 2013 Edition.pdf.txt +0 -0
  32. text_extractions/NFPA 14, 2013 Edition.pdf.txt +0 -0
  33. text_extractions/NFPA 20 -2019.pdf.txt +0 -0
  34. text_extractions/NFPA 25, 2011 Edition.pdf.txt +0 -0
  35. text_extractions/NFPA 72, 2013 Edition.pdf.txt +0 -0
  36. text_extractions/Top Project List - AMO Green Energy Limited_Sep-2023.pdf.txt +182 -0
.gitattributes CHANGED
@@ -35,3 +35,15 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  faiss_storage/faiss_index/index.faiss filter=lfs diff=lfs merge=lfs -text
37
  rag_chunks/faiss_index/index.faiss filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  faiss_storage/faiss_index/index.faiss filter=lfs diff=lfs merge=lfs -text
37
  rag_chunks/faiss_index/index.faiss filter=lfs diff=lfs merge=lfs -text
38
+ faiss_storage/pre_chunked_sources.json filter=lfs diff=lfs merge=lfs -text
39
+ sources/NAFFCO[[:space:]]-[[:space:]]IndustrialCatalog_Bangladesh.pdf filter=lfs diff=lfs merge=lfs -text
40
+ sources/NAFFCO[[:space:]]Company[[:space:]]Profile[[:space:]]-2023.pdf filter=lfs diff=lfs merge=lfs -text
41
+ sources/NFPA[[:space:]]1,[[:space:]]2009[[:space:]]Edition.pdf filter=lfs diff=lfs merge=lfs -text
42
+ sources/NFPA[[:space:]]10,[[:space:]]2010[[:space:]]Edition.pdf filter=lfs diff=lfs merge=lfs -text
43
+ sources/NFPA[[:space:]]101,[[:space:]]2012[[:space:]]Edition.pdf filter=lfs diff=lfs merge=lfs -text
44
+ sources/NFPA[[:space:]]13,[[:space:]]2013[[:space:]]Edition.pdf filter=lfs diff=lfs merge=lfs -text
45
+ sources/NFPA[[:space:]]14,[[:space:]]2013[[:space:]]Edition.pdf filter=lfs diff=lfs merge=lfs -text
46
+ sources/NFPA[[:space:]]20[[:space:]]-2019.pdf filter=lfs diff=lfs merge=lfs -text
47
+ sources/NFPA[[:space:]]25,[[:space:]]2011[[:space:]]Edition.pdf filter=lfs diff=lfs merge=lfs -text
48
+ sources/NFPA[[:space:]]72,[[:space:]]2013[[:space:]]Edition.pdf filter=lfs diff=lfs merge=lfs -text
49
+ sources/Top[[:space:]]Project[[:space:]]List[[:space:]]-[[:space:]]AMO[[:space:]]Green[[:space:]]Energy[[:space:]]Limited_Sep-2023.pdf filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -17,6 +17,8 @@ import csv as csv_lib
17
  import functools
18
  import json
19
  import re
 
 
20
 
21
  from dotenv import load_dotenv
22
 
@@ -24,7 +26,15 @@ from dotenv import load_dotenv
24
  load_dotenv()
25
 
26
  # Import RAG system and Fallback LLM from groq_fb AFTER load_dotenv
27
- from groq_fb import get_groq_fallback_response, initialize_and_get_rag_system, KnowledgeRAG
 
 
 
 
 
 
 
 
28
 
29
  # Setup logging (remains global for the app)
30
  logging.basicConfig(
@@ -53,6 +63,9 @@ FLASK_DEBUG_MODE = os.getenv("FLASK_DEBUG", "False").lower() == "true"
53
  # Base directory for file paths
54
  _APP_BASE_DIR = os.path.dirname(os.path.abspath(__file__))
55
 
 
 
 
56
  # For CSV QA
57
  RELATED_QUESTIONS_TO_SHOW = 10
58
  QUESTIONS_TO_SEND_TO_GROQ_QA = 3
@@ -392,7 +405,7 @@ def replace_placeholders_in_answer(answer, db_data):
392
  if re.search(r'\{(\w+)\}', answer_str):
393
  logger.warning(f"Unresolved placeholders remain after replacement attempt: {answer_str}")
394
  answer_str = re.sub(r'\{(\w+)\}', "a specific detail", answer_str)
395
- if "a specific detail" in answer_str and not "Sorry" in answer_str:
396
  return "Sorry, I couldn't retrieve all the specific details for this answer. " + answer_str
397
  return "Sorry, I couldn't retrieve all the specific details for this answer. Some information has been generalized."
398
  return answer_str
@@ -400,7 +413,7 @@ def replace_placeholders_in_answer(answer, db_data):
400
  # --- Main Chat Endpoint ---
401
  @app.route('/chat-bot', methods=['POST'])
402
  def get_answer_hybrid():
403
- global rag_system
404
  data = request.json
405
  user_query = data.get('query', '')
406
  user_id = data.get('user_id')
@@ -455,7 +468,7 @@ def get_answer_hybrid():
455
  store_chat_interaction(session_id, user_id, user_query, response_data)
456
  return jsonify(response_data)
457
 
458
- if rag_system and rag_system.retriever:
459
  try:
460
  logger.info(f"Attempting FAISS RAG query for: {user_query[:50]}...")
461
  rag_result = rag_system.query(user_query)
@@ -479,7 +492,7 @@ def get_answer_hybrid():
479
  response_data = {
480
  'query': user_query,
481
  'answer': rag_answer,
482
- 'confidence': 85,
483
  'source': 'document_rag_faiss',
484
  'related_questions': related_questions_list,
485
  'document_sources_details': rag_sources_details
@@ -500,16 +513,16 @@ def get_answer_hybrid():
500
  'current_query': user_query,
501
  'chat_history': chat_history_messages_for_groq,
502
  'qa_related_info': qa_context_for_groq_str,
503
- 'document_related_info': ""
504
  }
505
 
506
  try:
507
- groq_answer = get_groq_fallback_response(groq_context)
508
 
509
  if groq_answer and \
510
  "Sorry, this information is not available yet" not in groq_answer and \
511
  "I'm currently experiencing a technical difficulty" not in groq_answer and \
512
- "I specialize in topics related to AMO Green Energy." not in groq_answer:
513
 
514
  if not related_questions_list:
515
  for cand_q in all_csv_candidate_answers:
@@ -519,7 +532,7 @@ def get_answer_hybrid():
519
 
520
  response_data = {
521
  'query': user_query, 'answer': groq_answer,
522
- 'confidence': 75,
523
  'source': 'groq_general_fallback',
524
  'related_questions': related_questions_list,
525
  'document_sources_details': []
@@ -594,24 +607,70 @@ def get_faiss_rag_status():
594
  @require_admin_auth
595
  def rebuild_faiss_index_route():
596
  global rag_system
597
- logger.info("Admin request to rebuild FAISS RAG index from source files...")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
598
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
599
  try:
600
  new_rag_system_instance = initialize_and_get_rag_system(force_rebuild=True)
601
 
602
  if new_rag_system_instance and new_rag_system_instance.vector_store:
603
- rag_system = new_rag_system_instance
604
  logger.info("FAISS RAG index rebuild completed and new RAG system instance is active.")
605
- updated_status_response = get_faiss_rag_status()
606
- return jsonify({"message": "FAISS RAG index rebuild initiated and completed.",
607
- "status": updated_status_response.get_json()}), 200
 
 
608
  else:
609
- logger.error("FAISS RAG index rebuild failed. The RAG system might not be available. Check logs in groq_fb.py.")
610
- return jsonify({"error": "FAISS RAG index rebuild failed. RAG system may be unavailable. Check logs."}), 500
611
 
612
  except Exception as e:
613
- logger.error(f"Error during admin FAISS index rebuild: {e}", exc_info=True)
614
- return jsonify({"error": f"Failed to rebuild index: {str(e)}"}), 500
 
615
 
616
  @app.route('/db/status', methods=['GET'])
617
  @require_admin_auth
@@ -622,7 +681,7 @@ def get_personal_db_status():
622
  'file_exists': os.path.exists(personal_data_monitor.database_path),
623
  'data_loaded': personal_data_monitor.df is not None, 'last_update': None
624
  }
625
- if status_info['file_exists'] and os.path.getmtime(personal_data_monitor.database_path) is not None:
626
  status_info['last_update'] = datetime.fromtimestamp(os.path.getmtime(personal_data_monitor.database_path)).isoformat()
627
  return jsonify(status_info)
628
  except Exception as e: return jsonify({'status': 'error', 'error': str(e)}), 500
@@ -651,7 +710,7 @@ def create_session_route():
651
 
652
  @app.route('/version', methods=['GET'])
653
  def get_version_route():
654
- return jsonify({'version': '3.5.3-Hybrid-RAG-FallbackContact'}), 200 # Updated version
655
 
656
  @app.route('/clear-history', methods=['POST'])
657
  def clear_session_history_route():
@@ -671,7 +730,7 @@ def cleanup_application():
671
  atexit.register(cleanup_application)
672
 
673
  def load_qa_data_on_startup():
674
- global embedding_manager
675
  try:
676
  general_qa_path = os.path.join(_APP_BASE_DIR, 'general_qa.csv')
677
  personal_qa_path = os.path.join(_APP_BASE_DIR, 'personal_qa.csv')
@@ -710,7 +769,7 @@ def load_qa_data_on_startup():
710
  if col not in df_val.columns:
711
  df_val[col] = None
712
  if col != 'Image':
713
- logger.warning(f"'{col}' column missing in {df_name}_qa.csv. Added empty column.")
714
 
715
  if 'Question' in df_val.columns and not df_val['Question'].isnull().all():
716
  df_val['Question'] = df_val['Question'].astype(str).apply(normalize_text)
@@ -735,14 +794,15 @@ def load_qa_data_on_startup():
735
  if __name__ == '__main__':
736
  # Ensure necessary app-specific directories exist
737
  for folder_path in [os.path.join(_APP_BASE_DIR, 'templates'),
738
- os.path.join(_APP_BASE_DIR, 'static')]:
 
739
  os.makedirs(folder_path, exist_ok=True)
740
 
741
- load_qa_data_on_startup()
742
  initialize_chat_log_file()
743
 
744
  logger.info("Attempting to initialize RAG system from groq_fb module...")
745
- rag_system = initialize_and_get_rag_system()
746
  if rag_system:
747
  logger.info("RAG system initialized successfully via groq_fb module.")
748
  else:
 
17
  import functools
18
  import json
19
  import re
20
+ import subprocess
21
+ import sys
22
 
23
  from dotenv import load_dotenv
24
 
 
26
  load_dotenv()
27
 
28
  # Import RAG system and Fallback LLM from groq_fb AFTER load_dotenv
29
+ from groq_fb import (
30
+ get_groq_fallback_response,
31
+ initialize_and_get_rag_system,
32
+ KnowledgeRAG,
33
+ # Import constants to be used in the rebuild route
34
+ RAG_SOURCES_DIR,
35
+ RAG_STORAGE_PARENT_DIR,
36
+ RAG_CHUNKED_SOURCES_FILENAME
37
+ )
38
 
39
  # Setup logging (remains global for the app)
40
  logging.basicConfig(
 
63
  # Base directory for file paths
64
  _APP_BASE_DIR = os.path.dirname(os.path.abspath(__file__))
65
 
66
+ # NEW: Directory for saving raw text extractions for debugging
67
+ TEXT_EXTRACTIONS_DIR = os.path.join(_APP_BASE_DIR, 'text_extractions')
68
+
69
  # For CSV QA
70
  RELATED_QUESTIONS_TO_SHOW = 10
71
  QUESTIONS_TO_SEND_TO_GROQ_QA = 3
 
405
  if re.search(r'\{(\w+)\}', answer_str):
406
  logger.warning(f"Unresolved placeholders remain after replacement attempt: {answer_str}")
407
  answer_str = re.sub(r'\{(\w+)\}', "a specific detail", answer_str)
408
+ if "a specific detail" in answer_str and not "Sorry" in answer_str:
409
  return "Sorry, I couldn't retrieve all the specific details for this answer. " + answer_str
410
  return "Sorry, I couldn't retrieve all the specific details for this answer. Some information has been generalized."
411
  return answer_str
 
413
  # --- Main Chat Endpoint ---
414
  @app.route('/chat-bot', methods=['POST'])
415
  def get_answer_hybrid():
416
+ global rag_system
417
  data = request.json
418
  user_query = data.get('query', '')
419
  user_id = data.get('user_id')
 
468
  store_chat_interaction(session_id, user_id, user_query, response_data)
469
  return jsonify(response_data)
470
 
471
+ if rag_system and rag_system.retriever:
472
  try:
473
  logger.info(f"Attempting FAISS RAG query for: {user_query[:50]}...")
474
  rag_result = rag_system.query(user_query)
 
492
  response_data = {
493
  'query': user_query,
494
  'answer': rag_answer,
495
+ 'confidence': 85,
496
  'source': 'document_rag_faiss',
497
  'related_questions': related_questions_list,
498
  'document_sources_details': rag_sources_details
 
513
  'current_query': user_query,
514
  'chat_history': chat_history_messages_for_groq,
515
  'qa_related_info': qa_context_for_groq_str,
516
+ 'document_related_info': ""
517
  }
518
 
519
  try:
520
+ groq_answer = get_groq_fallback_response(groq_context)
521
 
522
  if groq_answer and \
523
  "Sorry, this information is not available yet" not in groq_answer and \
524
  "I'm currently experiencing a technical difficulty" not in groq_answer and \
525
+ "I specialize in topics related to AMO Green Energy." not in groq_answer:
526
 
527
  if not related_questions_list:
528
  for cand_q in all_csv_candidate_answers:
 
532
 
533
  response_data = {
534
  'query': user_query, 'answer': groq_answer,
535
+ 'confidence': 75,
536
  'source': 'groq_general_fallback',
537
  'related_questions': related_questions_list,
538
  'document_sources_details': []
 
607
  @require_admin_auth
608
  def rebuild_faiss_index_route():
609
  global rag_system
610
+ logger.info("Admin request to rebuild FAISS RAG index received. Starting two-step process.")
611
+
612
+ # Step 1: Run the chunker.py script to pre-process source files
613
+ # This now also saves raw text extractions for debugging.
614
+ logger.info("Step 1: Running chunker.py to pre-process source documents.")
615
+ chunker_script_path = os.path.join(_APP_BASE_DIR, 'chunker.py')
616
+ chunked_json_output_path = os.path.join(RAG_STORAGE_PARENT_DIR, RAG_CHUNKED_SOURCES_FILENAME)
617
+
618
+ # Ensure the directory for text extractions exists
619
+ os.makedirs(TEXT_EXTRACTIONS_DIR, exist_ok=True)
620
+
621
+ if not os.path.exists(chunker_script_path):
622
+ logger.error(f"Chunker script not found at '{chunker_script_path}'. Aborting rebuild.")
623
+ return jsonify({"error": f"chunker.py not found. Cannot proceed with rebuild."}), 500
624
+
625
+ command = [
626
+ sys.executable,
627
+ chunker_script_path,
628
+ '--sources-dir', RAG_SOURCES_DIR,
629
+ '--output-file', chunked_json_output_path,
630
+ '--text-output-dir', TEXT_EXTRACTIONS_DIR # MODIFIED: Added argument to save raw text
631
+ ]
632
 
633
+ try:
634
+ process = subprocess.run(
635
+ command,
636
+ capture_output=True,
637
+ text=True,
638
+ check=True
639
+ )
640
+ logger.info("Chunker script executed successfully. Raw text saved to 'text_extractions' and chunks to 'faiss_storage'.")
641
+ logger.info(f"Chunker stdout:\n{process.stdout}")
642
+ except subprocess.CalledProcessError as e:
643
+ logger.error(f"Chunker script failed with exit code {e.returncode}.")
644
+ logger.error(f"Chunker stderr:\n{e.stderr}")
645
+ return jsonify({
646
+ "error": "Step 1 (Chunking) failed. Check logs for details from chunker.py.",
647
+ "details": e.stderr
648
+ }), 500
649
+ except Exception as e:
650
+ logger.error(f"An unexpected error occurred while running the chunker script: {e}", exc_info=True)
651
+ return jsonify({"error": f"An unexpected error occurred during the chunking step: {str(e)}"}), 500
652
+
653
+ # Step 2: Initialize the RAG system, forcing a rebuild from the new chunks
654
+ logger.info("Step 2: Rebuilding FAISS index from the newly generated chunks.")
655
  try:
656
  new_rag_system_instance = initialize_and_get_rag_system(force_rebuild=True)
657
 
658
  if new_rag_system_instance and new_rag_system_instance.vector_store:
659
+ rag_system = new_rag_system_instance
660
  logger.info("FAISS RAG index rebuild completed and new RAG system instance is active.")
661
+ updated_status_response = get_faiss_rag_status()
662
+ return jsonify({
663
+ "message": "FAISS RAG index rebuild completed successfully (text extraction, chunking, and indexing).",
664
+ "status": updated_status_response.get_json()
665
+ }), 200
666
  else:
667
+ logger.error("FAISS RAG index rebuild failed during the indexing phase. The RAG system might not be available. Check logs in groq_fb.py.")
668
+ return jsonify({"error": "Step 2 (Indexing) failed. RAG system may be unavailable. Check logs."}), 500
669
 
670
  except Exception as e:
671
+ logger.error(f"Error during admin FAISS index rebuild (indexing phase): {e}", exc_info=True)
672
+ return jsonify({"error": f"Failed to rebuild index during indexing phase: {str(e)}"}), 500
673
+
674
 
675
  @app.route('/db/status', methods=['GET'])
676
  @require_admin_auth
 
681
  'file_exists': os.path.exists(personal_data_monitor.database_path),
682
  'data_loaded': personal_data_monitor.df is not None, 'last_update': None
683
  }
684
+ if status_info['file_exists'] and os.path.getmtime(personal_data_monitor.database_path) is not None:
685
  status_info['last_update'] = datetime.fromtimestamp(os.path.getmtime(personal_data_monitor.database_path)).isoformat()
686
  return jsonify(status_info)
687
  except Exception as e: return jsonify({'status': 'error', 'error': str(e)}), 500
 
710
 
711
  @app.route('/version', methods=['GET'])
712
  def get_version_route():
713
+ return jsonify({'version': '3.7.0-Hybrid-RAG-Chunker-Debug'}), 200 # Updated version
714
 
715
  @app.route('/clear-history', methods=['POST'])
716
  def clear_session_history_route():
 
730
  atexit.register(cleanup_application)
731
 
732
  def load_qa_data_on_startup():
733
+ global embedding_manager
734
  try:
735
  general_qa_path = os.path.join(_APP_BASE_DIR, 'general_qa.csv')
736
  personal_qa_path = os.path.join(_APP_BASE_DIR, 'personal_qa.csv')
 
769
  if col not in df_val.columns:
770
  df_val[col] = None
771
  if col != 'Image':
772
+ logger.warning(f"'{col}' column missing in {df_name}_qa.csv. Added empty column.")
773
 
774
  if 'Question' in df_val.columns and not df_val['Question'].isnull().all():
775
  df_val['Question'] = df_val['Question'].astype(str).apply(normalize_text)
 
794
  if __name__ == '__main__':
795
  # Ensure necessary app-specific directories exist
796
  for folder_path in [os.path.join(_APP_BASE_DIR, 'templates'),
797
+ os.path.join(_APP_BASE_DIR, 'static'),
798
+ TEXT_EXTRACTIONS_DIR]: # Added new dir here
799
  os.makedirs(folder_path, exist_ok=True)
800
 
801
+ load_qa_data_on_startup()
802
  initialize_chat_log_file()
803
 
804
  logger.info("Attempting to initialize RAG system from groq_fb module...")
805
+ rag_system = initialize_and_get_rag_system()
806
  if rag_system:
807
  logger.info("RAG system initialized successfully via groq_fb module.")
808
  else:
chunker.py ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import logging
3
+ import json
4
+ import argparse
5
+ from typing import List, Dict, Optional
6
+
7
+ from pypdf import PdfReader
8
+ import docx as python_docx
9
+ from langchain.text_splitter import RecursiveCharacterTextSplitter
10
+
11
+ # --- Logging Setup ---
12
+ logging.basicConfig(
13
+ level=logging.INFO,
14
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
15
+ handlers=[
16
+ logging.StreamHandler()
17
+ ]
18
+ )
19
+ logger = logging.getLogger(__name__)
20
+
21
+ # --- Text Extraction Helper Functions ---
22
+ # Note: These are duplicated from groq_fb.py to make this a standalone script.
23
+ def extract_text_from_file(file_path: str, file_type: str) -> Optional[str]:
24
+ logger.info(f"Extracting text from {file_type.upper()} file: {os.path.basename(file_path)}")
25
+ text_content = None
26
+ try:
27
+ if file_type == 'pdf':
28
+ reader = PdfReader(file_path)
29
+ text_content = "".join(page.extract_text() + "\n" for page in reader.pages if page.extract_text())
30
+ elif file_type == 'docx':
31
+ doc = python_docx.Document(file_path)
32
+ text_content = "\n".join(para.text for para in doc.paragraphs if para.text)
33
+ elif file_type == 'txt':
34
+ with open(file_path, 'r', encoding='utf-8', errors='ignore') as f:
35
+ text_content = f.read()
36
+ else:
37
+ logger.warning(f"Unsupported file type for text extraction: {file_type} for file {os.path.basename(file_path)}")
38
+ return None
39
+
40
+ if not text_content or not text_content.strip():
41
+ logger.warning(f"No text content extracted from {os.path.basename(file_path)}")
42
+ return None
43
+ return text_content.strip()
44
+ except Exception as e:
45
+ logger.error(f"Error extracting text from {os.path.basename(file_path)} ({file_type.upper()}): {e}", exc_info=True)
46
+ return None
47
+
48
+ SUPPORTED_EXTENSIONS = {
49
+ 'pdf': lambda path: extract_text_from_file(path, 'pdf'),
50
+ 'docx': lambda path: extract_text_from_file(path, 'docx'),
51
+ 'txt': lambda path: extract_text_from_file(path, 'txt'),
52
+ }
53
+
54
+ def process_sources_and_create_chunks(
55
+ sources_dir: str,
56
+ output_file: str,
57
+ chunk_size: int = 1000,
58
+ chunk_overlap: int = 150,
59
+ text_output_dir: Optional[str] = None # MODIFIED: Added optional parameter
60
+ ) -> None:
61
+ """
62
+ Scans a directory for source files, extracts text, splits it into chunks,
63
+ and saves the chunks to a single JSON file.
64
+ Optionally saves the raw extracted text to a specified directory.
65
+ """
66
+ if not os.path.isdir(sources_dir):
67
+ logger.error(f"Source directory not found: '{sources_dir}'")
68
+ raise FileNotFoundError(f"Source directory not found: '{sources_dir}'")
69
+
70
+ logger.info(f"Starting chunking process. Sources: '{sources_dir}', Output: '{output_file}'")
71
+
72
+ # MODIFIED: Create text output directory if provided
73
+ if text_output_dir:
74
+ os.makedirs(text_output_dir, exist_ok=True)
75
+ logger.info(f"Will save raw extracted text to: '{text_output_dir}'")
76
+
77
+ all_chunks_for_json: List[Dict] = []
78
+ processed_files_count = 0
79
+
80
+ text_splitter = RecursiveCharacterTextSplitter(chunk_size=chunk_size, chunk_overlap=chunk_overlap)
81
+
82
+ for filename in os.listdir(sources_dir):
83
+ file_path = os.path.join(sources_dir, filename)
84
+ if not os.path.isfile(file_path):
85
+ continue
86
+
87
+ file_ext = filename.split('.')[-1].lower()
88
+ if file_ext not in SUPPORTED_EXTENSIONS:
89
+ logger.debug(f"Skipping unsupported file: {filename}")
90
+ continue
91
+
92
+ logger.info(f"Processing source file: {filename}")
93
+ text_content = SUPPORTED_EXTENSIONS[file_ext](file_path)
94
+
95
+ if text_content:
96
+ # MODIFIED: Save the raw text to a file if directory is specified
97
+ if text_output_dir:
98
+ try:
99
+ text_output_path = os.path.join(text_output_dir, f"{filename}.txt")
100
+ with open(text_output_path, 'w', encoding='utf-8') as f_text:
101
+ f_text.write(text_content)
102
+ logger.info(f"Saved extracted text for '{filename}' to '{text_output_path}'")
103
+ except Exception as e_text_save:
104
+ logger.error(f"Could not save extracted text for '{filename}': {e_text_save}")
105
+
106
+ chunks = text_splitter.split_text(text_content)
107
+ if not chunks:
108
+ logger.warning(f"No chunks generated from {filename}. Skipping.")
109
+ continue
110
+
111
+ for i, chunk_text in enumerate(chunks):
112
+ chunk_data = {
113
+ "page_content": chunk_text,
114
+ "metadata": {
115
+ "source_document_name": filename,
116
+ "chunk_index": i,
117
+ "full_location": f"{filename}, Chunk {i+1}"
118
+ }
119
+ }
120
+ all_chunks_for_json.append(chunk_data)
121
+
122
+ processed_files_count += 1
123
+ else:
124
+ logger.warning(f"Could not extract text from {filename}. Skipping.")
125
+
126
+ if not all_chunks_for_json:
127
+ logger.warning(f"No processable documents found or no text extracted in '{sources_dir}'. JSON file will be empty.")
128
+
129
+ output_dir = os.path.dirname(output_file)
130
+ os.makedirs(output_dir, exist_ok=True)
131
+
132
+ with open(output_file, 'w', encoding='utf-8') as f:
133
+ json.dump(all_chunks_for_json, f, indent=2)
134
+
135
+ logger.info(f"Chunking complete. Processed {processed_files_count} files.")
136
+ logger.info(f"Created a total of {len(all_chunks_for_json)} chunks.")
137
+ logger.info(f"Chunked JSON output saved to: {output_file}")
138
+
139
+
140
+ def main():
141
+ parser = argparse.ArgumentParser(description="Process source documents into a JSON file of text chunks for RAG.")
142
+ parser.add_argument(
143
+ '--sources-dir',
144
+ type=str,
145
+ required=True,
146
+ help="The directory containing source files (PDFs, DOCX, TXT)."
147
+ )
148
+ parser.add_argument(
149
+ '--output-file',
150
+ type=str,
151
+ required=True,
152
+ help="The full path for the output JSON file containing the chunks."
153
+ )
154
+ # MODIFIED: Added new optional argument
155
+ parser.add_argument(
156
+ '--text-output-dir',
157
+ type=str,
158
+ default=None,
159
+ help="Optional: The directory to save raw extracted text files for debugging."
160
+ )
161
+ parser.add_argument(
162
+ '--chunk-size',
163
+ type=int,
164
+ default=1000,
165
+ help="The character size for each text chunk."
166
+ )
167
+ parser.add_argument(
168
+ '--chunk-overlap',
169
+ type=int,
170
+ default=150,
171
+ help="The character overlap between consecutive chunks."
172
+ )
173
+
174
+ args = parser.parse_args()
175
+
176
+ try:
177
+ process_sources_and_create_chunks(
178
+ sources_dir=args.sources_dir,
179
+ output_file=args.output_file,
180
+ chunk_size=args.chunk_size,
181
+ chunk_overlap=args.chunk_overlap,
182
+ text_output_dir=args.text_output_dir # MODIFIED: Pass argument
183
+ )
184
+ except Exception as e:
185
+ logger.critical(f"A critical error occurred during the chunking process: {e}", exc_info=True)
186
+ exit(1)
187
+
188
+ if __name__ == "__main__":
189
+ main()
faiss_storage/faiss_index/index.faiss CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0f731840d831c44343c31e0830bd72d4239b7fe45e71a88da4c136be9ea64eeb
3
- size 115245
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc2424a4c724987119521ec177286451863321ab82d925f24ff152ed7f8dfe9d
3
+ size 21987885
faiss_storage/faiss_index/index.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9201907850ffafb9770be90b4ee1c0acef9b00ab8a1ac840a2d03130815283ef
3
- size 76626
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:01964b3df179ab3ae2e751de21d01d75b58c17a47688e484c2d9b1d8ed24b53c
3
+ size 16462291
faiss_storage/faiss_index/processed_files.json CHANGED
@@ -1 +1 @@
1
- ["AMO GE - Company Summary.txt", "NAFFCO - IndustrialCatalog_Bangladesh.pdf", "NAFFCO Company Profile -2023.pdf", "Top Project List - AMO Green Energy Limited_Sep-2023.pdf"]
 
1
+ ["AMO GE - Company Summary.txt", "NAFFCO - IndustrialCatalog_Bangladesh.pdf", "NAFFCO Company Profile -2023.pdf", "NFPA 1, 2009 Edition.pdf", "NFPA 10, 2010 Edition.pdf", "NFPA 101, 2012 Edition.pdf", "NFPA 13, 2013 Edition.pdf", "NFPA 14, 2013 Edition.pdf", "NFPA 20 -2019.pdf", "NFPA 25, 2011 Edition.pdf", "NFPA 72, 2013 Edition.pdf", "Top Project List - AMO Green Energy Limited_Sep-2023.pdf"]
faiss_storage/pre_chunked_sources.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8a82bde8e0a014611d76977f7d801c64f1f2bf6e6428c3b94caaaba08397335
3
+ size 17268851
groq_fb.py CHANGED
@@ -58,6 +58,7 @@ RAG_FAISS_INDEX_SUBDIR_NAME = "faiss_index" # Name of the sub-directory for the
58
  # RAG_STORAGE_PARENT_DIR is the directory where 'faiss_index' subdir will be created/looked for.
59
  RAG_STORAGE_PARENT_DIR = os.getenv("RAG_STORAGE_DIR", os.path.join(_MODULE_BASE_DIR, "faiss_storage"))
60
  RAG_SOURCES_DIR = os.getenv("SOURCES_DIR", os.path.join(_MODULE_BASE_DIR, "sources"))
 
61
 
62
  # Create directories if they don't exist to prevent errors during initialization
63
  os.makedirs(RAG_SOURCES_DIR, exist_ok=True)
@@ -194,50 +195,85 @@ class KnowledgeRAG:
194
  self.rag_chain = None
195
  self.processed_source_files: List[str] = []
196
 
197
- def build_index_from_source_files(self, source_folder_path: str, k: int = RAG_DEFAULT_RETRIEVER_K): # Use new constant name
 
198
  if not os.path.isdir(source_folder_path):
199
  raise FileNotFoundError(f"Source documents folder not found: '{source_folder_path}'.")
200
 
201
- self.logger.info(f"Scanning '{source_folder_path}' for source files to build FAISS index...")
202
-
203
  all_docs_for_vectorstore: List[Document] = []
204
  processed_files_this_build: List[str] = []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
 
206
- text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=150)
 
207
 
208
- for filename in os.listdir(source_folder_path):
209
- file_path = os.path.join(source_folder_path, filename)
210
- if not os.path.isfile(file_path):
211
- continue
 
 
 
 
 
 
 
 
212
 
213
- file_ext = filename.split('.')[-1].lower()
214
- if file_ext not in FAISS_RAG_SUPPORTED_EXTENSIONS:
215
- self.logger.debug(f"Skipping unsupported file: {filename}")
216
- continue
217
 
218
- self.logger.info(f"Processing source file: {filename}")
219
- text_content = FAISS_RAG_SUPPORTED_EXTENSIONS[file_ext](file_path)
 
 
220
 
221
- if text_content:
222
- chunks = text_splitter.split_text(text_content)
223
- if not chunks:
224
- self.logger.warning(f"No chunks generated from {filename}. Skipping.")
225
  continue
226
 
227
- for i, chunk_text in enumerate(chunks):
228
- metadata = {
229
- "source_document_name": filename,
230
- "chunk_index": i,
231
- "full_location": f"{filename}, Chunk {i+1}" # User-friendly location string
232
- }
233
- doc = Document(page_content=chunk_text, metadata=metadata)
234
- all_docs_for_vectorstore.append(doc)
235
- processed_files_this_build.append(filename)
236
- else:
237
- self.logger.warning(f"Could not extract text from {filename}. Skipping.")
 
 
 
 
 
 
 
 
 
238
 
 
239
  if not all_docs_for_vectorstore:
240
- raise ValueError(f"No processable documents found or no text extracted from files in '{source_folder_path}'. Cannot build index.")
241
 
242
  self.processed_source_files = processed_files_this_build
243
  self.logger.info(f"Created {len(all_docs_for_vectorstore)} Langchain Documents from {len(self.processed_source_files)} source files: {self.processed_source_files}")
@@ -245,13 +281,10 @@ class KnowledgeRAG:
245
  self.logger.info(f"Creating FAISS index with '{self.embedding_model_name}'...")
246
  try:
247
  self.vector_store = FAISS.from_documents(all_docs_for_vectorstore, self.embeddings)
248
- # self.index_storage_dir is the parent dir, e.g. "faiss_storage"
249
- # RAG_FAISS_INDEX_SUBDIR_NAME is "faiss_index"
250
  faiss_index_path = os.path.join(self.index_storage_dir, RAG_FAISS_INDEX_SUBDIR_NAME)
251
- # os.makedirs(faiss_index_path, exist_ok=True) # Parent dir self.index_storage_dir is already created by __init__ or module-level
252
 
253
  self.vector_store.save_local(faiss_index_path)
254
- self.logger.info(f"FAISS index built from source files and saved to '{faiss_index_path}'.")
255
 
256
  self.retriever = FAISSRetrieverWithScore(vectorstore=self.vector_store, k=k)
257
  self.logger.info(f"Retriever initialized with default k={k}.")
@@ -286,7 +319,16 @@ class KnowledgeRAG:
286
  with open(metadata_file, 'r') as f:
287
  self.processed_source_files = json.load(f)
288
  else:
289
- self.processed_source_files = ["Index Loaded (source file list not available from pre-built index)"]
 
 
 
 
 
 
 
 
 
290
 
291
  except Exception as e:
292
  self.logger.error(f"Failed to load FAISS index from {faiss_index_path}: {e}", exc_info=True)
@@ -600,6 +642,7 @@ def initialize_and_get_rag_system(force_rebuild: bool = False) -> Optional[Knowl
600
  download_successful = download_and_unzip_gdrive_folder(GDRIVE_FOLDER_ID_OR_URL, RAG_SOURCES_DIR)
601
  if download_successful:
602
  logger.info(f"Successfully populated sources from Google Drive into {RAG_SOURCES_DIR}.")
 
603
  else:
604
  logger.error("Failed to download sources from Google Drive. RAG system will use local sources if available (or fail if RAG_SOURCES_DIR is empty).")
605
  else:
@@ -646,16 +689,19 @@ def initialize_and_get_rag_system(force_rebuild: bool = False) -> Optional[Knowl
646
  logger.error(f"FAISS RAG: Error loading index from '{faiss_index_actual_path}': {e_load}. Will attempt to build from files in '{RAG_SOURCES_DIR}'.", exc_info=True)
647
 
648
  if not operation_successful:
649
- logger.info(f"FAISS RAG: Building new index from files in '{RAG_SOURCES_DIR}' (Retriever K = {RAG_DEFAULT_RETRIEVER_K})...")
650
  try:
651
- if not os.path.isdir(RAG_SOURCES_DIR) or not os.listdir(RAG_SOURCES_DIR):
652
- logger.error(f"FAISS RAG: Sources directory '{RAG_SOURCES_DIR}' not found or is empty. Cannot build index.")
 
 
 
653
  os.makedirs(faiss_index_actual_path, exist_ok=True)
654
  with open(os.path.join(faiss_index_actual_path, "index.faiss"), "w") as f_dummy: f_dummy.write("")
655
  with open(os.path.join(faiss_index_actual_path, "index.pkl"), "w") as f_dummy: f_dummy.write("")
656
- logger.info("Created dummy index files as no sources were found to prevent repeated build attempts on startup.")
657
  current_rag_instance.processed_source_files = ["No source files found to build index."]
658
- raise FileNotFoundError(f"Sources directory '{RAG_SOURCES_DIR}' is empty or not found after GDrive check (if enabled).")
659
 
660
 
661
  current_rag_instance.build_index_from_source_files(
@@ -667,15 +713,15 @@ def initialize_and_get_rag_system(force_rebuild: bool = False) -> Optional[Knowl
667
  json.dump(current_rag_instance.processed_source_files, f)
668
 
669
  operation_successful = True
670
- logger.info(f"FAISS RAG: Index built successfully from source files and saved.")
671
  except FileNotFoundError as e_fnf:
672
- logger.critical(f"FATAL: No source files found in '{RAG_SOURCES_DIR}' to build RAG index: {e_fnf}", exc_info=False)
673
  return None
674
  except ValueError as e_val:
675
- logger.critical(f"FATAL: No processable documents found in '{RAG_SOURCES_DIR}' to build RAG index: {e_val}", exc_info=False)
676
  return None
677
  except Exception as e_build:
678
- logger.critical(f"FATAL: Failed to build FAISS RAG index from source files: {e_build}", exc_info=True)
679
  return None
680
 
681
  if operation_successful and current_rag_instance.vector_store:
 
58
  # RAG_STORAGE_PARENT_DIR is the directory where 'faiss_index' subdir will be created/looked for.
59
  RAG_STORAGE_PARENT_DIR = os.getenv("RAG_STORAGE_DIR", os.path.join(_MODULE_BASE_DIR, "faiss_storage"))
60
  RAG_SOURCES_DIR = os.getenv("SOURCES_DIR", os.path.join(_MODULE_BASE_DIR, "sources"))
61
+ RAG_CHUNKED_SOURCES_FILENAME = "pre_chunked_sources.json" # New constant for the chunked file
62
 
63
  # Create directories if they don't exist to prevent errors during initialization
64
  os.makedirs(RAG_SOURCES_DIR, exist_ok=True)
 
195
  self.rag_chain = None
196
  self.processed_source_files: List[str] = []
197
 
198
+ def build_index_from_source_files(self, source_folder_path: str, k: int = RAG_DEFAULT_RETRIEVER_K):
199
+ # The source_folder_path is passed for the fallback scenario
200
  if not os.path.isdir(source_folder_path):
201
  raise FileNotFoundError(f"Source documents folder not found: '{source_folder_path}'.")
202
 
 
 
203
  all_docs_for_vectorstore: List[Document] = []
204
  processed_files_this_build: List[str] = []
205
+
206
+ # New logic: Check for pre-chunked JSON file first
207
+ pre_chunked_json_path = os.path.join(self.index_storage_dir, RAG_CHUNKED_SOURCES_FILENAME)
208
+
209
+ if os.path.exists(pre_chunked_json_path):
210
+ self.logger.info(f"Found pre-chunked source file: '{pre_chunked_json_path}'. Loading documents from JSON.")
211
+ try:
212
+ with open(pre_chunked_json_path, 'r', encoding='utf-8') as f:
213
+ chunk_data_list = json.load(f)
214
+
215
+ source_filenames = set()
216
+ for chunk_data in chunk_data_list:
217
+ doc = Document(
218
+ page_content=chunk_data.get("page_content", ""),
219
+ metadata=chunk_data.get("metadata", {})
220
+ )
221
+ all_docs_for_vectorstore.append(doc)
222
+ if 'source_document_name' in doc.metadata:
223
+ source_filenames.add(doc.metadata['source_document_name'])
224
 
225
+ if not all_docs_for_vectorstore:
226
+ raise ValueError(f"The pre-chunked file '{pre_chunked_json_path}' is empty or contains no valid documents.")
227
 
228
+ processed_files_this_build = sorted(list(source_filenames))
229
+ except (json.JSONDecodeError, ValueError, KeyError) as e:
230
+ self.logger.error(f"Error processing pre-chunked JSON file '{pre_chunked_json_path}': {e}. Will attempt fallback to raw file processing.", exc_info=True)
231
+ # If JSON processing fails, clear the list and proceed to fallback.
232
+ all_docs_for_vectorstore = []
233
+
234
+ # Fallback/Original logic: If JSON was not found or failed to load, process raw files
235
+ if not all_docs_for_vectorstore:
236
+ if os.path.exists(pre_chunked_json_path):
237
+ self.logger.warning("Falling back to processing raw files from the sources directory due to an issue with the pre-chunked JSON.")
238
+ else:
239
+ self.logger.info(f"Pre-chunked JSON not found. Processing raw files from '{source_folder_path}' to build FAISS index...")
240
 
241
+ text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=150)
 
 
 
242
 
243
+ for filename in os.listdir(source_folder_path):
244
+ file_path = os.path.join(source_folder_path, filename)
245
+ if not os.path.isfile(file_path):
246
+ continue
247
 
248
+ file_ext = filename.split('.')[-1].lower()
249
+ if file_ext not in FAISS_RAG_SUPPORTED_EXTENSIONS:
250
+ self.logger.debug(f"Skipping unsupported file: {filename}")
 
251
  continue
252
 
253
+ self.logger.info(f"Processing source file: {filename}")
254
+ text_content = FAISS_RAG_SUPPORTED_EXTENSIONS[file_ext](file_path)
255
+
256
+ if text_content:
257
+ chunks = text_splitter.split_text(text_content)
258
+ if not chunks:
259
+ self.logger.warning(f"No chunks generated from {filename}. Skipping.")
260
+ continue
261
+
262
+ for i, chunk_text in enumerate(chunks):
263
+ metadata = {
264
+ "source_document_name": filename,
265
+ "chunk_index": i,
266
+ "full_location": f"{filename}, Chunk {i+1}"
267
+ }
268
+ doc = Document(page_content=chunk_text, metadata=metadata)
269
+ all_docs_for_vectorstore.append(doc)
270
+ processed_files_this_build.append(filename)
271
+ else:
272
+ self.logger.warning(f"Could not extract text from {filename}. Skipping.")
273
 
274
+ # --- Common logic from here ---
275
  if not all_docs_for_vectorstore:
276
+ raise ValueError(f"No processable documents found (from raw files or pre-chunked JSON) in '{source_folder_path}'. Cannot build index.")
277
 
278
  self.processed_source_files = processed_files_this_build
279
  self.logger.info(f"Created {len(all_docs_for_vectorstore)} Langchain Documents from {len(self.processed_source_files)} source files: {self.processed_source_files}")
 
281
  self.logger.info(f"Creating FAISS index with '{self.embedding_model_name}'...")
282
  try:
283
  self.vector_store = FAISS.from_documents(all_docs_for_vectorstore, self.embeddings)
 
 
284
  faiss_index_path = os.path.join(self.index_storage_dir, RAG_FAISS_INDEX_SUBDIR_NAME)
 
285
 
286
  self.vector_store.save_local(faiss_index_path)
287
+ self.logger.info(f"FAISS index built and saved to '{faiss_index_path}'.")
288
 
289
  self.retriever = FAISSRetrieverWithScore(vectorstore=self.vector_store, k=k)
290
  self.logger.info(f"Retriever initialized with default k={k}.")
 
319
  with open(metadata_file, 'r') as f:
320
  self.processed_source_files = json.load(f)
321
  else:
322
+ # Check for a pre-chunked file to infer source files
323
+ pre_chunked_json_path = os.path.join(self.index_storage_dir, RAG_CHUNKED_SOURCES_FILENAME)
324
+ if os.path.exists(pre_chunked_json_path):
325
+ with open(pre_chunked_json_path, 'r', encoding='utf-8') as f:
326
+ chunk_data_list = json.load(f)
327
+ source_filenames = sorted(list(set(d['metadata']['source_document_name'] for d in chunk_data_list if 'metadata' in d and 'source_document_name' in d['metadata'])))
328
+ self.processed_source_files = source_filenames if source_filenames else ["Index loaded (source list unavailable)"]
329
+ else:
330
+ self.processed_source_files = ["Index loaded (source list unavailable)"]
331
+
332
 
333
  except Exception as e:
334
  self.logger.error(f"Failed to load FAISS index from {faiss_index_path}: {e}", exc_info=True)
 
642
  download_successful = download_and_unzip_gdrive_folder(GDRIVE_FOLDER_ID_OR_URL, RAG_SOURCES_DIR)
643
  if download_successful:
644
  logger.info(f"Successfully populated sources from Google Drive into {RAG_SOURCES_DIR}.")
645
+ logger.info("IMPORTANT: Sources downloaded. If you haven't yet, run chunker.py or use the admin panel's rebuild button to process these new files.")
646
  else:
647
  logger.error("Failed to download sources from Google Drive. RAG system will use local sources if available (or fail if RAG_SOURCES_DIR is empty).")
648
  else:
 
689
  logger.error(f"FAISS RAG: Error loading index from '{faiss_index_actual_path}': {e_load}. Will attempt to build from files in '{RAG_SOURCES_DIR}'.", exc_info=True)
690
 
691
  if not operation_successful:
692
+ logger.info(f"FAISS RAG: Building new index from source data (preferring pre-chunked JSON) in '{RAG_SOURCES_DIR}' (Retriever K = {RAG_DEFAULT_RETRIEVER_K})...")
693
  try:
694
+ # Check for sources (either raw or pre-chunked) before attempting build
695
+ pre_chunked_path = os.path.join(RAG_STORAGE_PARENT_DIR, RAG_CHUNKED_SOURCES_FILENAME)
696
+ if not os.path.exists(pre_chunked_path) and (not os.path.isdir(RAG_SOURCES_DIR) or not os.listdir(RAG_SOURCES_DIR)):
697
+ logger.error(f"FAISS RAG: Neither pre-chunked JSON nor raw source files found. Cannot build index.")
698
+ # Create dummy index to prevent repeated build attempts on startup.
699
  os.makedirs(faiss_index_actual_path, exist_ok=True)
700
  with open(os.path.join(faiss_index_actual_path, "index.faiss"), "w") as f_dummy: f_dummy.write("")
701
  with open(os.path.join(faiss_index_actual_path, "index.pkl"), "w") as f_dummy: f_dummy.write("")
702
+ logger.info("Created dummy index files to prevent repeated build attempts on startup.")
703
  current_rag_instance.processed_source_files = ["No source files found to build index."]
704
+ raise FileNotFoundError(f"Sources directory '{RAG_SOURCES_DIR}' is empty and no pre-chunked JSON found.")
705
 
706
 
707
  current_rag_instance.build_index_from_source_files(
 
713
  json.dump(current_rag_instance.processed_source_files, f)
714
 
715
  operation_successful = True
716
+ logger.info(f"FAISS RAG: Index built successfully from source data and saved.")
717
  except FileNotFoundError as e_fnf:
718
+ logger.critical(f"FATAL: No source data found to build RAG index: {e_fnf}", exc_info=False)
719
  return None
720
  except ValueError as e_val:
721
+ logger.critical(f"FATAL: No processable documents found to build RAG index: {e_val}", exc_info=False)
722
  return None
723
  except Exception as e_build:
724
+ logger.critical(f"FATAL: Failed to build FAISS RAG index from source data: {e_build}", exc_info=True)
725
  return None
726
 
727
  if operation_successful and current_rag_instance.vector_store:
postman_collection 2.json ADDED
@@ -0,0 +1,380 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "info": {
3
+ "_postman_id": "a9e8c1b2-f3d4-4e5f-b6a7-c8d9e0f1a2b3",
4
+ "name": "NOW GE Web-Chat-Bot 2",
5
+ "description": "A comprehensive Postman collection for the Hybrid RAG Chatbot API. It includes endpoints for chat sessions, administrative controls, reporting, and general utilities.\n\n**Setup:**\n1. Import the collection.\n2. Go to the collection's 'Variables' tab.\n3. Ensure `baseUrl` points to your running Flask application (default: http://localhost:5000).\n4. Ensure the credential variables match your `.env` file.",
6
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
7
+ },
8
+ "item": [
9
+ {
10
+ "name": "Core Chat Flow",
11
+ "description": "Contains the primary endpoints for a user's chat session.",
12
+ "item": [
13
+ {
14
+ "name": "1. Create Session",
15
+ "event": [
16
+ {
17
+ "listen": "test",
18
+ "script": {
19
+ "exec": [
20
+ "pm.test(\"Status code is 200 OK\", () => {",
21
+ " pm.response.to.have.status(200);",
22
+ "});",
23
+ "",
24
+ "pm.test(\"Response body is valid JSON\", () => {",
25
+ " pm.response.to.be.json;",
26
+ "});",
27
+ "",
28
+ "pm.test(\"Session ID is received and set as a collection variable\", () => {",
29
+ " const jsonData = pm.response.json();",
30
+ " pm.expect(jsonData.session_id).to.be.a('string').and.to.not.be.empty;",
31
+ " pm.collectionVariables.set(\"sessionId\", jsonData.session_id);",
32
+ " console.log(`Session ID set to: ${jsonData.session_id}`);",
33
+ "});"
34
+ ],
35
+ "type": "text/javascript"
36
+ }
37
+ }
38
+ ],
39
+ "request": {
40
+ "method": "POST",
41
+ "header": [],
42
+ "url": {
43
+ "raw": "{{baseUrl}}/create-session",
44
+ "host": [
45
+ "{{baseUrl}}"
46
+ ],
47
+ "path": [
48
+ "create-session"
49
+ ]
50
+ },
51
+ "description": "Initializes a new chat session on the server and returns a unique `session_id`. This ID is required for all subsequent requests in the chat flow and is automatically stored as a collection variable."
52
+ },
53
+ "response": []
54
+ },
55
+ {
56
+ "name": "2. Send Chat Message",
57
+ "event": [
58
+ {
59
+ "listen": "test",
60
+ "script": {
61
+ "exec": [
62
+ "pm.test(\"Status code is 200 OK\", () => {",
63
+ " pm.response.to.have.status(200);",
64
+ "});",
65
+ "",
66
+ "pm.test(\"Response body is valid JSON\", () => {",
67
+ " pm.response.to.be.json;",
68
+ "});",
69
+ "",
70
+ "pm.test(\"Response contains an 'answer' and a 'source'\", () => {",
71
+ " const jsonData = pm.response.json();",
72
+ " pm.expect(jsonData.answer).to.be.a('string');",
73
+ " pm.expect(jsonData.source).to.be.a('string');",
74
+ " pm.expect(jsonData.related_questions).to.be.an('array');",
75
+ "});"
76
+ ],
77
+ "type": "text/javascript"
78
+ }
79
+ }
80
+ ],
81
+ "request": {
82
+ "method": "POST",
83
+ "header": [],
84
+ "body": {
85
+ "mode": "raw",
86
+ "raw": "{\n // The user's question to the chatbot.\n \"query\": \"what is a class k fire?\",\n\n // (Optional) The ID of the user, used for retrieving personalized answers.\n \"user_id\": \"user_postman_007\",\n\n // The session ID obtained from the 'Create Session' request.\n \"session_id\": \"{{sessionId}}\"\n}",
87
+ "options": {
88
+ "raw": {
89
+ "language": "json"
90
+ }
91
+ }
92
+ },
93
+ "url": {
94
+ "raw": "{{baseUrl}}/chat-bot",
95
+ "host": [
96
+ "{{baseUrl}}"
97
+ ],
98
+ "path": [
99
+ "chat-bot"
100
+ ]
101
+ },
102
+ "description": "The main endpoint for interacting with the chatbot. It sends the user's query and the current session ID to get a response from the hybrid RAG system."
103
+ },
104
+ "response": []
105
+ },
106
+ {
107
+ "name": "3. Clear Session History",
108
+ "event": [
109
+ {
110
+ "listen": "test",
111
+ "script": {
112
+ "exec": [
113
+ "pm.test(\"Status code is 200 OK\", () => {",
114
+ " pm.response.to.have.status(200);",
115
+ "});",
116
+ "",
117
+ "pm.test(\"Response confirms history was cleared\", () => {",
118
+ " const jsonData = pm.response.json();",
119
+ " pm.expect(jsonData.message).to.equal(\"History cleared\");",
120
+ "});"
121
+ ],
122
+ "type": "text/javascript"
123
+ }
124
+ }
125
+ ],
126
+ "request": {
127
+ "method": "POST",
128
+ "header": [],
129
+ "body": {
130
+ "mode": "raw",
131
+ "raw": "{\n \"session_id\": \"{{sessionId}}\"\n}",
132
+ "options": {
133
+ "raw": {
134
+ "language": "json"
135
+ }
136
+ }
137
+ },
138
+ "url": {
139
+ "raw": "{{baseUrl}}/clear-history",
140
+ "host": [
141
+ "{{baseUrl}}"
142
+ ],
143
+ "path": [
144
+ "clear-history"
145
+ ]
146
+ },
147
+ "description": "Clears the conversation history for the current session on the server side. This allows for a fresh conversation context without needing to create a new session."
148
+ },
149
+ "response": []
150
+ }
151
+ ]
152
+ },
153
+ {
154
+ "name": "Admin Endpoints",
155
+ "description": "Administrative endpoints for monitoring and managing the application's backend systems. All requests in this folder require Admin Basic Auth.",
156
+ "item": [
157
+ {
158
+ "name": "Get FAISS RAG Status",
159
+ "request": {
160
+ "method": "GET",
161
+ "header": [],
162
+ "url": {
163
+ "raw": "{{baseUrl}}/admin/faiss_rag_status",
164
+ "host": [
165
+ "{{baseUrl}}"
166
+ ],
167
+ "path": [
168
+ "admin",
169
+ "faiss_rag_status"
170
+ ]
171
+ },
172
+ "description": "Retrieves the current status of the FAISS RAG system, including the embedding model, LLM model, number of indexed vectors, and list of processed source files."
173
+ },
174
+ "response": []
175
+ },
176
+ {
177
+ "name": "Rebuild FAISS RAG Index",
178
+ "request": {
179
+ "method": "POST",
180
+ "header": [],
181
+ "url": {
182
+ "raw": "{{baseUrl}}/admin/rebuild_faiss_index",
183
+ "host": [
184
+ "{{baseUrl}}"
185
+ ],
186
+ "path": [
187
+ "admin",
188
+ "rebuild_faiss_index"
189
+ ]
190
+ },
191
+ "description": "Triggers a full, two-step rebuild of the FAISS knowledge base.\n\n1. **Chunking:** Runs `chunker.py` to extract text from all documents in the `/sources` folder and saves the raw text and chunked JSON.\n2. **Indexing:** Deletes the old FAISS index and builds a new one from the freshly chunked data.\n\n**Note:** This can be a long-running and resource-intensive process, depending on the number and size of source documents."
192
+ },
193
+ "response": []
194
+ },
195
+ {
196
+ "name": "Get Personal DB Status",
197
+ "request": {
198
+ "method": "GET",
199
+ "header": [],
200
+ "url": {
201
+ "raw": "{{baseUrl}}/db/status",
202
+ "host": [
203
+ "{{baseUrl}}"
204
+ ],
205
+ "path": [
206
+ "db",
207
+ "status"
208
+ ]
209
+ },
210
+ "description": "Checks the status of the `DatabaseMonitor`, which watches the `database.csv` file for real-time changes to provide personalized answers."
211
+ },
212
+ "response": []
213
+ }
214
+ ],
215
+ "auth": {
216
+ "type": "basic",
217
+ "basic": [
218
+ {
219
+ "key": "password",
220
+ "value": "{{adminPassword}}",
221
+ "type": "string"
222
+ },
223
+ {
224
+ "key": "username",
225
+ "value": "{{adminUsername}}",
226
+ "type": "string"
227
+ }
228
+ ]
229
+ }
230
+ },
231
+ {
232
+ "name": "Reporting",
233
+ "description": "Endpoints for generating and downloading reports. Requires special report credentials.",
234
+ "item": [
235
+ {
236
+ "name": "Download Chat History Report",
237
+ "event": [
238
+ {
239
+ "listen": "test",
240
+ "script": {
241
+ "exec": [
242
+ "pm.test(\"Status code is 200 (OK) or 404 (Not Found)\", () => {",
243
+ " pm.expect(pm.response.code).to.be.oneOf([200, 404]);",
244
+ "});",
245
+ "",
246
+ "if (pm.response.code === 200) {",
247
+ " pm.test(\"Content-Type header is text/csv\", () => {",
248
+ " pm.response.to.have.header(\"Content-Type\", \"text/csv\");",
249
+ " });",
250
+ " pm.test(\"Content-Disposition header suggests a download\", () => {",
251
+ " pm.expect(pm.response.headers.get('Content-Disposition')).to.include('attachment;');",
252
+ " });",
253
+ "}"
254
+ ],
255
+ "type": "text/javascript"
256
+ }
257
+ }
258
+ ],
259
+ "request": {
260
+ "method": "GET",
261
+ "header": [],
262
+ "url": {
263
+ "raw": "{{baseUrl}}/report",
264
+ "host": [
265
+ "{{baseUrl}}"
266
+ ],
267
+ "path": [
268
+ "report"
269
+ ]
270
+ },
271
+ "description": "Downloads the complete chat history log (`chat_history.csv`) as a CSV file. This endpoint is protected by a different password than the other admin endpoints."
272
+ },
273
+ "response": []
274
+ }
275
+ ],
276
+ "auth": {
277
+ "type": "basic",
278
+ "basic": [
279
+ {
280
+ "key": "password",
281
+ "value": "{{reportPassword}}",
282
+ "type": "string"
283
+ },
284
+ {
285
+ "key": "username",
286
+ "value": "{{adminUsername}}",
287
+ "type": "string"
288
+ }
289
+ ]
290
+ }
291
+ },
292
+ {
293
+ "name": "Utility",
294
+ "description": "General application utility endpoints.",
295
+ "item": [
296
+ {
297
+ "name": "Get Version",
298
+ "event": [
299
+ {
300
+ "listen": "test",
301
+ "script": {
302
+ "exec": [
303
+ "pm.test(\"Status code is 200 OK\", () => {",
304
+ " pm.response.to.have.status(200);",
305
+ "});",
306
+ "",
307
+ "pm.test(\"Response contains a 'version' string\", () => {",
308
+ " const jsonData = pm.response.json();",
309
+ " pm.expect(jsonData.version).to.be.a('string').and.to.not.be.empty;",
310
+ "});"
311
+ ],
312
+ "type": "text/javascript"
313
+ }
314
+ }
315
+ ],
316
+ "request": {
317
+ "method": "GET",
318
+ "header": [],
319
+ "url": {
320
+ "raw": "{{baseUrl}}/version",
321
+ "host": [
322
+ "{{baseUrl}}"
323
+ ],
324
+ "path": [
325
+ "version"
326
+ ]
327
+ },
328
+ "description": "Retrieves the current version string of the running application."
329
+ },
330
+ "response": []
331
+ },
332
+ {
333
+ "name": "Load Chat Interface (Index)",
334
+ "request": {
335
+ "method": "GET",
336
+ "header": [],
337
+ "url": {
338
+ "raw": "{{baseUrl}}/",
339
+ "host": [
340
+ "{{baseUrl}}"
341
+ ],
342
+ "path": [
343
+ ""
344
+ ]
345
+ },
346
+ "description": "Accesses the root URL to load the `chat-bot.html` front-end interface, if it exists in the `templates` folder."
347
+ },
348
+ "response": []
349
+ }
350
+ ]
351
+ }
352
+ ],
353
+ "variable": [
354
+ {
355
+ "key": "baseUrl",
356
+ "value": "http://localhost:5000",
357
+ "description": "The base URL of the running Flask application. Change the port if necessary."
358
+ },
359
+ {
360
+ "key": "sessionId",
361
+ "value": "",
362
+ "description": "This variable is automatically populated by the '1. Create Session' request. Do not edit manually."
363
+ },
364
+ {
365
+ "key": "adminUsername",
366
+ "value": "fleetblox",
367
+ "description": "The username for accessing administrative endpoints."
368
+ },
369
+ {
370
+ "key": "adminPassword",
371
+ "value": "fleetblox",
372
+ "description": "The password for accessing administrative endpoints."
373
+ },
374
+ {
375
+ "key": "reportPassword",
376
+ "value": "e$$!@2213r423er31",
377
+ "description": "The specific password required for downloading the chat history report."
378
+ }
379
+ ]
380
+ }
requirements.txt CHANGED
@@ -19,10 +19,11 @@ llama_index.llms.groq==0.3.1
19
  sentence_transformers==3.4.0
20
  gunicorn
21
  llama-index-embeddings-huggingface==0.5.4
22
- onnxruntime
23
- langchain-groq
24
  python-docx==1.1.2
25
  langchain_community==0.3.23
26
- requests
27
- gdown
 
28
  # must install https://aka.ms/vs/17/release/vc_redist.x64.exe
 
19
  sentence_transformers==3.4.0
20
  gunicorn
21
  llama-index-embeddings-huggingface==0.5.4
22
+ onnxruntime==1.22.0
23
+ langchain-groq==0.3.2
24
  python-docx==1.1.2
25
  langchain_community==0.3.23
26
+ requests==2.32.3
27
+ gdown==5.2.0
28
+ pymupdf==1.25.5
29
  # must install https://aka.ms/vs/17/release/vc_redist.x64.exe
sources/AMO GE - Company Summary.txt ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ AMO Green Energy Ltd
2
+ A leading name in comprehensive fire safety solutions in Bangladesh. A sister concern of Noman Group, largest vertically integrated textile mills group in Bangladesh, highest exporter in all categories consecutively for 13 years and counting. We specialize in delivering�end-to-end fire protection and detection systems�from design and supply to installation, testing, commissioning, and maintenance.
3
+ We are also the�authorized distributor of NAFFCO, a globally recognized brand from Dubai in fire protection equipment, allowing us to offer internationally certified products that meet the highest safety standards.
4
+ Our mission is to be your�one-stop service provider for all fire safety needs, ensuring safety & reliability.
5
+
6
+ Our products & services:
7
+ 1. Fire Fighting Equipment
8
+ I. Fire Extinguishers
9
+ II. Fire Hose Reel & Accessories
10
+ III. Fire Hoses & Accessories
11
+ IV. Fire Cabinets
12
+ V. Valves and Riser Equipment
13
+ VI. Fire Hydrants
14
+ VII. Fire Blankets
15
+ 2. Fire Pump & controllers
16
+ I. Fire Pump Products
17
+ II. Pump House Unit
18
+ III. Industrial Packaged Pumpset
19
+ IV. Advanced Fire Pump Solutions
20
+ 3. Flood Control Solutions
21
+
22
+ I. All-Terrain Flood Control Vehicle
23
+ II. Flood Rescue Truck
24
+ III. Inflatable Flood Barrier Hose
25
+ IV. Customized Water Pumps
26
+ V. Water Rescue Drone
27
+
28
+ 4. Fire Doors
29
+
30
+ I. Fire Rated Doors
31
+ II. Glazing System
32
+ III. Fire & Smoke Curtain
33
+ IV. Blast Doors
34
+ V. Security Doors
35
+ VI. Security Doors
36
+ VII. Rolling Shutters
37
+ VIII. Access Doors
38
+
39
+ 5. Extra Low Voltage
40
+ I. TRIGA
41
+ 6. Fire Protection system
42
+ I. Gas Based System
43
+ II. Aerosol System
44
+ 7. ELV Integrated System
45
+ I. Security Systems
46
+ II. ICT (Information & Communication Technology)
47
+ III. Audio Visuals
48
+ IV. Special systems
49
+ 8. Foam Equipment & Concentrates
50
+
51
+ I. Foam Concentrates
52
+ II. Foam Equipment
53
+
54
+ 9. Smoke Management System
55
+ I. Fans
56
+ II. Fire Ducts & dampers
57
+ III. Natural Smoke Vents
58
+ IV. Fire & Smoke Curtains
59
+ V. Starter Panels
60
+ VI. Smoke Control stations
61
+ VII. Smoke, CO & Nox Detectors
62
+ VIII. Electrostatic Precitator
63
+ IX. Solutions
64
+ 10. Training
65
+
66
+ I. NFPA Training
67
+ II. HSE Training
68
+ III. Medical, First Aid
69
+ IV. Firefighting Training Courses
70
+
71
+ 11. Safety & Rescue
72
+ I. Firefighter Equipment
73
+ II. Industrial
74
+ 12. Safety Signs
75
+ I. Evacuation Plan
76
+ II. Escape Route Signs
77
+ III. Fire Fighting Equipment Signs
78
+ IV. Warning Signs
79
+ V. Mandatory Signs
80
+ VI. Prohibition Signs
81
+ VII. Low Location Lighting
82
+ VIII. Traffic Signs
83
+ IX. Tunnel Signs
84
+ X. Building Signs
85
+ Clients of AMO Green Energy Ltd
86
+
87
+ Our clients (Industrial):
88
+ BRB Cable Industries Ltd, Knit Plus Ltd, Paramount Textile Ltd, BRB VCV Tower, LIZ Complex Ltd, Nassa Knit Ltd, Nassa Basic Complex Ltd, MNC Apparels Ltd, Zaber & Zubair Fabrics Ltd, Nassa Spinners & Garments Ltd, Nassa Supreme Wash Ltd, Shah Fatehullah Textile Mills Limited, AJ Super Garments Ltd, Nassa Taipei Textile Mills Ltd, Noman Terry Towel Mills Ltd, Nassa Diamond, Nassa Taipei Denims Ltd, Toy Woods (BD) Co. Ltd, Nassa Super Garments Ltd, Nassa Super Wash Ltd, Agami Apparels Ltd. (Dekko Legacy Group), Dekko Designs Ltd. (Dekko Legacy Group), United Lube Oil Limited, Utah Fashions Limited, Utah knitting & Dyeing Ltd, Youngone Corporation, Sparkle Knit Composite Ltd,
89
+ Our Clients (Hospitals):
90
+ United Hospital Limited, Dr. Fazlul Haque Colorectal Hospital Ltd, Nassa International Cancer & General Hospital Limited.
91
+ Our Clients (Hotels):
92
+ Bay Hills Hotel (Goldsands Group), IPCO Hotels Limited (United Group)
93
+
94
+ Our Clients (Commercial):
95
+
96
+ Unimart Limited-Gulshan (United Group), Unimart Limited-Sylhet (United Group)
97
+ Our Clients (Commercial-Aviation):
98
+
99
+ Hangar - Dhaka Airport
100
+
101
+ Contact information:
102
+ Email: �[email protected] Phone: �+880 1781-469951 Website: ge-bd.com
sources/NAFFCO - IndustrialCatalog_Bangladesh.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e55b402f578d206c206614a2f63102e2156b99c8d6232b08f90fdcd42ca8d5f
3
+ size 79209059
sources/NAFFCO Company Profile -2023.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67aadbe9ed2be68d656dcd5b48d8a5b19e5454e138dbf4b7c9dac17c835620fd
3
+ size 5914167
sources/NFPA 1, 2009 Edition.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a27d4cb4f75f5af5b2c8ad366f49835ee8a537ae4234801d51bfa02a2a256b0
3
+ size 10119836
sources/NFPA 10, 2010 Edition.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:08273add0b98fe34bdaf94887f02b552e396f6302c654f44602065c5652d0997
3
+ size 1479853
sources/NFPA 101, 2012 Edition.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a867eb1d24c1ce41d49351f092e4f85f51fc912b436bc5f562c23df8622bf92
3
+ size 9578628
sources/NFPA 13, 2013 Edition.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cec86d77894cb3df983e12883ee16530562c7564f947ffc79e22d4a838f6e394
3
+ size 13409767
sources/NFPA 14, 2013 Edition.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03706b240fa85ab52eb5c5c5df1a7fb22f1145722d48535e5671c52cc6063dff
3
+ size 2082405
sources/NFPA 20 -2019.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:83f11a74993ce48e3f0af1a179b111c66f14bccb86b8a22ba6f83c2ec41e993a
3
+ size 3132162
sources/NFPA 25, 2011 Edition.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9429c21ed4f3cfbeeed371d9f1e80a0de711182b12ab108117e99bc80ad4a1f8
3
+ size 5003410
sources/NFPA 72, 2013 Edition.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5fe82f7c47789292120cf0d58310b80fbea825fa023fd94097437e50484c7528
3
+ size 7331786
sources/Top Project List - AMO Green Energy Limited_Sep-2023.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ace635420c562571a42ec95eab0ebd9958ac0a7f787dc0703241ea75c7cd5e15
3
+ size 152910
templates/chat-bot.html ADDED
@@ -0,0 +1,431 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>Personal Assistant ChatBot</title>
6
+ <link href="https://fonts.googleapis.com/css?family=Roboto:400,500" rel="stylesheet">
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
8
+ <style>
9
+ :root {
10
+ --primary-color: #2c3e50;
11
+ --secondary-color: #3498db;
12
+ --bot-message-color: #f8f9fa;
13
+ --user-message-color: #e3f2fd;
14
+ }
15
+
16
+ body {
17
+ background-color: #f4f7f9;
18
+ font-family: 'Roboto', sans-serif;
19
+ margin: 0;
20
+ padding: 20px;
21
+ }
22
+
23
+ .chat-container {
24
+ max-width: 1000px;
25
+ height: 80vh;
26
+ margin: 30px auto;
27
+ background: rgba(255, 255, 255, 0.95);
28
+ backdrop-filter: blur(10px);
29
+ border-radius: 15px;
30
+ box-shadow: 0 8px 30px rgba(0,0,0,0.12);
31
+ display: flex;
32
+ flex-direction: column;
33
+ overflow: hidden;
34
+ }
35
+
36
+ .chat-header {
37
+ background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
38
+ color: #fff;
39
+ padding: 20px;
40
+ text-align: center;
41
+ }
42
+
43
+ .chat-header h2 {
44
+ margin: 0;
45
+ font-size: 24px;
46
+ }
47
+
48
+ /* Removed .user-info styles */
49
+
50
+ .chat-status {
51
+ background: #fff;
52
+ padding: 10px;
53
+ border-bottom: 1px solid #eee;
54
+ }
55
+
56
+ .connection-status {
57
+ display: flex;
58
+ align-items: center;
59
+ gap: 5px;
60
+ font-size: 14px;
61
+ color: #666;
62
+ }
63
+
64
+ .status-indicator {
65
+ width: 8px;
66
+ height: 8px;
67
+ background: #2ecc71;
68
+ border-radius: 50%;
69
+ }
70
+
71
+ /* Removed .login-form styles */
72
+ /* Removed .login-form input styles */
73
+ /* Removed .login-form button styles (partially, if .user-info button was different) */
74
+ /* Removed .subscription-dropdown styles */
75
+
76
+
77
+ .chat-messages {
78
+ flex: 1;
79
+ padding: 20px;
80
+ overflow-y: auto;
81
+ display: none; /* Will be set to block by JS */
82
+ }
83
+
84
+ .message {
85
+ margin-bottom: 20px;
86
+ display: flex;
87
+ align-items: flex-start;
88
+ }
89
+
90
+ .message.user .message-content {
91
+ background-color: var(--user-message-color);
92
+ margin-left: auto;
93
+ border-right: 4px solid var(--primary-color);
94
+ }
95
+
96
+ .message.bot .message-content {
97
+ background-color: var(--bot-message-color);
98
+ border-left: 4px solid var(--secondary-color);
99
+ }
100
+
101
+ .message-content {
102
+ max-width: 70%;
103
+ padding: 15px;
104
+ border-radius: 12px;
105
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
106
+ }
107
+
108
+ .original-question {
109
+ font-weight: 500;
110
+ color: var(--secondary-color);
111
+ margin-bottom: 8px;
112
+ }
113
+
114
+ .confidence-indicator {
115
+ font-size: 12px;
116
+ color: #666;
117
+ margin-top: 8px;
118
+ }
119
+
120
+ .chat-input {
121
+ display: none; /* Will be set to flex by JS */
122
+ padding: 20px;
123
+ background: #fff;
124
+ border-top: 1px solid #eee;
125
+ }
126
+
127
+ .chat-input textarea {
128
+ flex: 1;
129
+ padding: 15px;
130
+ border: 2px solid #eee;
131
+ border-radius: 8px;
132
+ resize: none;
133
+ font-size: 16px;
134
+ margin-right: 10px;
135
+ min-height: 24px;
136
+ max-height: 150px;
137
+ }
138
+
139
+ .chat-input textarea:focus {
140
+ border-color: var(--secondary-color);
141
+ outline: none;
142
+ }
143
+
144
+ .chat-input button {
145
+ background-color: var(--secondary-color);
146
+ color: #fff;
147
+ border: none;
148
+ padding: 15px 25px;
149
+ border-radius: 8px;
150
+ cursor: pointer;
151
+ transition: background-color 0.3s;
152
+ }
153
+
154
+ .chat-input button:hover {
155
+ background-color: #2980b9;
156
+ }
157
+
158
+ .suggestions {
159
+ margin-top: 15px;
160
+ display: flex;
161
+ flex-wrap: wrap;
162
+ gap: 8px;
163
+ }
164
+
165
+ .suggestion-button {
166
+ background-color: #f8f9fa;
167
+ border: 1px solid #e9ecef;
168
+ padding: 8px 15px;
169
+ border-radius: 20px;
170
+ cursor: pointer;
171
+ font-size: 14px;
172
+ transition: all 0.3s;
173
+ }
174
+
175
+ .suggestion-button:hover {
176
+ background-color: var(--secondary-color);
177
+ color: #fff;
178
+ }
179
+
180
+ .message img {
181
+ max-width: 100%;
182
+ border-radius: 10px;
183
+ margin-top: 10px;
184
+ }
185
+
186
+ .typing-indicator {
187
+ display: flex;
188
+ padding: 15px;
189
+ gap: 4px;
190
+ }
191
+
192
+ .typing-indicator span {
193
+ height: 8px;
194
+ width: 8px;
195
+ background: var(--secondary-color);
196
+ border-radius: 50%;
197
+ animation: bounce 1.3s linear infinite;
198
+ }
199
+
200
+ @keyframes bounce {
201
+ 0%, 60%, 100% { transform: translateY(0); }
202
+ 30% { transform: translateY(-8px); }
203
+ }
204
+
205
+ /* .subscription-dropdown style was here, now removed */
206
+ </style>
207
+ </head>
208
+ <body>
209
+
210
+ <div class="chat-container">
211
+ <div class="chat-header">
212
+ <h2>Personal Assistant ChatBot</h2>
213
+ <!-- Removed user-info div -->
214
+ </div>
215
+
216
+ <div class="chat-status">
217
+ <div class="connection-status">
218
+ <span class="status-indicator"></span>
219
+ <span class="status-text">Connected</span>
220
+ </div>
221
+ </div>
222
+
223
+ <!-- Removed login-form div -->
224
+
225
+ <div class="chat-messages" id="chat-messages"></div>
226
+
227
+ <div class="chat-input">
228
+ <textarea id="user-input" placeholder="Type your message here..." rows="1"></textarea>
229
+ <button id="send-button"><i class="fas fa-paper-plane"></i></button>
230
+ </div>
231
+ </div>
232
+
233
+ <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
234
+ <script src="https://unpkg.com/[email protected]/dist/autosize.min.js"></script>
235
+ <script>
236
+ autosize(document.querySelectorAll('textarea'));
237
+
238
+ const sendButton = document.getElementById('send-button');
239
+ const userInput = document.getElementById('user-input');
240
+ const chatMessages = document.getElementById('chat-messages');
241
+ // const subscriptionDropdown = document.getElementById('subscription-dropdown'); // Removed
242
+ let currentUserId = null; // User ID will be null as login is removed
243
+ let sessionId = null;
244
+
245
+ async function initializeChat() {
246
+ try {
247
+ const sessionResponse = await axios.post('/create-session');
248
+ sessionId = sessionResponse.data.session_id;
249
+ console.log("Chat session initialized:", sessionId);
250
+
251
+ // Make chat visible now that session is created
252
+ document.getElementById('chat-messages').style.display = 'block';
253
+ document.querySelector('.chat-input').style.display = 'flex';
254
+ userInput.disabled = false;
255
+ sendButton.disabled = false;
256
+
257
+ loadChatHistory();
258
+ } catch (error) {
259
+ console.error('Error creating session:', error);
260
+ appendMessage('bot', 'Failed to initialize chat session. Please refresh the page.');
261
+ // Optionally disable input if session creation fails
262
+ userInput.disabled = true;
263
+ sendButton.disabled = true;
264
+ }
265
+ }
266
+
267
+ // Removed login() function
268
+ // Removed logout() function
269
+
270
+ async function clearHistory() {
271
+ if (!sessionId) {
272
+ alert('No active session to clear.');
273
+ return;
274
+ }
275
+
276
+ try {
277
+ await axios.post('/clear-history', { session_id: sessionId });
278
+ chatMessages.innerHTML = '';
279
+ appendMessage('bot', 'Chat history for this session has been cleared.'); // Provide feedback
280
+ } catch (error) {
281
+ console.error('Error clearing history:', error);
282
+ alert('Failed to clear history. Please try again.');
283
+ }
284
+ }
285
+
286
+ async function loadChatHistory() {
287
+ if (!sessionId) return; // Only check for sessionId
288
+
289
+ try {
290
+ const response = await axios.get(`/chat-history?session_id=${sessionId}&limit=10`);
291
+ const history = response.data.history;
292
+
293
+ chatMessages.innerHTML = ''; // Clear existing messages before loading history
294
+ history.forEach(entry => {
295
+ appendMessage('user', entry.query);
296
+ if (entry.response && entry.response.answer) { // Check if response and answer exist
297
+ appendMessage('bot', entry.response.answer, entry.response.image_url);
298
+ } else if (entry.response && entry.response.message) { // Handle cases where it might be just a message
299
+ appendMessage('bot', entry.response.message);
300
+ }
301
+ });
302
+ } catch (error) {
303
+ console.error('Error loading chat history:', error);
304
+ // appendMessage('bot', 'Could not load previous chat history.'); // Optional user feedback
305
+ }
306
+ }
307
+
308
+ function showTypingIndicator() {
309
+ const indicator = document.createElement('div');
310
+ indicator.className = 'typing-indicator';
311
+ indicator.innerHTML = `
312
+ <span></span>
313
+ <span style="animation-delay: 0.2s"></span>
314
+ <span style="animation-delay: 0.4s"></span>
315
+ `;
316
+ chatMessages.appendChild(indicator);
317
+ chatMessages.scrollTop = chatMessages.scrollHeight;
318
+ }
319
+
320
+ function hideTypingIndicator() {
321
+ const indicator = document.querySelector('.typing-indicator');
322
+ if (indicator) {
323
+ indicator.remove();
324
+ }
325
+ }
326
+
327
+ function appendMessage(sender, text, imageUrl = null, suggestions = []) {
328
+ const messageElement = document.createElement('div');
329
+ messageElement.classList.add('message', sender);
330
+
331
+ const messageContent = document.createElement('div');
332
+ messageContent.classList.add('message-content');
333
+ messageContent.innerHTML = text.replace(/(\\n|\r\n|\n|\r)/g, '<br>');
334
+
335
+ if (imageUrl) {
336
+ const imageElement = document.createElement('img');
337
+ imageElement.src = imageUrl;
338
+ messageContent.appendChild(imageElement);
339
+ }
340
+
341
+ if (suggestions.length > 0) {
342
+ const suggestionsContainer = document.createElement('div');
343
+ suggestionsContainer.classList.add('suggestions');
344
+
345
+ suggestions.forEach(suggestion => {
346
+ const button = document.createElement('button');
347
+ button.classList.add('suggestion-button');
348
+ button.textContent = suggestion.question;
349
+ button.addEventListener('click', function() {
350
+ userInput.value = suggestion.question;
351
+ sendMessage();
352
+ });
353
+ suggestionsContainer.appendChild(button);
354
+ });
355
+
356
+ messageContent.appendChild(suggestionsContainer);
357
+ }
358
+
359
+ messageElement.appendChild(messageContent);
360
+ chatMessages.appendChild(messageElement);
361
+ chatMessages.scrollTop = chatMessages.scrollHeight;
362
+ }
363
+
364
+ async function sendMessage() {
365
+ if (!sessionId) {
366
+ alert('Session not initialized. Please refresh the page.');
367
+ return;
368
+ }
369
+
370
+ const message = userInput.value.trim();
371
+ if (message === '') return;
372
+
373
+ appendMessage('user', message);
374
+ userInput.value = '';
375
+ autosize.update(userInput);
376
+
377
+ showTypingIndicator();
378
+
379
+ try {
380
+ const response = await axios.post('/chat-bot', {
381
+ query: message,
382
+ user_id: currentUserId, // Will be null
383
+ session_id: sessionId
384
+ // subscription field removed
385
+ });
386
+
387
+ hideTypingIndicator();
388
+ const data = response.data;
389
+
390
+ if (data.answer) {
391
+ let botMessage = data.answer;
392
+
393
+ if (data.original_question) {
394
+ botMessage = `<div class="original-question">${data.original_question}</div>${botMessage}`;
395
+ }
396
+
397
+ if (data.confidence) {
398
+ botMessage += `<div class="confidence-indicator">Confidence: ${Math.round(data.confidence)}%</div>`;
399
+ }
400
+
401
+ appendMessage('bot', botMessage, data.image_url);
402
+
403
+ if (data.related_questions && data.related_questions.length > 0) {
404
+ appendMessage('bot', 'Related questions:', null, data.related_questions);
405
+ }
406
+ } else if (data.message) {
407
+ appendMessage('bot', data.message);
408
+ if (data.related_questions && data.related_questions.length > 0) { // Ensure this path also checks for suggestions
409
+ appendMessage('bot', 'Similar questions:', null, data.related_questions);
410
+ }
411
+ }
412
+ } catch (error) {
413
+ hideTypingIndicator();
414
+ console.error('Error:', error);
415
+ appendMessage('bot', 'Sorry, there was an error processing your request. Please try again.');
416
+ }
417
+ }
418
+
419
+ sendButton.addEventListener('click', sendMessage);
420
+ userInput.addEventListener('keypress', function(e) {
421
+ if (e.key === 'Enter' && !e.shiftKey) {
422
+ e.preventDefault();
423
+ sendMessage();
424
+ }
425
+ });
426
+
427
+ // Initialize chat on page load
428
+ window.onload = initializeChat;
429
+ </script>
430
+ </body>
431
+ </html>
templates/chat-bot_live.html ADDED
@@ -0,0 +1,463 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>Personal Assistant ChatBot</title>
6
+ <link href="https://fonts.googleapis.com/css?family=Roboto:400,500" rel="stylesheet">
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
8
+ <style>
9
+ :root {
10
+ --primary-color: #2c3e50;
11
+ --secondary-color: #3498db;
12
+ --bot-message-color: #f8f9fa;
13
+ --user-message-color: #e3f2fd;
14
+ }
15
+
16
+ body {
17
+ background-color: #f4f7f9;
18
+ font-family: 'Roboto', sans-serif;
19
+ margin: 0;
20
+ padding: 20px;
21
+ }
22
+
23
+ .chat-container {
24
+ max-width: 1000px;
25
+ height: 80vh;
26
+ margin: 30px auto;
27
+ background: rgba(255, 255, 255, 0.95);
28
+ backdrop-filter: blur(10px);
29
+ border-radius: 15px;
30
+ box-shadow: 0 8px 30px rgba(0,0,0,0.12);
31
+ display: flex;
32
+ flex-direction: column;
33
+ overflow: hidden;
34
+ }
35
+
36
+ .chat-header {
37
+ background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
38
+ color: #fff;
39
+ padding: 20px;
40
+ text-align: center;
41
+ }
42
+
43
+ .chat-header h2 {
44
+ margin: 0;
45
+ font-size: 24px;
46
+ }
47
+
48
+ .chat-status {
49
+ background: #fff;
50
+ padding: 10px;
51
+ border-bottom: 1px solid #eee;
52
+ }
53
+
54
+ .connection-status {
55
+ display: flex;
56
+ align-items: center;
57
+ gap: 5px;
58
+ font-size: 14px;
59
+ color: #666;
60
+ }
61
+
62
+ .status-indicator {
63
+ width: 8px;
64
+ height: 8px;
65
+ background: #2ecc71; /* Green for connected */
66
+ border-radius: 50%;
67
+ }
68
+ .status-indicator.error {
69
+ background: #e74c3c; /* Red for error */
70
+ }
71
+
72
+
73
+ .chat-messages {
74
+ flex: 1;
75
+ padding: 20px;
76
+ overflow-y: auto;
77
+ display: none; /* Will be set to block by JS */
78
+ }
79
+
80
+ .message {
81
+ margin-bottom: 20px;
82
+ display: flex;
83
+ align-items: flex-start;
84
+ }
85
+
86
+ .message.user .message-content {
87
+ background-color: var(--user-message-color);
88
+ margin-left: auto;
89
+ border-right: 4px solid var(--primary-color);
90
+ }
91
+
92
+ .message.bot .message-content {
93
+ background-color: var(--bot-message-color);
94
+ border-left: 4px solid var(--secondary-color);
95
+ }
96
+
97
+ .message-content {
98
+ max-width: 70%;
99
+ padding: 15px;
100
+ border-radius: 12px;
101
+ box-shadow: 0 2px 10px rgba(0,0,0,0.1);
102
+ word-wrap: break-word; /* Added for better text wrapping */
103
+ }
104
+
105
+ .original-question {
106
+ font-weight: 500;
107
+ color: var(--secondary-color);
108
+ margin-bottom: 8px;
109
+ padding: 5px;
110
+ background-color: #ecf0f1;
111
+ border-radius: 4px;
112
+ font-size: 0.9em;
113
+ }
114
+
115
+ .confidence-indicator {
116
+ font-size: 12px;
117
+ color: #666;
118
+ margin-top: 8px;
119
+ }
120
+
121
+ .chat-input {
122
+ display: none; /* Will be set to flex by JS */
123
+ padding: 20px;
124
+ background: #fff;
125
+ border-top: 1px solid #eee;
126
+ }
127
+
128
+ .chat-input textarea {
129
+ flex: 1;
130
+ padding: 15px;
131
+ border: 2px solid #eee;
132
+ border-radius: 8px;
133
+ resize: none;
134
+ font-size: 16px;
135
+ margin-right: 10px;
136
+ min-height: 24px; /* For single line initial state */
137
+ max-height: 150px; /* Limit growth */
138
+ line-height: 1.4; /* Improved readability */
139
+ }
140
+
141
+ .chat-input textarea:focus {
142
+ border-color: var(--secondary-color);
143
+ outline: none;
144
+ }
145
+
146
+ .chat-input button {
147
+ background-color: var(--secondary-color);
148
+ color: #fff;
149
+ border: none;
150
+ padding: 15px 25px;
151
+ border-radius: 8px;
152
+ cursor: pointer;
153
+ transition: background-color 0.3s;
154
+ display: flex; /* For icon centering */
155
+ align-items: center; /* For icon centering */
156
+ justify-content: center; /* For icon centering */
157
+ }
158
+
159
+ .chat-input button:hover {
160
+ background-color: #2980b9;
161
+ }
162
+ .chat-input button:disabled {
163
+ background-color: #bdc3c7;
164
+ cursor: not-allowed;
165
+ }
166
+
167
+ .suggestions {
168
+ margin-top: 15px;
169
+ display: flex;
170
+ flex-wrap: wrap;
171
+ gap: 8px;
172
+ }
173
+
174
+ .suggestion-button {
175
+ background-color: #f8f9fa;
176
+ border: 1px solid #e9ecef;
177
+ padding: 8px 15px;
178
+ border-radius: 20px;
179
+ cursor: pointer;
180
+ font-size: 14px;
181
+ transition: all 0.3s;
182
+ }
183
+
184
+ .suggestion-button:hover {
185
+ background-color: var(--secondary-color);
186
+ color: #fff;
187
+ }
188
+
189
+ .message img {
190
+ max-width: 100%;
191
+ border-radius: 10px;
192
+ margin-top: 10px;
193
+ }
194
+
195
+ .typing-indicator {
196
+ display: flex;
197
+ align-items: center; /* Vertically align items */
198
+ padding: 10px 15px; /* Adjusted padding */
199
+ gap: 4px;
200
+ }
201
+ .typing-indicator .bot-avatar { /* Optional: if you add an avatar */
202
+ width: 24px;
203
+ height: 24px;
204
+ background-color: var(--secondary-color);
205
+ border-radius: 50%;
206
+ margin-right: 8px;
207
+ /* Add an icon or image for the bot here if desired */
208
+ }
209
+
210
+ .typing-indicator span {
211
+ height: 8px;
212
+ width: 8px;
213
+ background: var(--secondary-color);
214
+ border-radius: 50%;
215
+ animation: bounce 1.3s linear infinite;
216
+ }
217
+
218
+ @keyframes bounce {
219
+ 0%, 60%, 100% { transform: translateY(0); }
220
+ 30% { transform: translateY(-8px); }
221
+ }
222
+
223
+ </style>
224
+ </head>
225
+ <body>
226
+
227
+ <div class="chat-container">
228
+ <div class="chat-header">
229
+ <h2>Personal Assistant ChatBot</h2>
230
+ </div>
231
+
232
+ <div class="chat-status">
233
+ <div class="connection-status">
234
+ <span class="status-indicator" id="status-indicator"></span>
235
+ <span class="status-text" id="status-text">Connecting...</span>
236
+ </div>
237
+ </div>
238
+
239
+ <div class="chat-messages" id="chat-messages"></div>
240
+
241
+ <div class="chat-input">
242
+ <textarea id="user-input" placeholder="Type your message here..." rows="1" disabled></textarea>
243
+ <button id="send-button" disabled><i class="fas fa-paper-plane"></i></button>
244
+ </div>
245
+ </div>
246
+
247
+ <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
248
+ <script src="https://unpkg.com/[email protected]/dist/autosize.min.js"></script>
249
+ <script>
250
+ autosize(document.querySelectorAll('textarea'));
251
+
252
+ const sendButton = document.getElementById('send-button');
253
+ const userInput = document.getElementById('user-input');
254
+ const chatMessages = document.getElementById('chat-messages');
255
+ const statusIndicator = document.getElementById('status-indicator');
256
+ const statusText = document.getElementById('status-text');
257
+
258
+ let currentUserId = null;
259
+ let sessionId = null;
260
+ const API_BASE_URL = 'https://sakibahmed-random2345t6.hf.space'; // Your HF Spaces base URL
261
+
262
+ function updateStatus(connected, message = "Connected") {
263
+ if (connected) {
264
+ statusIndicator.classList.remove('error');
265
+ statusText.textContent = message;
266
+ } else {
267
+ statusIndicator.classList.add('error');
268
+ statusText.textContent = message;
269
+ }
270
+ }
271
+
272
+
273
+ async function initializeChat() {
274
+ updateStatus(false, "Connecting...");
275
+ try {
276
+ const sessionResponse = await axios.post(`${API_BASE_URL}/create-session`);
277
+ sessionId = sessionResponse.data.session_id;
278
+ console.log("Chat session initialized:", sessionId);
279
+
280
+ document.getElementById('chat-messages').style.display = 'block';
281
+ document.querySelector('.chat-input').style.display = 'flex';
282
+ userInput.disabled = false;
283
+ sendButton.disabled = false;
284
+ updateStatus(true, "Connected");
285
+
286
+ // loadChatHistory(); // Chat history loading is removed as the endpoint may not be available/needed
287
+ } catch (error) {
288
+ console.error('Error creating session:', error);
289
+ appendMessage('bot', 'Failed to initialize chat session. Please check your connection or refresh the page.');
290
+ userInput.disabled = true;
291
+ sendButton.disabled = true;
292
+ updateStatus(false, "Connection Failed");
293
+ }
294
+ }
295
+
296
+ // Chat history loading and clearing are removed as they might not be supported or needed
297
+ // when interacting with a public Hugging Face Space where state might be ephemeral
298
+ // or the endpoints /chat-history and /clear-history are not exposed/intended for client use.
299
+
300
+ function showTypingIndicator() {
301
+ // Check if an indicator already exists to prevent duplicates
302
+ if (document.querySelector('.typing-indicator')) return;
303
+
304
+ const indicator = document.createElement('div');
305
+ indicator.className = 'typing-indicator message bot'; // Added 'message bot' for styling consistency
306
+ indicator.innerHTML = `
307
+ <div class="message-content" style="background: transparent; box-shadow: none; padding: 5px 10px;">
308
+ <span style="animation-delay: 0s"></span>
309
+ <span style="animation-delay: 0.2s"></span>
310
+ <span style="animation-delay: 0.4s"></span>
311
+ </div>
312
+ `;
313
+ chatMessages.appendChild(indicator);
314
+ chatMessages.scrollTop = chatMessages.scrollHeight;
315
+ }
316
+
317
+ function hideTypingIndicator() {
318
+ const indicator = document.querySelector('.typing-indicator');
319
+ if (indicator) {
320
+ indicator.remove();
321
+ }
322
+ }
323
+
324
+ function escapeHtml(unsafe) {
325
+ if (typeof unsafe !== 'string') {
326
+ return unsafe; // Or handle as an error, or stringify
327
+ }
328
+ return unsafe
329
+ .replace(/&/g, "&")
330
+ .replace(/</g, "<")
331
+ .replace(/>/g, ">")
332
+ .replace(/"/g, """)
333
+ .replace(/'/g, "'");
334
+ }
335
+
336
+ function appendMessage(sender, text, imageUrl = null, suggestions = []) {
337
+ const messageElement = document.createElement('div');
338
+ messageElement.classList.add('message', sender);
339
+
340
+ const messageContent = document.createElement('div');
341
+ messageContent.classList.add('message-content');
342
+
343
+ // Sanitize text before setting innerHTML if it might contain user-generated HTML-like structures
344
+ // or if you want to strictly display it as text.
345
+ // For bot messages, assuming they are safe or you handle HTML structure correctly.
346
+ let safeText = (sender === 'user') ? escapeHtml(text) : text;
347
+ messageContent.innerHTML = safeText.replace(/(\\n|\r\n|\n|\r)/g, '<br>');
348
+
349
+
350
+ if (imageUrl) {
351
+ const imageElement = document.createElement('img');
352
+ imageElement.src = imageUrl; // Make sure imageUrl is a full, valid URL
353
+ messageContent.appendChild(imageElement);
354
+ }
355
+
356
+ if (suggestions.length > 0) {
357
+ const suggestionsContainer = document.createElement('div');
358
+ suggestionsContainer.classList.add('suggestions');
359
+
360
+ suggestions.forEach(suggestion => {
361
+ const button = document.createElement('button');
362
+ button.classList.add('suggestion-button');
363
+ button.textContent = escapeHtml(suggestion.question); // Sanitize suggestion text
364
+ button.addEventListener('click', function() {
365
+ userInput.value = suggestion.question; // No need to escape here, it's for input value
366
+ sendMessage();
367
+ });
368
+ suggestionsContainer.appendChild(button);
369
+ });
370
+
371
+ messageContent.appendChild(suggestionsContainer);
372
+ }
373
+
374
+ messageElement.appendChild(messageContent);
375
+ chatMessages.appendChild(messageElement);
376
+ chatMessages.scrollTop = chatMessages.scrollHeight;
377
+ }
378
+
379
+ async function sendMessage() {
380
+ if (!sessionId) {
381
+ appendMessage('bot', 'Session not initialized. Please refresh the page.');
382
+ return;
383
+ }
384
+
385
+ const message = userInput.value.trim();
386
+ if (message === '') return;
387
+
388
+ appendMessage('user', message);
389
+ userInput.value = '';
390
+ autosize.update(userInput); // Recalculate textarea size
391
+
392
+ showTypingIndicator();
393
+ sendButton.disabled = true; // Disable send button during request
394
+
395
+ try {
396
+ const response = await axios.post(`${API_BASE_URL}/chat-bot`, {
397
+ query: message,
398
+ user_id: currentUserId, // Will be null
399
+ session_id: sessionId
400
+ });
401
+
402
+ hideTypingIndicator();
403
+ const data = response.data;
404
+
405
+ if (data.answer) {
406
+ let botMessageHtml = data.answer; // Assuming data.answer is safe HTML or markdown handled by server
407
+
408
+ // The original_question and confidence are now part of the styling or specific logic
409
+ // if (data.original_question) {
410
+ // botMessageHtml = `<div class="original-question">${escapeHtml(data.original_question)}</div>${botMessageHtml}`;
411
+ // }
412
+ // if (data.confidence) {
413
+ // botMessageHtml += `<div class="confidence-indicator">Confidence: ${Math.round(data.confidence)}%</div>`;
414
+ // }
415
+
416
+ // If data.answer already contains these elements styled, no need to add them again.
417
+ // If not, and you want them, you'd add them here using escapeHtml for safety.
418
+
419
+ appendMessage('bot', botMessageHtml, data.image_url, data.related_questions || []);
420
+
421
+ } else if (data.message) { // Fallback for general messages from the bot
422
+ appendMessage('bot', data.message, null, data.related_questions || []);
423
+ } else if (data.error) {
424
+ appendMessage('bot', `Error: ${data.error}`);
425
+ } else {
426
+ appendMessage('bot', 'Received an unexpected response from the server.');
427
+ }
428
+ } catch (error) {
429
+ hideTypingIndicator();
430
+ console.error('Error sending message:', error);
431
+ let errorMessage = 'Sorry, there was an error processing your request.';
432
+ if (error.response) {
433
+ // Server responded with a status code out of 2xx range
434
+ console.error('Error data:', error.response.data);
435
+ console.error('Error status:', error.response.status);
436
+ if (error.response.data && error.response.data.error) {
437
+ errorMessage = `Server error: ${error.response.data.error}`;
438
+ } else if (error.response.status === 429) {
439
+ errorMessage = "Too many requests. Please wait a moment and try again.";
440
+ }
441
+ } else if (error.request) {
442
+ // Request was made but no response received
443
+ errorMessage = 'Could not connect to the server. Please check your internet connection.';
444
+ }
445
+ appendMessage('bot', errorMessage);
446
+ updateStatus(false, "Connection Issue");
447
+ } finally {
448
+ sendButton.disabled = false; // Re-enable send button
449
+ }
450
+ }
451
+
452
+ sendButton.addEventListener('click', sendMessage);
453
+ userInput.addEventListener('keypress', function(e) {
454
+ if (e.key === 'Enter' && !e.shiftKey) {
455
+ e.preventDefault();
456
+ sendMessage();
457
+ }
458
+ });
459
+
460
+ window.onload = initializeChat;
461
+ </script>
462
+ </body>
463
+ </html>
text_extractions/AMO GE - Company Summary.txt.txt ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ AMO Green Energy Ltd
2
+ A leading name in comprehensive fire safety solutions in Bangladesh. A sister concern of Noman Group, largest vertically integrated textile mills group in Bangladesh, highest exporter in all categories consecutively for 13 years and counting. We specialize in deliveringend-to-end fire protection and detection systemsfrom design and supply to installation, testing, commissioning, and maintenance.
3
+ We are also theauthorized distributor of NAFFCO, a globally recognized brand from Dubai in fire protection equipment, allowing us to offer internationally certified products that meet the highest safety standards.
4
+ Our mission is to be yourone-stop service provider for all fire safety needs, ensuring safety & reliability.
5
+
6
+ Our products & services:
7
+ 1. Fire Fighting Equipment
8
+ I. Fire Extinguishers
9
+ II. Fire Hose Reel & Accessories
10
+ III. Fire Hoses & Accessories
11
+ IV. Fire Cabinets
12
+ V. Valves and Riser Equipment
13
+ VI. Fire Hydrants
14
+ VII. Fire Blankets
15
+ 2. Fire Pump & controllers
16
+ I. Fire Pump Products
17
+ II. Pump House Unit
18
+ III. Industrial Packaged Pumpset
19
+ IV. Advanced Fire Pump Solutions
20
+ 3. Flood Control Solutions
21
+
22
+ I. All-Terrain Flood Control Vehicle
23
+ II. Flood Rescue Truck
24
+ III. Inflatable Flood Barrier Hose
25
+ IV. Customized Water Pumps
26
+ V. Water Rescue Drone
27
+
28
+ 4. Fire Doors
29
+
30
+ I. Fire Rated Doors
31
+ II. Glazing System
32
+ III. Fire & Smoke Curtain
33
+ IV. Blast Doors
34
+ V. Security Doors
35
+ VI. Security Doors
36
+ VII. Rolling Shutters
37
+ VIII. Access Doors
38
+
39
+ 5. Extra Low Voltage
40
+ I. TRIGA
41
+ 6. Fire Protection system
42
+ I. Gas Based System
43
+ II. Aerosol System
44
+ 7. ELV Integrated System
45
+ I. Security Systems
46
+ II. ICT (Information & Communication Technology)
47
+ III. Audio Visuals
48
+ IV. Special systems
49
+ 8. Foam Equipment & Concentrates
50
+
51
+ I. Foam Concentrates
52
+ II. Foam Equipment
53
+
54
+ 9. Smoke Management System
55
+ I. Fans
56
+ II. Fire Ducts & dampers
57
+ III. Natural Smoke Vents
58
+ IV. Fire & Smoke Curtains
59
+ V. Starter Panels
60
+ VI. Smoke Control stations
61
+ VII. Smoke, CO & Nox Detectors
62
+ VIII. Electrostatic Precitator
63
+ IX. Solutions
64
+ 10. Training
65
+
66
+ I. NFPA Training
67
+ II. HSE Training
68
+ III. Medical, First Aid
69
+ IV. Firefighting Training Courses
70
+
71
+ 11. Safety & Rescue
72
+ I. Firefighter Equipment
73
+ II. Industrial
74
+ 12. Safety Signs
75
+ I. Evacuation Plan
76
+ II. Escape Route Signs
77
+ III. Fire Fighting Equipment Signs
78
+ IV. Warning Signs
79
+ V. Mandatory Signs
80
+ VI. Prohibition Signs
81
+ VII. Low Location Lighting
82
+ VIII. Traffic Signs
83
+ IX. Tunnel Signs
84
+ X. Building Signs
85
+ Clients of AMO Green Energy Ltd
86
+
87
+ Our clients (Industrial):
88
+ BRB Cable Industries Ltd, Knit Plus Ltd, Paramount Textile Ltd, BRB VCV Tower, LIZ Complex Ltd, Nassa Knit Ltd, Nassa Basic Complex Ltd, MNC Apparels Ltd, Zaber & Zubair Fabrics Ltd, Nassa Spinners & Garments Ltd, Nassa Supreme Wash Ltd, Shah Fatehullah Textile Mills Limited, AJ Super Garments Ltd, Nassa Taipei Textile Mills Ltd, Noman Terry Towel Mills Ltd, Nassa Diamond, Nassa Taipei Denims Ltd, Toy Woods (BD) Co. Ltd, Nassa Super Garments Ltd, Nassa Super Wash Ltd, Agami Apparels Ltd. (Dekko Legacy Group), Dekko Designs Ltd. (Dekko Legacy Group), United Lube Oil Limited, Utah Fashions Limited, Utah knitting & Dyeing Ltd, Youngone Corporation, Sparkle Knit Composite Ltd,
89
+ Our Clients (Hospitals):
90
+ United Hospital Limited, Dr. Fazlul Haque Colorectal Hospital Ltd, Nassa International Cancer & General Hospital Limited.
91
+ Our Clients (Hotels):
92
+ Bay Hills Hotel (Goldsands Group), IPCO Hotels Limited (United Group)
93
+
94
+ Our Clients (Commercial):
95
+
96
+ Unimart Limited-Gulshan (United Group), Unimart Limited-Sylhet (United Group)
97
+ Our Clients (Commercial-Aviation):
98
+
99
+ Hangar - Dhaka Airport
100
+
101
+ Contact information:
102
+ Email: [email protected] Phone: +880 1781-469951 Website: ge-bd.com
text_extractions/NAFFCO - IndustrialCatalog_Bangladesh.pdf.txt ADDED
@@ -0,0 +1,878 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ www.naffco.com
2
+ 1
3
+ 1
4
+ INDUSTRIAL
5
+ FIRE & LIFE
6
+ SAFETY
7
+ SOLUTIONS
8
+ www.naffco.com
9
+ 2
10
+ NAFFCO was founded in Dubai, UAE to become the world’s leading producer and supplier of life safety solutions. By recognizing
11
+ the importance and convenience of having easy access to multiple safety services, we became specialized by offering
12
+ complete solutions under one roof for all types of high quality firefighting equipment, fire protection systems, fire alarms,
13
+ addressable emergency systems, security systems, custom-made vehicles such as fire trucks, ambulances, mobile
14
+ hospitals and airport rescue firefighting vehicles (ARFF).
15
+ With the most talented and dedicated employees from around the world, NAFFCO has over 2,000 passionate engineers
16
+ and over 6.5 million square feet of manufacturing facilities. We are currently exporting to over 100 countries worldwide.
17
+ NAFFCO manufactures UL, FM, BSI & Global Mark approved products in our facility in consistent with International Standards
18
+ UL-DQS, BSI certifies for the Quality Management System against ISO 9001. Our Environmental (ISO 45001) & Occupational
19
+ Health & Safety (OHSAS 18001) Management Systems have been certified by UL-DQS. Our Trucks & Vehicles division has
20
+ been assessed & certified for Quality Management System requirement for Aviation, Space & Defense organization (AS
21
+ 9100) by UL-DQS.
22
+ Our success is driven by our passion to protect; our vision is to become the world’s number one provider of innovative
23
+ solutions in protecting life, environment and property.
24
+ AN INTRODUCTION TO NAFFCO
25
+ www.naffco.com
26
+ 3
27
+ Contents
28
+ Engineering .......................................................................................................................................................................................... 5
29
+ Products & System ..................................................................................................................................................................... 6
30
+ Fire Alarm System ........................................................................................................................................................................ 12
31
+ Fire & Gas Detection System ...................................................................................................................................... 14
32
+ Building Management System .................................................................................................................................. 15
33
+ Applications
34
+ Power Plants & Sub Stations ................................................................................................................................................................ 18
35
+ Oil Refineries & Storage ....................................................................................................................................................................... 19
36
+ Petrochemical Plants ............................................................................................................................................................................. 20
37
+ Jetty and Tanker Berth Areas .............................................................................................................................................................. 21
38
+ Airport & Hangars ................................................................................................................................................................................... 22
39
+ Mining ........................................................................................................................................................................................................ 23
40
+ Industrial Storage Facilities ................................................................................................................................................................... 24
41
+ All Categories of Process Industries .................................................................................................................................................. 25
42
+ District Cooling & Sewage Treatment Plants ................................................................................................................................... 26
43
+ Our Prestigious Clients ........................................................................................................................................................ 28
44
+ Certificates & Approvals ..................................................................................................................................................... 31
45
+ www.naffco.com
46
+ 4
47
+ WHAT SETS
48
+ US APART?
49
+ NAFFCO is dedicated to consistently providing high customer
50
+ satisfaction by rendering excellent services and top quality
51
+ products. Our attributes that set us apart from our competitors
52
+ as an industry leader
53
+ www.naffco.com
54
+ 5
55
+ Strong ‘Value Engineering’ with
56
+ “Code of Governance”
57
+ NAFFCO focuses on value engineering that complies with
58
+ ‘Code of Governance’ based on international standards.
59
+ “Engineering Administration” for regional
60
+ channel partners
61
+ Our ‘engineering administration’ is responsible for
62
+ nurturing existing channel partners and the development
63
+ of new ones to drive growth to our firm.
64
+ A well-established network of regional sales
65
+ offices and channel partners across all markets
66
+ NAFFCO has developed and maintained networks of
67
+ regional sales offices and channel partners to cater
68
+ customers’ needs across all markets as a competitive
69
+ advantage.
70
+ All Products under one ‘Brand’
71
+ NAFFCO “Umbrella Branding” makes our different
72
+ products easily identifiable for customers by grouping
73
+ them under one brand name.
74
+ Strong ‘Technical Expertise’
75
+ Our team takes an innovative approach combined with
76
+ top-notch expertise to produce first-class results each
77
+ and every time.
78
+ Reliable support all along project cycle
79
+ We support customers with knowledge, skills, tools and
80
+ techniques to a broad range of activities in order to meet
81
+ the requirements of their project.
82
+ Complete System Packages
83
+ Complete System Packages are offered by NAFFCO all
84
+ along with a service package starting from engineering
85
+ assistance to field start-up and periodic maintenance.
86
+ Complete Project Management Process (PMP)
87
+ A full project management solution is provided from initial
88
+ contact through design, engineering, installing to final
89
+ testing and commissioning.
90
+ Total Turn-Key Solutions / Services
91
+ NAFFCO provides a full complement of services and
92
+ turnkey solutions where our qualified team oversees all
93
+ phases of the project from planning and deploying to
94
+ executing.
95
+ UL/FM and other certifications
96
+ Our products have been consistently certified by UL, FM,
97
+ and many recognized and respected certifications across
98
+ the globe to assure customer a product/service has been
99
+ objectively tested and conforms to the highest national
100
+ and international standards.
101
+ Environmental Services
102
+ NAFFCO products and services are designed to be
103
+ environmental friendly, with continuous development to
104
+ improve the current standards to reach greater
105
+ sustainability levels of a facility, secure it against potential
106
+ costly and life threatening hazards, consolidate the use of
107
+ valued resources critical to operations, and much more.
108
+ Engineering
109
+ www.naffco.com
110
+ 6
111
+ PORTABLE FIRE EXTINGUISHERS
112
+ NAFFCO manufactures an extensive range of quality portable
113
+ extinguishers including C0 2, Dry Powder, Clean Agent, Foam,
114
+ Water and Wet Chemical.
115
+ A comprehensive range of Extinguishers
116
+ offering outstanding protection
117
+ MOBILE FIRE EXTINGUISHERS
118
+ NAFFCO mobile fire extinguishers are
119
+ manufactured to provide protection for
120
+ hazardous areas where the potential
121
+ for large fire exists.
122
+ Applications:
123
+ • Paint Spray Booths
124
+ • Offshore Platforms
125
+ • Loading Racks
126
+ • Fuel Storage areas
127
+ • Airport
128
+ • Manufacturing Operations
129
+ • Manufacturing standard is
130
+ BS EN 1866 – 1:2007
131
+ and Kite Mark certified.
132
+ www.naffco.com6
133
+ Products &
134
+ System
135
+
136
+ www.naffco.com
137
+ 7
138
+ HOSE REELS & CABINETS
139
+ • Electrostatic powder coated steel
140
+ sheet & stainless steel brush/mirror
141
+ finish ensure a robust construction.
142
+ • The NAFFCO Manufacturing Division
143
+ is capable of designing custom built
144
+ cabinets.
145
+ • Hose reel cabinets and breeching inlet
146
+ cabinets are manufactured to comply
147
+ with BS 671-1 and BS5041-5 standards.
148
+ • NAFFCO hose reels and cabinets can be
149
+ found in some of the most prestigious
150
+ properties across the Middle East and
151
+ throughout the world.
152
+ FIRE HOSES & ACCESSORIES
153
+ • NAFFCO Hoses & Accessories are manufactured
154
+ according to BS 6391 standards for Kitemark / LPCB &
155
+ UL 19,219 for UL approval
156
+ • Industrial type hose racks are available
157
+ • Hoses are designed for a range of
158
+ multipurpose applications. Compatible for wide range of
159
+ applications
160
+ • All hoses are maintenance-free
161
+ • Various lengths and types are available.
162
+ • Couplings made from aluminum alloy, bronze,
163
+ gun metal and chrome finish are available.
164
+ FIRE PUMPS
165
+ • NAFFCO offers a wide range of fire pumps suitable for
166
+ various fire fighting applications.
167
+ • NAFFCO fire pumps are calibrated
168
+ to specific client requirements to
169
+ ensure maximum performance.
170
+ • In line to all industrial applicable
171
+ manufacturing standards
172
+ VALVES & HYDRANTS
173
+ • NAFFCO hydrants are designed to
174
+ meet BS14384 for Kitemark & LPCB.
175
+ • Well lined production facility for custom
176
+ made fabrications, according to the
177
+ industrial specific needs
178
+ • NAFFCO valves are manufactured to
179
+ comply with BS 5041-1 standards.
180
+ • Different types of valves are available
181
+ in both threaded and flanged versions.
182
+ www.naffco.com
183
+ 8
184
+ FOAM SYSTEM/FOAM PUMPS
185
+ • NAFFCO Foam concentrates, Bladder Tanks
186
+ and Ratio Controllers are UL listed.
187
+ • The range includes Foam Bladder Tank
188
+ System, High Expansion Foam Generators, Water
189
+ Foam Monitors and Foam Proportioner, etc.
190
+ • Wide range of listed products to match the requirements
191
+ of both commercial and industrial sector
192
+ • Well oriented R&D to get updated with
193
+ the Industrial specific needs
194
+ Threaded & Grooved Fittings
195
+ • UL Listed & FM Approved threaded fittings for
196
+ fire-fighting and Chilled water applications. Available
197
+ in Malleable/Ductile Iron with Black or Galvanized
198
+ finish.
199
+ • Ductile Iron Grooved fittings recommended for
200
+ fire-fighting/HVAC/Water applications.
201
+ Available in Red/Galvanized
202
+ finish.
203
+ HDPE PIPING SYSTEM
204
+ HIGH DENSITY POL YETHYLENE
205
+ HDPE Pipes
206
+ Manufactured in compliance with:
207
+ • AWWA C906 standard
208
+ • ISO 4427 standard UL, FM
209
+ & WRAS approvals.
210
+ • Effective solution for fire-
211
+ fighting (underground),
212
+ potable water, municipal,
213
+ industrial, marine and
214
+ agricultural applications.
215
+ HDPE Fittings
216
+ • FM & WRAS approved HDPE fittings.
217
+ Applicable in high/low pressure
218
+ applications.
219
+ • Moulded and Segmented fittings.
220
+ STEEL PIPING SYSTEM
221
+ PIPES & FITTINGS
222
+ Seamless & ERW Steel Pipes
223
+ • Manufactured in accordance with
224
+ API/ASTM, BS, UL and FM
225
+ approvals.
226
+ • Available in Hot Dipped
227
+ Galvanized, Black and Powder
228
+ coating finish.
229
+ • Copper/Nickel/Alloy/Stainless
230
+ Pipes available for order also.
231
+
232
+ www.naffco.com
233
+ 9
234
+ FIRE SUPPRESSION SYSTEM
235
+ • A fully-integrated state-of-the art detection System
236
+ • Proven fire suppression technology for C0 2, HFC227ea
237
+ system, NAFFCOInert Gas system & NOVEC system
238
+ • Design, manufacture, installation, maintenance and service
239
+ all from one company – NAFFCO
240
+ CO2 SYSTEM INERT GAS SYSTEM
241
+ HFC227ea SYSTEM NOVEC SYSTEM
242
+
243
+ www.naffco.com
244
+ 10
245
+ NAFFCO STEEL DOORS
246
+ Including: Fire Rated, Thermal Break, STC Rated, Louvers, Blast
247
+ Resistant, Bullet Proof, Security Doors and Rolling Shutters.
248
+ • NAFFCO Steel Doors incorporate
249
+ the very latest technological
250
+ advances in terms of fabrication,
251
+ construction and materials.
252
+ • An extensive range of products, styles
253
+ and finishes ensures client requirements
254
+ can be met with complete confidence.
255
+
256
+ WALL FACADE SOLUTION
257
+ ROBUST FIRE PROTECTION WITH ELEGANCE
258
+ NAFFCO provides FM and LPCB approved Rockwool
259
+ Sandwich Panels, a true alternative to conventional
260
+ solution for roof external wall & internal partition, with
261
+ fire rated solution & design benefits.
262
+ It presents the ultimate combination of aesthetics,
263
+ design and function with all elements prefabricated and
264
+ manufactured with the latest technologies.
265
+ SMOKE MANAGEMENT
266
+ SMOKE EXTRACTION SOLUTIONS
267
+ NAFFCO takes great pride in providing ultimate smoke control
268
+ solution for high rise buildings, malls, atriums, factories, stores,
269
+ and other occupancies.
270
+ Our System consists of:
271
+ • Fire Rated Fans
272
+ • Fire Rated Ducts
273
+ • Motorised Fire & Smoke
274
+ Dampers
275
+ • Curtain Fire Dampers
276
+ • Smoke Sensors
277
+ • Smoke Vents
278
+ • Smoke / Fire Curtains
279
+ • Control Panels
280
+ VENTILATION SYSTEM
281
+ KEEPING ENVIRONMENT CLEAN
282
+ NAFFCO provides full range of solutions for:
283
+ • Commercial Ventilation
284
+ • Domestic Ventilation
285
+ • Natural Ventilation
286
+ • Vents & Louvers
287
+ ON-GOING RESEARCH AND DEVELOPMENT
288
+ ENSURES OPTIMUM SAFETY
289
+
290
+ www.naffco.com
291
+ 11
292
+ FIRE RESISTIVE PAINT
293
+ Cementitious Paint
294
+ NAFFCO’s UL approved Cementitious fire protection coating is
295
+ applied through a spray using special equipment to protect
296
+ structural steel or concrete from the effects of fire for a nominal
297
+ fire resistance period.
298
+ The cement based fireproof coating has excellent physical
299
+ properties for interior/architectural uses and it can give up to 4
300
+ hours of fire protection.
301
+ FIRE RESISTIVE PAINT
302
+ Intumescent Paint
303
+ Load-bearing capacity of steel decreases above 550°C.
304
+ Beam lose their strength to the extent that the structure
305
+ can suffer damage and if the worst happens, the structure
306
+ could collapse.
307
+ NAFFCO’s Intumescent paint coating start to swell at about
308
+ 180-200 °C and forms a foam layer
309
+ which stops the critical
310
+ heating of steel.
311
+ It is available as
312
+ water and
313
+ solvent
314
+ based
315
+ paints.
316
+ WALL FACADE SOLUTION
317
+ ROBUST FIRE PROTECTION WITH ELEGANCE
318
+ Profiled Sheet Cladding
319
+ A wide range of profiled sheets are offered by NAFFCO
320
+ for roof and wall cladding to the designers and architects
321
+ for internal filings &
322
+ external cladding.
323
+ These products are
324
+ designed to be appeased with high characteristics.
325
+ Aluminum Composite Panels (ACP)-A2
326
+ Aluminum composite panels (ACP)-A2, are frequently used for
327
+ façade cladding and are constructed as two layers of aluminum
328
+ covering, non-combustible
329
+ A2 core.
330
+ The ACPs-A2 are
331
+ usually pre-manufactured
332
+ and bent into its final shape at
333
+ the building site.
334
+ SAFETY & RESCUE EQUIPMENT
335
+ NAFFCO provides high-quality personal protective equipment’s
336
+ designed to save lives around the world. We are providing a full
337
+ range of safety products.
338
+ • Fireman Gear
339
+ • Rescue Equipments
340
+ • Self-Contained Breathing Apparatus
341
+ • Chemical Protection
342
+ • Fall Protection
343
+ • Spill Protection
344
+ • Thermal Imaging Camera
345
+ • Personal Detectors
346
+ Ventilation & Fans
347
+ • Eyewash and Shower
348
+
349
+ www.naffco.com
350
+ 12
351
+ ADDRESSABLE & CONVENTIONAL
352
+ FIRE DETECTION DEVICES
353
+ Fire Alarm
354
+ System
355
+ VESDA SYSTEM PANEL & DEVICES
356
+ • LINEAR HEAT DETECTION CABLE with CONTROLLER
357
+ • PROBE TYPE HEAT DETECTOR
358
+ • EXPLOSION PROOF MANUAL CALL POINT
359
+ • EXPLOSION PROOF SMOKE DETECTOR
360
+ • EXPLOSION PROOF FLAME DETECTOR
361
+ www.naffco.com12
362
+ www.naffco.com
363
+ 13
364
+ VOICE EVACUATION SYSTEM
365
+ TYPES
366
+ • SHIELD Master/Distributed Panel
367
+ • Fire Phone Equipments
368
+ • Fire Phone Storage Cabinet
369
+ • Fire Fighter’s Portable Handset & Fire Fighter’s Jack
370
+ • Speaker
371
+ GAS DETECTORS with CONTROLLER & ACCESSORY ADDRESSABLE FIRE DETECTION SYSTEM
372
+ PUBLIC ADDRESS & VOICE ALARM SYSTEMINTEGRATED FIRE ALARM & VOICE EVACUATION
373
+ SYSTEM ANSI/UL 864 9TH EDITION
374
+ ADDRESSABLE MODULES (Loop Powered)
375
+ TYPES
376
+ • Isolator Module
377
+ • Mini Priority Switch
378
+ Monitor Module
379
+ • Mini Switch Monitor Module
380
+ • 120V AC Input/
381
+ Output Module
382
+ • Relay Output Module
383
+ • Galvanic Isolator
384
+ • Mini Monitor Module
385
+ • Dual Priority Switch
386
+ Monitor Module
387
+ • Switch Monitor Module
388
+ • Switch Monitor Input/
389
+ Output Module
390
+ • Sounder Control Module
391
+ • Zener Barrier
392
+ ADDRESSABLE FIRE DETECTION System
393
+ TYPES
394
+ • OMEGA Addressable Fire Alarm Control Panel
395
+ • OMEGA-X Addressable Fire Alarm Control Panel
396
+ • OMEGA R
397
+ ADDRESSABLE NOTIFICATION DEVICES
398
+ TYPES
399
+ • Open-Area Sounder Beacon
400
+ • Open-Area Sounder
401
+ • Sounder Beacon Base
402
+ • Explosion Proof Sounders & Beacons
403
+ • Explosion Proof Sirens
404
+
405
+ www.naffco.com
406
+ 14
407
+ Fire & Gas Detection System
408
+ FIRE & GAS EXTINGUISHING
409
+ FEATURES:
410
+ The SI-90 system has been designed to meet the heaviest functional
411
+ reliability and availability requirements, particularly of the companies
412
+ that operate in the field of energy production and transformation,
413
+ where it shows excellent resistance to electromagnetic disturbances
414
+ and a continuous operability in difficult environmental conditions.
415
+ Its capacity is demonstrated the compliance with the requirements
416
+ of fault tolerance set by the International Standards IEC 61508,
417
+ and thanks to this compliance, it will soon obtain the level SIL3
418
+ (Safety Integrity Level 3) certified by a third party agency.
419
+ In order to achieve this results, the panel has been manufactured
420
+ with some particular features:
421
+ • Hot backup redundant CPU’s
422
+ • Hot swap of all cards, including CPU’s, with automatic
423
+ reconfiguration
424
+ • Redundant and looped communication bus
425
+ between cards and CPU’s
426
+ • Periodical automatic testing of card inputs and outputs
427
+ • Self-diagnostics and signaling of card and CPU fault
428
+ • Automatic safety disabling of malfunctioning cards
429
+ • CEI EN 50130-4 immunity requirements (EMC) widely
430
+ exceeded (IMQ report)
431
+ • The cards of interface with devices can be redundant
432
+ What is it?
433
+ The panel SI-90 is a programmable PLC suitable for safety and
434
+ security installations with an high technological and economic content.
435
+ What is useful for?
436
+ With the SI-90 panel, fire & gas detection, intruder alarms and process
437
+ control System can be built in energy plants, in petrochemical
438
+ industries, naval, military and public installations.
439
+ MULTI- FUNCTIONAL
440
+ INTELLIGENT SYSTEM
441
+ How is it composed?
442
+ Externally, the panel SI-90 is similar to a safety PLC; it is composed
443
+ by electronic cards mechanically compatible, which are inserted
444
+ in 19” racks. The panel SI-90 can have from 1 to 10 racks, each rack
445
+ has 13 card slots. Further to the versions customizable for clients,
446
+ the UL version has a case with 6 racks, while for the European
447
+ market, other 3 versions available: About 20 different cards can be
448
+ used, each dedicated to different functions such as re gating, gas
449
+ detection, intruder alarm, technological control and communication
450
+ with other System and/or panels.
451
+ The SI-90 panel has a dedicated rack for the operator’s interface
452
+ and it is constituted by a big alphanumeric display, by a keyboard
453
+ and led indications to show the system status.
454
+ Each panel SI-90 has its own modular feeder and battery charger,
455
+ which allows the panel to work even without an external power supply.
456
+ www.naffco.com
457
+ 15
458
+ SAUTER stands for intelligent products and systems, for
459
+ effective and reliable control, regulation, monitoring and
460
+ operation of technical building equipment. Our solutions
461
+ are exactly coordinated with the needs of our customers
462
+ and local requirements. They deliver high quality, reliability
463
+ and extreme ease of use. Cutting-edge products in the
464
+ service of humanity: that is our philosophy.
465
+ Our product portfolio includes:
466
+ • The Modulo 5 automation system with the
467
+ greatest ease of use for secure and fast
468
+ equipment operation, native BACnet ®, integrated
469
+ web solutions, and parameterizable object for
470
+ nearly boundless application possibilities.
471
+ • The Sauter Ecos series of automation system
472
+ is an easy home automation based energy
473
+ efficient solution which can be connected to KNX,
474
+ MBUS, Modbus, SMI without any gateway.
475
+ • IOT based system BMS system helps
476
+ in the connectivity for all the facilities
477
+ with the palm of your hands.
478
+ • The BMR Automation station foe heating
479
+ and ventilation is simple to use, comes with
480
+ native BACnet ® and Internet access and
481
+ is configurable for all requirement.
482
+ • Sauter vision center is a state of the art Monitoring
483
+ and controlling software wherein we get the
484
+ maintenance manager and facility manager built
485
+ in. Being an HTML5 system the sauter vision
486
+ center can be accessed via any mobile device.
487
+ Our different product families mutually complement each
488
+ other. Old and new systems are compatible up to the third
489
+ generation. Our products “speak” standard protocols such
490
+ as BACnet ®, LonWorks ®, EIB or Modbus. Open interfaces
491
+ also make possible the integration of products and systems
492
+ from other manufacturer.
493
+ Building
494
+ Management
495
+ System
496
+ www.naffco.com
497
+ 16
498
+
499
+ www.naffco.com
500
+ 17
501
+ FIREFIGHTING TRUCKS
502
+ Wide array of firefighting vehicles ranging from municipal, industrial, rescue and rapid intervention
503
+ vehicles to support vehicles that go beyond just water and foam
504
+ carriers, dry powder units and trailers. NAFFCO Aerial Platforms
505
+ for firefighting and rescue can reach working
506
+ heights of 72m
507
+ ARFF VEHICLES
508
+ “FALCON” series lead NAFFCO complete range of airport
509
+ intervention vehicles. Designed and built to highest quality
510
+ standards ( Aerospace Standard AS9100) to meet and
511
+ exceed the performance demanded
512
+ by ICAO and NFPA 414.
513
+ SPECIAL PURPOSE VEHICLES
514
+ • Special operations require custom made vehicles.
515
+ • Command, Hazmat, Decontamination, Mass
516
+ Casualty Support Vehicles and much more.
517
+ AERIAL PLATFORMS
518
+ Support Vehicles for Electric Sector
519
+ • For distribution line maintenance insulated ANSI C up to 25 m.
520
+ • For transmission line “bare hands “maintenance insulated
521
+ ANSI A for up to 65 m. Insulator
522
+ washers, lube, generator
523
+ trucks are
524
+
525
+
526
+
527
+
528
+
529
+
530
+ complementing
531
+ the electric sector vehicle range.
532
+ MOBILE UNITS
533
+ Mobile Hospitals & Mobile Clinics
534
+ • Mainly used for providing healthcare in remote locations.
535
+ • Truck Mounted, Semi-trailer, Fixed or Expandable bodies
536
+ & Converted Buses.
537
+ • Other Applications: Command centers, training rooms,
538
+ workshops & many more.
539
+ AMBULANCES
540
+ Mobile Hospitals & Mobile Clinics
541
+ • Certified ambulances produced to American
542
+ or European standards.
543
+ • NAFFCO is part of Ford QVM program,
544
+ ertified CAAS GVS Ambulance.
545
+ • EN 1789:2007+A:2:2014 for type B; KKK-A-1822F for type II.
546
+ WE CAN REACH YOU ANYWHERE...
547
+
548
+ www.naffco.com
549
+ 18
550
+ Power Plants & Sub Stations
551
+ Power plants are the source of power generation. They extract heat
552
+ from fuel to convert water to steam, which rotates the turbines to
553
+ produce electricity.
554
+ NAFFCO has installed exceptional products to prevent and protect
555
+ the power plants and Sub Stations from fire-related disasters.
556
+ CO₂ Gas Fire suppression System are installed to protect the steam
557
+ turbine enclosures in the event of a fire. UL listed ELV (extra low
558
+ voltage) fire protection solutions are used for fire detection and
559
+ notification.
560
+ The lube oil sheds, fuel pumping stations, etc. are safeguarded by
561
+ the UL listed Foam Discharge devices (Type I, Type II).
562
+ Substations are an essential part of the electrical generation,
563
+ transmission and distribution process.
564
+ The switchgear room, considered the heart of the substation, is
565
+ protected by our high performance and portable CO₂ Fire
566
+ Extinguishers that possess UL Listed Certification.
567
+ The transformers section is safeguarded by our reliable water mist
568
+ system, also of UL Listed certification.
569
+ • Fire Water Pumps
570
+ • Fire Fighting
571
+ • Water Spray System
572
+ • Gas Suppression System
573
+ (IG, FM-200, CO₂ System)
574
+ • Fire Alarm / Detection
575
+ • Foam System
576
+ • Gas Detection System
577
+ • Fire Hydrant Networks
578
+ • Fire Trucks
579
+ • Fire Doors
580
+ • Pipes and Fittings (HDPE, GRE)
581
+ • Safety & Security Equipment
582
+
583
+ www.naffco.com
584
+ 19
585
+ Power Plants & Sub Stations
586
+ Oil Refineries & Storage
587
+ Oil refineries are the locale of crude oil processing and refining.
588
+ These processes are done to obtain convenient products such as
589
+ Petroleum, Naphtha, Gasoline, Diesel, asphalt based products,
590
+ kerosene, LPG etc.
591
+ Due to their importance, the oil refineries are safeguarded by
592
+ NAFFCO products of supreme quality with high effectiveness
593
+ against class B fires.
594
+ The NAFFCO Foam Dyke pourer is the primary protection
595
+ applied at the tank farm dyke areas. NAFFCO Foam Chambers
596
+ are utilized for the safety of both types of oil tanks, fixed and
597
+ floating roofs.
598
+ Secondary protection consists of NAFFCO’s Foam Master or
599
+ Foam Hand Hose line. These have proved to be outstanding in
600
+ the combat against spill fires.
601
+ To prevent the fire from spreading to adjacent tanks, Medium
602
+ velocity water sprays are used to quell the fire and can avoid
603
+ major damage to the refinery .
604
+ • Fire Water Pumps
605
+ • Fire Fighting
606
+ • Water Spray System
607
+ • Gas Suppression System
608
+ (IG, FM-200, CO₂ System)
609
+ • Fire Alarm / Detection
610
+ • Foam Systems
611
+ • Gas Detection Systems
612
+ • Fire Hydrant Networks
613
+ • Fire Trucks
614
+ • Fire Doors
615
+ • Pipes and Fittings (HDPE, GRE)
616
+ • Safety & Security Equipment
617
+
618
+ www.naffco.com
619
+ 20
620
+ Petrochemical Plants
621
+ Petrochemical plants convert fossil fuels like petroleum into two
622
+ classes of components, olefins (ethylene and propylene) and
623
+ aromatics (benzene, toluene and xylene isomers) by the method
624
+ of fluid catalytic cracking. These components are then used to
625
+ make useful products for a wide range of applications and
626
+ industries.
627
+ These plants are especially dangerous due to their fossil fuel
628
+ storage and it is vital to provide exceptional fire protection to
629
+ them so as to prevent them from becoming a disaster.
630
+ NAFFCO’S High Velocity water spray system along with the Wet
631
+ and Dry barrel Hydrants grant excellent protection to all sections
632
+ of the plant.
633
+ • Fire Water Pumps
634
+ • Fire Fighting
635
+ • Water Spray System
636
+ • Gas Suppression System
637
+ (IG, FM-200, CO₂ System)
638
+ • Fire Alarm / Detection
639
+ • Foam System
640
+ • Gas Detection System
641
+ • Fire Hydrant Networks
642
+ • Fire Trucks
643
+ • Fire Doors
644
+ • Pipes and Fittings
645
+ (HDPE, GRE)
646
+ • Safety & Security
647
+ Equipment
648
+
649
+ www.naffco.com
650
+ 21
651
+ Jetty & Tanker Berth
652
+ Areas (Bunker T erminal)
653
+ These areas are the location for the oil tankers to dock, and where the
654
+ loading and unloading is done.
655
+ The biggest potential hazard in this situation could be the tanker
656
+ itself since it contains a huge amount fuel for the fire to cause
657
+ terrible damage. NAFFCO provides spectacular products and
658
+ solutions for these areas, to ensure the safety of the personnel and
659
+ impede fire hazards from turning into disasters.
660
+ UL listed low level foam monitors & elevated foam monitors
661
+ can protect the entire tanker berth with their wide range
662
+ of fire suppression capabilities.
663
+ • Fire Water Pumps
664
+ • Fire Fighting
665
+ • Fire Hydrants
666
+ • Fire Alarm / Detection
667
+ • Elevated / Tower Monitors
668
+ • Foam System
669
+ • Fire Trucks
670
+ • Safety & Security
671
+ Equipment
672
+ (Oil Spill Control)
673
+
674
+ www.naffco.com
675
+ 22
676
+ Airport & Hangars
677
+ Airports have a lot of commuters and experience a great deal of
678
+ activity It is imperative that they be installed with products of
679
+ utmost reliability and exceptional quality.
680
+ The ceiling level protection of a hangar is provided by our quick
681
+ response Closed Head Sprinklers in association with High Expansion
682
+ Foam Discharge devices.
683
+ NAFFCO’s video image smoke and flame detectors render excellent
684
+ response in fire detection and cover a wide range, mainly above
685
+ and below the wing of the aircraft. The control rooms are being
686
+ protected by our impressive UL listed clean agent FM-200 system.
687
+ • Fire Water Pumps
688
+ • Fire Fighting
689
+ • Fire Hydrants
690
+ • Gas Suppression System
691
+ (IG, FM-200, CO₂ System)
692
+ • Fire Alarm / Detection
693
+ • Foam System
694
+ • Foam Monitors
695
+ • Safety & Security Equipment
696
+ • Fire Trucks and
697
+ • Aircraft Rescue Vehicles
698
+
699
+ www.naffco.com
700
+ 23
701
+ Mining
702
+ NAFFCO has comprehensive products and solutions for the mining
703
+ industry to deal with any type of fire hazard efficiently. Mining is
704
+ regarded as one of the most dangerous industries, and it is of
705
+ utmost importance that the personnel are supplied with the
706
+ appropriate equipment and utilities that guarantee their safety.
707
+ The UL listed fire hydrants and water monitors have been
708
+ designed to be capable of protecting entire mining sites. The fire
709
+ safety equipment for the personnel like helmets, gloves, overalls
710
+ etc. have been manufactured to match and exceed kitemark, UL
711
+ Listing and other international standards.
712
+ • Fire Water Pumps
713
+ • Fire Fighting
714
+ • Water Spray System
715
+ • Gas Suppression System
716
+ (IG, FM-200, CO₂ System)
717
+ • Fire Alarm/Detection
718
+ • Foam System
719
+ • Gas Detection System
720
+ • Fire Hydrant Networks
721
+ • Fire Trucks
722
+ • Fire Doors
723
+ • Pipes and Fittings
724
+ (HDPE, GRE)
725
+ • Safety & Security Equipment
726
+
727
+ www.naffco.com
728
+ 24
729
+ Jetty & Tanker
730
+ Berth Areas
731
+ Industrial Storage Facilities
732
+ (Warehouses)
733
+ Although these facilities are necessary, they are a major fire
734
+ hazard and the smallest of snags could cause massive damage
735
+ to the facility as well as the surroundings. It is obvious that these
736
+ facilities need to be protected with the most high caliber and
737
+ dependable products, like the ones NAFFCO supply.
738
+ The wide variety of the NAFFCO Sprinkler System, and the
739
+ extended range of each sprinkler, is capable of suppressing fire
740
+ swiftly and effectively.
741
+ The smoke detector beams span great lengths and can detect
742
+ smoke or fire, even in obstructed places like rack storages,
743
+ palletized storages, etc.
744
+ • Fire Water Pumps
745
+ • Fire Fighting
746
+ • Water Spray System
747
+ • Gas Suppression System
748
+ (IG, FM-200,CO₂ System)
749
+ • Fire Alarm / Detection
750
+ • Foam System
751
+ • Gas Detection System
752
+ • Fire Hydrant Networks
753
+ • Fire Doors
754
+ • Pipes and Fittings
755
+ (HDPE, GRE)
756
+ • Safety & Security
757
+ Equipment
758
+
759
+ www.naffco.com
760
+ 25
761
+ Industrial Storage Facilities
762
+ (Warehouses)
763
+ All Categories of
764
+ Process Industries
765
+ NAFFCO manufactures a vast range of firefighting equipment that consist of
766
+ internationally certified extinguishers, hoses, reels, valves, risers and fire
767
+ hydrants along with water-based, gas-based, foam-based, powder-based
768
+ and wet chemical fire suppression systems that repress and quell fires quickly.
769
+ NAFFCO also manufactures fire detection System (Omega, infiNet, Legacy
770
+ series) with immensely dependable detectors, sensors and sounders to
771
+ identify and handle fires in the earliest of stages. All these products are
772
+ tested rigorously to ensure their quality is top-notch to provide optimal
773
+ safety and security across all platforms and structures.
774
+ Desalination plants execute the process of obtaining
775
+ clean water from the salty ocean water, either by
776
+ reverse osmosis or by large scale distillation, for
777
+ potable or domestic use. NAFFCO has fixed splendid
778
+ products and solutions at these plants to combat and
779
+ quell fires effectively.
780
+ The Wet barrel hydrant and its accessories are utilized
781
+ to provide optimal protection against fires. The oil
782
+ filled transformers are safe guarded by NAFFCO’s
783
+ High Velocity Spray nozzles that are in compliance
784
+ with the international safety standards.
785
+ • Fire Water Pumps
786
+ • Fire Fighting
787
+ • Water Spray System
788
+ • Gas Suppression
789
+ System (IG, FM-200,
790
+ CO₂ System)
791
+ • Fire Alarm/Detection
792
+ • Foam System
793
+ • Gas Detection System
794
+ • Fire Hydrant Networks
795
+ • Fire Doors
796
+ • Pipes and Fittings
797
+ (HDPE, GRE)
798
+
799
+ www.naffco.com
800
+ 26
801
+ District Cooling &
802
+ Sewage Treatment
803
+ Plants
804
+ The Closed Bulb sprinklers manufactured by NAFFCO can effectively protect
805
+ the AHU (Air Handling units) and cooling fans. The Extra Low voltage System
806
+ consisting of detectors, sensors and sounders are highly dependable for the
807
+ detection of different types of fires and notification at these mechanical
808
+ complexes.
809
+ The control rooms have the UL listed gas suppression System to protect them
810
+ against fire out breaks. The machine towers in STPS are protected by NAFCCO’s UL
811
+ listed Landing valves & Duralex hoses. The process stations like chlorination
812
+ stations, water treatment stations etc. are offered protection by our high caliber
813
+ Fire Extinguishers and Hydrants.
814
+ • Fire Water Pumps
815
+ • Fire Fighting
816
+ • Water Spray System
817
+ • Gas Suppression System
818
+ (IG, FM-200, CO₂ System)
819
+ • Fire Alarm / Detection
820
+ • Foam System
821
+ • Gas Detection System
822
+ • Fire Hydrant Networks
823
+ • Pipes and Fittings
824
+ (HDPE, GRE)
825
+
826
+
827
+ www.naffco.com
828
+ 27
829
+
830
+ www.naffco.com
831
+ 28
832
+ Our Prestigious Clients
833
+ Bangladesh Power Development Board
834
+
835
+ www.naffco.com
836
+ 29
837
+
838
+ www.naffco.com
839
+ 30
840
+ Our Prestigious Clients
841
+
842
+ www.naffco.com
843
+ 31
844
+ Certificates & Approvals
845
+ Certificate of Registration
846
+ QUALITY MANAGEMENT SYSTEM - ISO 9001:2015
847
+ This is to certify that: National Fire Fighting
848
+ Manufacturing Co Ltd
849
+ Plot No. S10201
850
+ Jebel Ali Free Zone South
851
+ PO Box 17014
852
+ Dubai
853
+ United Arab Emirates
854
+ Holds Certificate No: FM 615437
855
+ and operates a Quality Management System which complies with the requirements of ISO 9001:2015 for the
856
+ following scope:
857
+ Design manufacturing of systems for firefighting, fire alarm, fire suppression, HFC 227 EA,
858
+ CO2, inert gas, foam and powder fire protection system. Supply, installation and maintenance
859
+ of systems for firefighting, fire alarm, fire pump, fire suppression, HFC 227 EA, CO2, inert gas,
860
+ foam and powder fire protection system within UAE. Manufacturer of firefighting equipment’s
861
+ such as fire extinguishers, cabinets, hydrants, emergency lights, fire pump set assemblies and
862
+ hose reels. Sales of products as per scope globally.
863
+ For and on behalf of BSI:
864
+ Andrew Launn - EMEA Systems Certification Operations and
865
+ Compliance Director
866
+ Original Registration Date: 2007-02-27 Effective Date: 2017-05-24
867
+ Latest Revision Date: 2017-06-18 Expiry Date: 2019-01-23
868
+ Page: 1 of 2
869
+ This certificate was issued electronically and remains the property of BSI and is bound by the conditions of contract.
870
+ An electronic certificate can be authenticated online.
871
+ Printed copies can be validated at www.bsi-global.com/ClientDirectory or telephone +971 (4) 3364917.
872
+ Information and Contact: BSI, Kitemark Court, Davy Avenue, Knowlhill, Milton Keynes MK5 8PP. Tel: + 44 345 080 9000
873
+ BSI Assurance UK Limited, registered in England under number 7805321 at 389 Chiswick High Road, London W4 4AL, UK.
874
+
875
+ www.naffco.com
876
+ 32
877
+ Serving Over 100 Countries in Fire Protection Systems
878
+ NF-CA-IFS-U1219R-P0120A-BGD
text_extractions/NAFFCO Company Profile -2023.pdf.txt ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ NAFFCO was founded in Dubai, UAE, to become the world’s leading producer and supplier
2
+ of life safety solutions. By recognizing the importance and convenience of having easy access
3
+ to multiple safety services, we became specialized in offering complete solutions under one
4
+ roof for all types of high quality firefighting equipment, fire protection systems, fire alarms,
5
+ addressable emergency systems, security systems, and custom-made vehicles such as fire trucks,
6
+ ambulances, mobile hospitals and Airport Rescue Firefighting (ARFF) Vehicles.
7
+ An Introduction to
8
+ NAFFCO GROUP
9
+ 3
10
+ Passion to protect is more than just a slogan; it’s a way of life for NAFFCO. Keeping you safe
11
+ and your property secure is our business. With a global network spanning over 100 countries,
12
+ NAFFCO has been recognized as the unparalleled leader in fire safety. In recognition of our
13
+ outstanding growth and commitment to quality, we are a five-time recipient of the prestigious
14
+ “Mohammed Bin Rashid Al Maktoum Business Award, in the categories of “Excellence in
15
+ Manufacturing” & “Excellence in Exports.”
16
+ The Dubai Quality Appreciation Program also recognized NAFFCO in 2008, further
17
+ cementing our status as a renowned leader in fire protection solutions. Our highly skilled
18
+ engineering team is constantly designing, supplying, supervising and innovating areas of fire
19
+ safety technology to overcome even the most complex business challenges.
20
+ With your continued support and trust, NAFFCO is now poised to grow its international
21
+ network further. To that end, we appreciate your valued business and commitment to safety in
22
+ the workplace and look forward to serving you for decades to come.
23
+ A Message from
24
+ THE CEO
25
+ ENG. KHALID AL KHATIB
26
+ Chief Executive Officer
27
+ NAFFCO GROUP
28
+ 4
29
+ NAFFCO’s vision is to be the world’s number one provider of innovative solutions
30
+ in protecting life, the environment, and property. At NAFFCO, we care about safety and are
31
+ focused on our mission to empower customers to secure lives, properties, and businesses.
32
+ Our vision is to deliver high quality and innovative fire protection solutions and knowledge using
33
+ world-class manufacturing.
34
+ World-Class Solutions
35
+ VISION & MISSION
36
+ 6
37
+ OUR VALUES
38
+
39
+ AWARDS
40
+ 2017 WINNER
41
+ MANUFACTURING ACROSS GCC
42
+ 2005 WINNER
43
+ EXPORTS
44
+ 2010 WINNER
45
+ MANUFACTURING
46
+ 2006 WINNER
47
+ MANUFACTURING
48
+ 2013 WINNER
49
+ MANUFACTURING
50
+ NAFFCO is a five-time recipient of the prestigious Mohammed bin Rashid Al Maktoum (MRM)
51
+ business award for excellence in Manufacturing and Export areas.
52
+ 9
53
+ Mohammed bin Rashid Al Maktoum Business Award Winner 2017 Manufacturing Category Across GCC
54
+ All our products and management systems are certified by globally recognized certification
55
+ bodies such as BSI, UL, DQS, LPCB and FM. NAFFCO’s Trucks and Vehicles division has been
56
+ assessed and certified for its Quality Management System as an Aviation, Space, and Defense
57
+ organization (AS 9100) by UL-DQS. We have also been awarded Quality Management System
58
+ ISO 9001, certified by BSI and UL-DQS; Environmental (ISO 14001) and Occupational
59
+ Health and Safety (ISO 45001) Management Systems by UL-DQS; and the GC mark for being
60
+ a Trusted Product and Green Company.
61
+ A Tradition of Excellence
62
+ OUR ACCREDITATIONS
63
+ 10
64
+ MEMBERSHIP/AFFILIATION
65
+ PRODUCTS
66
+ CERTIFICATIONS
67
+ NAFFCO FACILITY MANAGEMENT
68
+ SYSTEM CERTIFICATIONS
69
+ NAFFCO VEHICLES MANAGEMENT
70
+ SYSTEM CERTIFICATION
71
+ ACCREDITATIONS
72
+ We specialize in full project management and operation, with the ability to provide support
73
+ services from inception through to ongoing maintenance. We aim to provide a complete
74
+ one-stop-shop service for our customers.
75
+ Complete
76
+ FIRE AND SAFETY SOLUTIONS
77
+ FROM ONE COMPANY
78
+ 12
79
+ NAFFCO’s extensive experience of firefighting systems and application has been instrumental
80
+ in the establishment and rapid development of firefighting vehicles and products. Supported
81
+ by state-of-the-art technology and software, the division carries out extensive research and
82
+ development into optimum configurations for maximum space utilization, engine power
83
+ performance, on-road efficiency and safety/security features. We have a highly qualified and
84
+ experienced Research and Development (R&D) team that is committed to discovering the
85
+ latest technologies and trends, and incorporating them into our vehicles.
86
+ A Passion & Eye for Detail
87
+ DESIGN
88
+ 14
89
+ With a 6.5 million sq ft high-tech manufacturing facility which incorporates CNC, welding,
90
+ and hydraulic shearing and bending machines; NAFFCO has a comprehensive machine shop
91
+ that can meet the needs of any production requirement.
92
+ Commited to Our Craft
93
+ MANUFACTURING
94
+ 18
95
+ 19
96
+ NAFFCO offers a professional installation team for all projects, that incorporates both
97
+ highly qualified and experienced engineers and technicians who have extensive expertise in
98
+ advanced design installations.
99
+ Quality with Integrity
100
+ INSTALLATION
101
+ 22
102
+ Ensuring that all works are carried out to the highest standards by a qualified and professional
103
+ workforce, NAFFCO offers regular quality maintenance checks on all projects. We provide
104
+ technical support and repairs, as well as offering test and cleaning services on a broad portfolio
105
+ of equipment and systems.
106
+ The Smart Way to Work
107
+ MAINTENANCE
108
+ 24
109
+ NAFFCO products are engineered for excellence and to meet the highest standards,
110
+ and are supported by full servicing, maintenance, and training options. With a separate
111
+ department dedicated to the maintenance of firefighting systems and equipment, our high
112
+ calibre engineers and technicians are available around the clock (24 hours) for emergency
113
+ requirements. We also undertake annual and half-yearly maintenance contracts, which ensure
114
+ the smooth functioning of your various firefighting systems and equipment throughout
115
+ the year.
116
+ Customers First
117
+ AFTERSALES
118
+ 26
119
+ 29
120
+ NAFFCO is the leading educational provider of fire fighting training courses throughout
121
+ Dubai and MENA region.
122
+ We provide wide range of fire safety training courses from fire warden training, fire marshal
123
+ training, fire risk assessment training, fire inspector training, to fire protection training courses.
124
+ Empowering Your People
125
+ TRAINING
126
+ 30
127
+ 32
128
+ 33
129
+ With an enduring passion for safety and quality, NAFFCO has built a reputation for protecting
130
+ some of the most iconic and desirable locations throughout the UAE, including prestigious
131
+ projects in Dubai, Abu Dhabi, Sharjah, Ajman and Ras-Al-Khaimah.
132
+ United Arab Emirates
133
+ PRESTIGIOUS PROJECTS
134
+ 35
135
+ 36
136
+ Burj Khalifa, Dubai, UAE
137
+ 37
138
+ Museum of the Future, Dubai, UAE
139
+ The Royal Atlantis Resort & Residences
140
+ PROTECTED BY NAFFCO
141
+ 39
142
+ 40
143
+ The Dubai Eye, Dubai, UAE
144
+
145
+ 41
146
+ The Dubai Metro, Dubai, UAE
147
+ 42
148
+ Dubai Expo 2020, Dubai, UAE
149
+ 43
150
+ The Louvre, Abu Dhabi, UAE
151
+ Midfield Terminal Complex
152
+ Abu Dhabi, UAE
153
+ PROTECTED BY NAFFCO
154
+ 45
155
+ NAFFCO is extending its know-how in developing firefighting solutions internationally, taking
156
+ its expertise to several key global markets. We have established operations in over 100 countries
157
+ worldwide, including, Bahrain, Egypt, Kuwait, Oman, and the Kingdom of Saudi Arabia.
158
+ International
159
+ PRESTIGIOUS PROJECTS
160
+ 47
161
+ King Abdullah Sports City National Stadium
162
+ Jeddah, Saudi Arabia
163
+ PROTECTED BY NAFFCO
164
+ 49
165
+ 50
166
+ Muscat Airport, Oman
167
+ 51
168
+ Omantel Head Quarters, Oman
169
+ Kempinski New Cairo, Egypt
170
+ Al Hamra Towers, Kuwait
171
+ The Nile Ritz Carlton, Egypt
172
+ Quality
173
+ is not AN ACT,
174
+ IT IS A PASSION
175
+ NAFFCO VEHICLES DIVISION
176
+ Developing Vehicles Under Advanced
177
+ World-Class Manufacturing Facilities
178
+ 55
179
+ 56
180
+ Aircraft Rescue Firefighting Vehicle FALCON 6
181
+ 57
182
+ NAFFCO vehicles are engineered for maximum adaptability and reliability under a wide
183
+ range of operating conditions. Our extensive 25 years of experience has allowed for
184
+ rapid development of the trucks division, which is supported by our qualified R&D team,
185
+ who utilize the latest technologies and trends in the field. These powerful in-house resources
186
+ have enabled our engineers to create designs that ensure a reliable vehicle, both on and
187
+ off the road.
188
+ Everyday Vehicles That Aren’t Everyday
189
+ THE PASSIONATE PURSUIT
190
+ OF PERFECTION
191
+ 58
192
+ Flood Rescue Vehicle
193
+ Wide Range of Customized
194
+ Medical & Rescue Vechicles
195
+ WE CARE
196
+ 61
197
+ Our mobile mass casualty unit is a unique resource that has the ability to instantly respond to
198
+ any disaster with up to six doctors and a full EMS team. It is fully equipped with a comprehensive
199
+ array of medical supplies, which allow treatment of up to 150 patients at any one time.
200
+ Preparing for the Unexpected
201
+ MASS CASUALTY UNIT
202
+ 63
203
+ Our Search and Rescue Vehicle is a multipurpose unit intended to be used for the detection
204
+ and rescue of victims of natural disasters such as earthquakes, tsunamis, and hurricanes.
205
+ The Search and Rescue Vehicle is equipped with a unique 2-in-1 wireless seismic detector and
206
+ search camera, main onboard generator, portable backup generator with telescopic mast, and
207
+ mobile light systems to ensure high visibility during night interventions. It carries all of the
208
+ tools needed for the freeing of victims from concrete or metal structures, including but not
209
+ limited to, hydraulic-powered tools, concrete breakers, and pneumatic lifting bags.
210
+ Always at the Ready
211
+ SEARCH AND RESCUE VEHICLE
212
+ 65
213
+ 66
214
+ Wide Range of Firefighting Gears
215
+ No Flame Too High
216
+ FIREFIGHTING PERSONAL
217
+ PROTECTIVE EQUIPMENT
218
+ ENSURE FIRE SAFETY – SAVE LIVES, SAVE PROPERTY
219
+ NAFFCO manufactures and provides a full range of firefighting equipment to firefighters
220
+ around the world. All equipment has been developed in accordance with the industry’s
221
+ latest codes and standards, allowing firefighting teams to combat fires quickly and safely.
222
+ 67
223
+ 68
224
+ Self Contained Breathing Apparatus
225
+ To Breathe is to Live
226
+ SHIELD 7000 SELF CONTAINED
227
+ BREATHING APPARATUS
228
+ Specifically designed for fire fighting, the Shield 7000 Self-Contained Breathing Apparatus
229
+ adds the highest degree of safety and comfort to the wearer at the time when it is needed most.
230
+ It provides high resistance to flames and helps firefighters tackle whatever circumstances
231
+ they encounter much more confidently. The product has also been shown to be highly
232
+ resistant to flash fire tests as per the EN 137: 2006 standard.
233
+ 69
234
+ 70
235
+ Wide Range of Firefighting Equipment
236
+ NAFFCO provides all types of high-quality firefighting equipment, from fire extinguishers,
237
+ hoses and accessories, and reels and cabinets, through to valves and risers, fire hydrants,
238
+ and foam tanks.
239
+ We Serve to Save
240
+ FIREFIGHTING EQUIPMENT
241
+ 71
242
+
243
+ 72
244
+ UL/FM Certified Fire Pump
245
+ 73
246
+ UL/FM Certified Fire Pump Controllers
247
+ 74
248
+ Gas-based
249
+ EXTINGUISHING SYSTEMS
250
+ 75
251
+ NAFFCO is the leading manufacturer of fire rated steel doors, access panels, glazed doors
252
+ & other innovative products that will ensure your safe egress in an emergency situation.
253
+ NAFFCO fire rated doors are designed and manufactured in accordance with internationally
254
+ recognized standards such as NFPA 80, SDI, ANSI/UL 10B, ANSI/UL 10C, BS 476 Part 22,
255
+ CAN/ULC-S104, NAMM HMMA, AHJ & NFPA 252.
256
+ NAFFCO has developed fire resistant aluminum composite cladding panels tested and certified
257
+ as per the highest international standards such as NFPA, EN and ASTM. NAFFCO’s cladding
258
+ panels are 100% locally made including homemade core to ensure superior quality of all
259
+ product aspects, suitable for skyscrapers, malls, theme parks, schools, hospitals, residentials,
260
+ commercial and industrial buildings.
261
+ NAFFCO Fire Rated
262
+ DOORS & FIRE RATED
263
+ CLADDING PANELS
264
+
265
+ Comprehensive Solutions
266
+ EXTRA LOW VOLTAGE
267
+ NAFFCO have designed our products to satisfy the extra low voltage requirements of our
268
+ customers while still enhancing the safety of their buildings. Our safety solutions include fire
269
+ detection and notification systems as well as battery-operated fire, smoke and gas detectors;
270
+ fire rated cables; fire alarms; and much more.
271
+ 76
272
+ 77
273
+ Fire Detection & Notification Systems
274
+ Intelligent
275
+ SECURITY & INTEGRATED SYSTEMS
276
+ As a specialist solutions provider, NAFFCO offers across-the-board security, ICT and
277
+ audiovisual solutions. Our portfolio of products is designed to prevent, detect, and respond
278
+ to any incident.
279
+ 78
280
+ 79
281
+ 80
282
+ Smoke Management Systems
283
+ 81
284
+ Building Management Systems
285
+ 82
286
+ Wide range of HDPE & Steel Pipe Products
287
+ When Performance Matters
288
+ NAFFCO FLOW CONTROL
289
+ NAFFCO Flow Control provides a complete solution for construction projects, along with
290
+ customized system design and supply for unique projects.
291
+ Continuously striving through its R&D to respond first to the ever-changing needs of the
292
+ market; our product portfolio offers a comprehensive, unique, and exclusive range of
293
+ innovative, efficient, and eco-friendly products.
294
+ 83
295
+ NAFFCO…
296
+ The present that precedes the future.
text_extractions/NFPA 1, 2009 Edition.pdf.txt ADDED
The diff for this file is too large to render. See raw diff
 
text_extractions/NFPA 10, 2010 Edition.pdf.txt ADDED
The diff for this file is too large to render. See raw diff
 
text_extractions/NFPA 101, 2012 Edition.pdf.txt ADDED
The diff for this file is too large to render. See raw diff
 
text_extractions/NFPA 13, 2013 Edition.pdf.txt ADDED
The diff for this file is too large to render. See raw diff
 
text_extractions/NFPA 14, 2013 Edition.pdf.txt ADDED
The diff for this file is too large to render. See raw diff
 
text_extractions/NFPA 20 -2019.pdf.txt ADDED
The diff for this file is too large to render. See raw diff
 
text_extractions/NFPA 25, 2011 Edition.pdf.txt ADDED
The diff for this file is too large to render. See raw diff
 
text_extractions/NFPA 72, 2013 Edition.pdf.txt ADDED
The diff for this file is too large to render. See raw diff
 
text_extractions/Top Project List - AMO Green Energy Limited_Sep-2023.pdf.txt ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Date: 17-08-24
2
+ Phone: +88029850836
3
+ Website: www.ge-bd.com
4
+ SL. Project Type Project Name Location Scope of Works Order Placed on Project Status
5
+ 1 Hospital Dr. Fazlul Haque Colorectal Hospital Ltd.
6
+ No of Floors: 14 Nos. Dhanmondi
7
+ Fire Hydrant System, Sprinkler System, Fire Detection &
8
+ Alarm System & Fire Doors
9
+ Pump Capacity: 1000 GPM @12 Bar
10
+ (Diesel, Electrical & Jockey)
11
+ Pipe Quantity: 1.7 Km (Approx.)
12
+ January, 2021 Installation
13
+ Ongoing
14
+ 2 Industrial
15
+ BRB Cable Industries Ltd. (Existing Building)
16
+ 1,400,000 sft (Approx)
17
+ Kushtia
18
+ Fire Hydrant System, Sprinkler System, Fire Detection &
19
+ Alarm System & Fire Doors
20
+ Pump Capacity: 1250 GPM @10 bar
21
+ (Diesel, Electrical & Jockey)
22
+ Pipe Quantity: 4.87 Km (Approx.)
23
+ January, 2021 2022
24
+ 3 Industrial Knit Plus Ltd. Gazipur Fire Doors with Accessories February, 2021 2021
25
+ 4 Industrial
26
+ BRB Cable Industries Ltd.
27
+ (Extension Building)
28
+ 650,000 sft (Approx)
29
+ Kushtia
30
+ Fire Hydrant System
31
+ Pipe Quantity: 2.56 km (Approx)
32
+ May, 2021 2022
33
+ 5 Industrial Paramount Textile Ltd. Gazipur Fire Hydrant System Accessories and Fire Doors with
34
+ Accessories June, 2021 2021
35
+ 6 Industrial
36
+ BRB VCV Tower
37
+ (One of the Tallest Towers in Bangladesh)
38
+ Height: 367'-0"
39
+ No of Floors: 17 Nos.
40
+ Kushtia
41
+ Fire Hydrant System, Sprinkler System Fire Detection &
42
+ Alarm System & Fire Doors
43
+ Pump Capacity: 750 GPM @17 bar
44
+ (Diesel, Electrical & Jockey)
45
+ Pipe Quantity: 3.5 Km (Approx.)
46
+ November, 2021 2023
47
+ 7 Industrial BRB Extension Building and VCV Tower Kushtia Fire Safety Plan November, 2021
48
+ 8 Industrial LIZ Complex Ltd. Gazipur
49
+ Fire Hydrant System and Fire Detection & Alarm System
50
+ Accessories
51
+ Pump Capacity: 1250 GPM @10 Bar
52
+ (Diesel, Electrical & Jockey)
53
+ Pipe Quantity: 3.0 Km (Approx.)
54
+ November, 2021 2023
55
+ 9 Industrial Nassa Knit Ltd. Tejgaon
56
+ Fire Hydrant System and Fire Detection & Alarm System
57
+ Accessories
58
+ Pump Capacity: 750 GPM @10 Bar
59
+ (Diesel, Electrical & Jockey)
60
+ Pipe Quantity: 1.5 Km (Approx.)
61
+ November, 2021 2022
62
+ 10 Industrial Nassa Basic Complex Ltd. Savar Fire Detection & Alarm System November, 2021 2022
63
+ 11 Industrial MNC Apparels Ltd. Chattogram
64
+ Fire Hydrant System, Fire Detection & Alarm System
65
+ Pump Capacity: 1250 GPM @12 Bar
66
+ (Diesel, Electrical & Jockey)
67
+ Pipe Quantity: 3.5 Km (Approx.)
68
+ February, 2022 2023
69
+ 12 Industrial Nassa Knit Ltd. Tejgaon
70
+ Fire Hydrant System and Fire Detection & Alarm System
71
+ Accessories
72
+ Pump Capacity: 750 GPM @10 Bar
73
+ (Diesel, Electrical & Jockey)
74
+ Pipe Quantity: 1.5 Km (Approx.)
75
+ February, 2022 2022
76
+ 13 Industrial Zaber & Zubair Fabrics Ltd. - Fashion Tongi Fire Doors with Accessories April, 2022 2022
77
+ 14 Industrial Zaber & Zubair Fabrics Ltd. - Home Tongi Fire Doors with Accessories April, 2022 2022
78
+ 15 Industrial Nassa Spinners & Garments Ltd. Cumilla EPZ Fire Doors with Accessories May, 2022 2022
79
+ 16 Industrial Nassa Supreme Wash Ltd. Cumilla EPZ Fire Doors with Accessories May, 2022 2022
80
+ 17 Industrial Shah Fatehullah Textile Mills Limited Narayanganj
81
+ Fire Hydrant System Fire Detection & Alarm System
82
+ Pump Capacity: 750 GPM @10 Bar
83
+ (Diesel, Electrical & Jockey)
84
+ Pipe Quantity: 1.1 Km (Approx.)
85
+ May, 2022 2022
86
+ 18 Industrial AJ Super Garments Ltd. Savar Fire Hydrant System June, 2022 Installation
87
+ Ongoing
88
+ 19 Commercial Unimart Limited (United Group)
89
+ Location: Gulshan Gulshan Fire Hydrant System and Fire Detection & Alarm System
90
+ Accessories June, 2022 2023
91
+ 20 Industrial Nassa Taipei Textile Mills Ltd. Narayangonj Fire Doors with Accessories July, 2022 2022
92
+ 21 Industrial Nassa Knit Ltd. Tejgaon
93
+ Fire Hydrant System and Fire Detection & Alarm System
94
+ Accessories
95
+ Pump Capacity: 750 GPM @10 Bar
96
+ (Diesel, Electrical & Jockey)
97
+ Pipe Quantity: 1.5 Km (Approx.)
98
+ August, 2022 2022
99
+ 22 Commercial Unimart Limited (United Group)
100
+ Location: Sylhet Sylhet Fire Hydrant System and Fire Detection & Alarm System
101
+ Accessories August, 2022 2023
102
+ Notable Projects of AMO Green Energy Limited
103
+ Page 1 of 2
104
+ Date: 17-08-24
105
+ Phone: +88029850836
106
+ Website: www.ge-bd.com
107
+ SL. Project Type Project Name Location Scope of Works Order Placed on Project Status
108
+ 23 Industrial Nassa Super Garments Ltd. Savar Fire Curtain November, 2022 Order
109
+ Processed
110
+ 24 Industrial Nassa Super Wash Ltd. Savar Fire Curtain November, 2022 Order
111
+ Processed
112
+ 25 Industrial AJ Super Garments Ltd. Savar Fire Detection & Alarm System Accessories September, 2022 2022
113
+ 26 Industrial Nassa Basic Complex Ltd. Savar Fire Detection & Alarm System Accessories September, 2022 2022
114
+ 27 Industrial Noman Terry Towel Mills Ltd. Gazipur Fire Detection & Alarm System Accessories November, 2022 2022
115
+ 28 Hospital Nassa International Cancer & General Hospital
116
+ Limited Khilkhet Fire Safety Plan February, 2023 2023
117
+ 29 Industrial AJ Super Garments Ltd. Savar Fire Detection & Alarm System Accessories February, 2023 2023
118
+ 30 Industrial Nassa Diamond Gulshan Fire Detection & Alarm System Accessories February, 2023 2023
119
+ 31 Industrial Nassa Taipei Denims Ltd. Comilla Fire Hydrant System Accessories March, 2023 Order
120
+ Processed
121
+ 32 Industrial Utah Fashions Limited Gazipur Fire Hydrant System Accessories April, 2023 Installation
122
+ Ongoing
123
+ 33 Industrial Utah Fashions Limited Gazipur Fire Doors with Accessories April, 2023 Installation
124
+ Ongoing
125
+ 34 Industrial Utah Knitting & Dyeing Ltd Gazipur Fire Hydrant System Accessories, Fire Doors with
126
+ Accessories April, 2023 Order
127
+ Processed
128
+ 35 Industrial Toy Woods (BD) Co. Ltd (Nassa Group) Chittagong Fire Hydrant System Accessories, Fire Detection System
129
+ Accessories April, 2023 Order
130
+ Processed
131
+ 36 Hospital United Hospital Limited Gulshan Fire Hydrant System Accessories May, 2023 2023
132
+ 37 Industrial Paramount Textile Ltd. Gulshan Fire Doors with Accessories May, 2023 Order
133
+ Processed
134
+ 38 Industrial Liz Apparels Limited Gazipur Fire Doors with Accessories May, 2023 Order
135
+ Processed
136
+ 39 Industrial Nassa Super Garments Ltd. Savar Fire Doors with Accessories May, 2023 Order
137
+ Processed
138
+ 40 Industrial Nassa Super Wash Ltd. Savar Fire Doors with Accessories May, 2023 Order
139
+ Processed
140
+ 41 Commercial Hangar - Dhaka Airport Dhaka Airport Fire Hydrant System and Fire Detection & Alarm System
141
+ Accessories May, 2023 Order
142
+ Processed
143
+ 42 Commercial Hangar - Dhaka Airport Dhaka Airport Fire Hydrant System Accessories (Pipes) May, 2023 Order
144
+ Processed
145
+ 43 Hotel IPCO Hotels Limited (United Group) Kurmitola Fire Detection & Alarm System Accessories May, 2023 Order
146
+ Processed
147
+ 44 Industrial AJ Super Garments Ltd. Savar Fire Hydrant System June, 2023 2023
148
+ 45 Industrial AJ Super Garments Ltd. Savar Fire Detection & Alarm System Accessories July, 2023 2023
149
+ 46 Industrial Agami Apparels Ltd. (Dekko Legacy Group) Ashulia Fire Doors with Accessories July, 2023 Order
150
+ Processed
151
+ 47 Industrial Dekko Designs Ltd. (Dekko Legacy Group) Ashulia Fire Doors with Accessories July, 2023 Order
152
+ Processed
153
+ 48 Industrial United Lube Oil Limited Savar Fire Hydrant System and Fire Detection & Alarm System
154
+ Accessories July, 2023 Installation
155
+ Ongoing
156
+ 49 Industrial Zaber & Zubair Fabrics Ltd. - Fashion Tongi Fire Detection & Alarm System Accessories August, 2023 Order
157
+ Processed
158
+ 50 Industrial Utah Fashions Limited Gazipur Fire Hydrant System Accessories August, 2023 Order
159
+ Processed
160
+ 51 Industrial Noman Terry Towel Mills Ltd. Gazipur Fire Detection & Alarm System Accessories September, 2023 Order
161
+ Processed
162
+ 52 Hotel Bay Hills Hotel (Goldsands Group) Cox's Bazar Fire Hydrant System and Fire Detection & Alarm System
163
+ Accessories September, 2023 Order
164
+ Processed
165
+ 53 Industrial Noman Terry Towel Mills Ltd. Gazipur Fire Detection & Alarm System Accessories and Fire Doors
166
+ with Accessories November, 2023 Order
167
+ Processed
168
+ 54 Industrial Youngone Group Savar Fire Detection & Alarm System Accessories and Fire Doors
169
+ with Accessories March, 2024 Order
170
+ Processed
171
+ 55 Industrial Sparkle Knit Composite Ltd. Savar Fire Doors with Accessories March, 2024 Order
172
+ Processed
173
+ 56 Industrial AJ Super Garments Ltd. Savar Fire Damper July, 2024 Order
174
+ Processed
175
+ 57 Industrial Utah Fashions Limited Gazipur Fire Hydrant System Accessories, Fire Doors with
176
+ Accessories August, 2024 Order
177
+ Processed
178
+ 58 Industrial Utah Knitting & Dyeing Ltd Gazipur Fire Hydrant System Accessories, Fire Doors with
179
+ Accessories August, 2024 Order
180
+ Processed
181
+ And many more…
182
+ Page 2 of 2