Skip to content

yashitz07/FAQ-Management-System

Repository files navigation

FAQ Management System with Multilingual Support and Caching

This project is a FAQ management system built with Node.js, MongoDB, Redis, and integrates Google Translate API for multilingual translation. It provides an admin panel for managing FAQs and utilizes Redis for caching data, improving performance. Demo video with basic frotend Watch the video


Table of Contents

  1. Installation Steps
  2. API Usage Examples
  3. How I Implemented This Project
  4. Libraries and APIs Used

Installation Steps

Follow these steps to set up the FAQ management system:

  1. Clone the Repository:

    git clone https://github.com/yashitz07/FAQs.git
    cd FAQs
  2. Install Dependencies: Ensure you have Node.js and npm installed, then run:

    npm install
  3. Set Up Environment Variables: Create a .env file in the root directory and add the following configurations:

    MONGO_URI=mongodb+srv://your_mongo_uri
    REDIS_HOST=127.0.0.1
    REDIS_PORT=6379
    GOOGLE_API_KEY=your_google_translate_api_key
  4. Start the Server:

    npm start

    The server will be running on http://localhost:5000.


API Usage Examples

1. Fetch FAQs (With Language Support)

Request:

GET /api/faqs?lang=en

This endpoint retrieves all FAQs in the specified language. The default language is English (en).

2. Get Translations for an FAQ

Request:

GET /api/faqs/translations/:id

App Screenshot

CRUD Operations

Post Request:

POST /api/faqs

** Read FAQs**

GET /api/faqs?lang=hi

** Update FAQ**

PUT /api/faqs/:id

Delete FAQ

DELETE /api/faqs/:id

Libraries and APIs Used

  • Express: Framework for building the API and admin routes.
  • MongoDB / Mongoose: For data storage and querying.
  • Redis: For caching FAQ data and improving performance.
  • Google Translate API: For multilingual translation of FAQ questions.
  • sanitize-html: For sanitizing the answer text input.
  • EJS: For rendering views in the admin panel.
  • dotenv: For managing environment variables.
  • CORS: To allow cross-origin requests.

Thanks BharatFD for this amazing task and had a lots of learning while building this.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published