DocxEnhancer is an AI-powered web application that allows users to upload .docx files formatted with MCQs and receive a richly enhanced version of the document. It intelligently adds answers, explanations, and references using the OpenAI Assistant API β helping educators, students, and content creators save time and effort.
-
Upload
.docxfiles with:Question: [MCQ options] Explanation: -
Automatically enriches the document by adding:
- β Correct Answer
- π‘ Enhanced Explanation
- π Reference (optional)
-
Edit generated explanations or transform content into AI prompts
-
Download the enhanced
.docxfile -
Powered by OpenAI's Assistant API
-
Real-time processing with
Next.js,Express, andNode.js
| Frontend | Backend | AI/Processing |
|---|---|---|
| Next.js | Express.js | OpenAI Assistant API |
| React | Node.js | Mommuth (docx parsing) |
| Tailwind CSS | Multer (upload) | Custom Enhancement Logic |
/DocxEnhancer
βββ backend
β βββ config
β β βββ mongoose.connection.js
β βββ models
β β βββ document.model.js
β βββ package.json
β βββ package-lock.json
β βββ routes
β β βββ document.route.js
β βββ schemas
β β βββ document.schema.js
β β βββ question.schema.js
β βββ server.js
β βββ utils
β βββ parseQuestion.js
βββ frontend
βββ app
β βββ batch
β β βββ [id]
β β βββ page.tsx
β βββ globals.css
β βββ layout.tsx
β βββ page.tsx
β βββ prompt
β βββ page.tsx
βββ components
β βββ app-sidebar.tsx
β βββ improve-dialog.tsx
β βββ theme-provider.tsx
β βββ ui
β β βββ [... dozens of ui components ...]
β βββ upload-dialog.tsx
βββ components.json
βββ hooks
β βββ use-mobile.tsx
β βββ use-toast.ts
βββ lib
β βββ utils.ts
βββ next.config.mjs
βββ next-env.d.ts
βββ package.json
βββ pnpm-lock.yaml
βββ postcss.config.mjs
βββ public
βββ tailwind.config.ts
βββ tsconfig.jsonAn assistant is a custom versoin of ChatGPT that you've configured for a specific task. Think of it like a tailored chatbot or agent that has its own:
- Instructions (behavior/personality/goals).
- Tools (like code interpreter, retrival, or your own APIs).
- Files (optional context).
- Model (GPT-4, GPT-3.5, etc).
Once you create an Assistant, it gets a persistent ID - you reuse that assistant anytime you want that behavior.
A Thread is a conversation between a user and an assistant. It stores:
- All messages (user + assistant)
- All runs (calls to GPT to generate response)
Each user can have multiple sessions, and Threads help you:
- Separate conversations
- Resume them later
- Keep context over time
A Run is an event that triggers the Assistant to process the messages in a Thread and respond.
It's like saying: "Hey assistant, process this conversation and reply."
- Checks the Assistant's settings
- Reads the current Thread
- Calls the model (like GPT-4)
- Sends back the Assistant's reply
Messages are the individual chat messages in a Thread.
- A message has a
role: eitheruserorassistant - A message has
content: the text (or files, in advanced cases)
Letβs say you want to chat with the assistant about JavaScript:
- You add a message: "Explain closures in JavaScript"
- You start a run -> assistant reads all messages
- It replies with an explanation -> new assistant message is added
- Clone the repo:
git clone https://github.com/ExploitEngineer/DocxEnhancer.git
cd DocxEnhancer- Install dependencies:
# For backend
cd backend
npm install
# For frontend
cd ../frontend
npm install- Create
.envfile in/backendwith:
OPENAI_API_KEY=your_openai_api_key
PORT=5000
- Run the app:
# Run backend
cd backend
npm run dev
# Run frontend
cd ../frontend
npm run devVisit http://localhost:3000 to get started!
Question:
Which protocol does HTTPS use?
A. FTP
B. SSH
C. TLS
D. TCP
Explanation:
Used for secure communication.
The output will add:
- Answer: C. TLS
- Explanation: HTTPS uses TLS (Transport Layer Security) to encrypt communications between web clients and servers.
- Reference: Wikipedia - HTTPS
MIT License. Free for personal and commercial use.
Pull requests, issues, and discussions are welcome! Letβs improve AI-enhanced education tools together.
Made with β€οΈ by ExploitEngineer