A full-stack note summarization app that turns raw notes into clean, easy-to-read summaries.
You write or paste a note in the frontend. The backend stores the note in MongoDB, sends the content to the Python AI service, receives a summarized version from the LLM, saves the updated text back to the database, and then refreshes the frontend so the new summary appears immediately.
frontend/- Next.js UI for creating, editing, deleting, and summarizing notesbackend/- NestJS API that manages chats, chat messages, and the summarize workflowai-service/- FastAPI service that calls Groq through LangChain and returns the summary textscripts/- helper scripts used during setup
Click the thumbnail above to open the demo video.
- The frontend sends a note to the NestJS backend.
- The backend stores the note in MongoDB.
- When you click the summarize button, the frontend calls
POST /chatMessage/summarize. - The backend forwards the note text to the AI service at
POST /api/ai-service/summarize. - The AI service sends the prompt to the LLM and returns a plain-language summary.
- The backend updates the original chat message in MongoDB with the summary.
- The frontend refetches the active chat messages so the updated text shows right away.
- Node.js 18+ or 20+
- Python 3.10+ and
pip - MongoDB running locally or a MongoDB connection string
- A Groq API key for the AI service
git clone <your-repo-url>
cd ai-note-summarizercd backend
npm installCreate a .env file in backend/ with:
MONGO_URL=mongodb://127.0.0.1:27017/ai-note-summarizer
PORT=8000cd ../ai-service
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txtCreate a .env file in ai-service/ with:
GROQ_API_KEY=your_groq_api_key_herecd ../frontend
npm installOpen three terminals and start each service separately.
cd backend
npm run start:devRuns on http://localhost:8000 by default.
cd ai-service
uvicorn app:app --reload --port 8080Runs on http://127.0.0.1:8080.
cd frontend
npm run devRuns on http://localhost:3000.
MONGO_URL- MongoDB connection stringPORT- backend port, defaults to8000
GROQ_API_KEY- Groq API key used by the LLM client
POST /chatMessage/postChatMessageGET /chatMessage/getChatMessages/:chatIdPATCH /chatMessage/updateChatMessage/:idDELETE /chatMessage/deleteChatMessage/:idPOST /chatMessage/summarize
GET /POST /api/ai-service/summarize
- Summaries are saved back to the same chat message document.
- The frontend refetches the active chat messages after summarizing.
- The AI prompt is configured to return plain paragraph text, not markdown bullet lists.
- Frontend: Next.js, React, Redux Toolkit Query, Ant Design, Tailwind CSS
- Backend: NestJS, MongoDB, Mongoose
- AI service: FastAPI, LangChain, Groq
- If summarization fails, make sure the backend can reach the AI service on port
8080. - If the backend cannot start, verify that
MONGO_URLis set correctly. - If the AI service cannot start, verify that
GROQ_API_KEYis present inai-service/.env. - If the frontend does not show updated text, make sure all three services are running and the backend is returning the updated message.
This project is currently unlicensed in the repository.