AWS Builder Center

Building an Event-Driven RAG Portal for AWS Student Communities with Node.js & Bedrock

Building an Event-Driven RAG Portal for AWS Student Communities with Node.js & Bedrock

Explore how we built a full-stack AI-powered Club Member Portal utilizing Node.js, SQLite, and a dynamic Retrieval-Augmented Generation (RAG) backend. Learn how our architecture enables near real-time document indexing within 60 seconds and seamlessly maps to a production-ready AWS server less deployment model

Introduction

During campus hackathons and community events, schedules change and announcements get lost in crowded chat threads[cite: 2]. Traditional static FAQs fail when updates need to be delivered instantly[cite: 2].
To solve this, our team engineered an AI-Powered Club Member Portal with Near Real-Time Knowledge Synchronization. Built with Node.js, Express, and a custom Retrieval-Augmented Generation (RAG) engine, the platform allows admins to publish updated event documentation on the fly. The vector store re-indexes and serves updated knowledge within 60 seconds without requiring client-side page refreshes[cite: 2].



What We Built & Key Technical Features

1. Identity & Self-Service Recovery

  • User Authentication: Complete signup and login flow backed by SQLite ( club_portal.db ) and custom authentication middleware ( authMiddleware.js ).
  • OTP Password Reset: Automated one-time password generation and validation pipeline ( utils/otp.js ,  emailService.js ).

2. Strict RAG Context Grounding

  • Starter Pack Ingestion: On server launch, the engine embeds eight starter Markdown documents covering club FAQs, AWS setup, hackathon rules, and serverless patterns.
  • Mandatory Source Citations: Every reply includes exact source document links and section references.
  • Zero-Hallucination Fallback: If a query falls outside the indexed knowledge base, the system refrains from guessing and routes members directly to the campus AWS Student Builder contact ( 01-onboarding-faq.md ).

3. Dynamic Knowledge Synchronization (~60s Latency)

  • Admin Publishing: Admins can paste or upload new documents (e.g.,  event-day-briefing.md ) via  admin.html .
  • Automated Re-Indexing: Submissions automatically trigger  indexingService.js  to chunk, embed ( embeddingService.js ), and hot-swap vector store indices ( vector-store/ ).
  • Interoperable Evaluator Endpoint: Exposes a standard  POST /ask  contract on  0.0.0.0:8080/ask  returning unnested JSON with grounded answers and ranked source confidence scores[cite: 2].



Application Architecture & Directory Flow

Our application follows a clean MVC structure separating routes, controllers, services, and view layers:
club-member-portal/ │ ├── frontend/ │ ├── index.html │ ├── login.html │ ├── signup.html │ ├── forgot-password.html │ ├── verify-otp.html │ ├── reset-password.html │ ├── chat.html │ ├── admin.html │ │ │ ├── css/ │ │ ├── global.css │ │ ├── landing.css │ │ ├── auth.css │ │ ├── chat.css │ │ └── admin.css │ │ │ └── js/ │ ├── main.js │ ├── login.js │ ├── signup.js │ ├── forgot-password.js │ ├── verify-otp.js │ ├── reset-password.js │ ├── chat.js │ ├── history.js │ ├── profile.js │ └── admin.js │ ├── backend/ │ ├── server.js │ │ │ ├── routes/ │ │ ├── authRoutes.js │ │ ├── userRoutes.js │ │ ├── chatRoutes.js │ │ ├── adminRoutes.js │ │ └── documentRoutes.js │ │ │ ├── controllers/ │ │ ├── authController.js │ │ ├── userController.js │ │ ├── chatController.js │ │ ├── adminController.js │ │ └── documentController.js │ │ │ ├── middleware/ │ │ ├── authMiddleware.js │ │ └── adminMiddleware.js │ │ │ ├── services/ │ │ ├── emailService.js │ │ ├── documentService.js │ │ ├── embeddingService.js │ │ ├── indexingService.js │ │ ├── ragService.js │ │ └── aiService.js │ │ │ ├── utils/ │ │ ├── otp.js │ │ └── password.js │ │ │ ├── database/ │ │ ├── database.js │ │ ├── schema.sql │ │ └── club_portal.db │ │ │ ├── documents/ │ │ ├── 01-onboarding-faq.md │ │ ├── 02-aws-account-setup.md │ │ ├── 03-builder-center-publish.md │ │ ├── 04-bedrock-starter.md │ │ ├── 05-hackathon-rules.md │ │ ├── 06-workshop-index.md │ │ ├── 07-lambda-patterns.md │ │ ├── 08-sbg-community.md │ │ └── event-day-briefing.md │ │ │ └── vector-store/ │ ├── .env ├── .gitignore ├── package.json └── README.md
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article