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
- Installation Steps
- API Usage Examples
- How I Implemented This Project
- Libraries and APIs Used
Follow these steps to set up the FAQ management system:
-
Clone the Repository:
git clone https://github.com/yashitz07/FAQs.git cd FAQs -
Install Dependencies: Ensure you have Node.js and npm installed, then run:
npm install
-
Set Up Environment Variables: Create a
.envfile 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
-
Start the Server:
npm start
The server will be running on
http://localhost:5000.
Request:
GET /api/faqs?lang=enThis endpoint retrieves all FAQs in the specified language. The default language is English (en).
Request:
GET /api/faqs/translations/:idPost Request:
POST /api/faqs** Read FAQs**
GET /api/faqs?lang=hi** Update FAQ**
PUT /api/faqs/:idDelete FAQ
DELETE /api/faqs/:id- 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.
