Skip to main content

Architecture

NextGenPoll is a full-stack monorepo composed of four primary components deployed to Azure.


Component Overview

← swipe to explore →

Client Browsers
Participants
any device, anonymous
Presenter
session host
PowerPoint Add-in
Office.js · TypeScript
Frontend
nextgenpoll-web
Next.js 16 · TypeScript
Azure App Service
nextgenpoll-docs
Docusaurus 3
Azure Static Web Apps
Backend API
nextgenpoll-api
Spring Boot 4 · Java 25
Azure App Service
Data & Services
nextgenpoll-db
PostgreSQL 17
Flexible Server
Azure CIAM
Entra External IDs
OAuth 2.0 / PKCE
acs-mail
Azure Communication Svcs
nextgenpoll.com
nextgenpoll-storage
Azure Blob Storage
question-images
nextgenpoll-ai
Azure OpenAI · GPT-4o
AI Foundry

Repository Structure

NextGenPoll/
├── backend/ Java 25 + Spring Boot 4 (REST API + WebSocket)
├── frontend/ Next.js 16 + TypeScript + Tailwind CSS v4 + DaisyUI v5
├── powerpoint/ Office.js + Vite + TypeScript (PowerPoint add-in)
├── packages/
│ └── shared/ Shared TypeScript types and API utilities
├── docs/ Docusaurus 3 (this documentation site)
├── k6/ Load testing scripts (k6.io)
└── docker-compose.yml Local PostgreSQL 18

Real-time Communication

NextGenPoll uses STOMP over SockJS for real-time updates:

STOMP DestinationDirectionEvent
/topic/polls/{pollId}Server → ClientsQuestion state changes, response counts
/topic/polls/{pollId}/formatServer → ClientsChart format changes
/topic/polls/{pollId}/timerServer → ClientsTimer start/pause/expire
/topic/qa/{pollId}Server → ClientsNew Q&A submissions and votes
/app/polls/{pollId}/responseClient → ServerParticipant response submission
/app/polls/{pollId}/qaClient → ServerQ&A question submission

The frontend STOMP client is built in frontend/lib/stomp-client.ts.


Authentication Flow

  • Participants — anonymous; no authentication required to join or respond.
  • Presenters / Admins — authenticated via Azure CIAM (External Identities) using MSAL.js (PKCE flow) on the frontend; backend validates tokens as JWTs via Spring Security OAuth2 Resource Server.

See Azure CIAM Setup for configuration details.


Tech Stack Reference

LayerTechnologyVersion
FrontendNext.js + TypeScript16
StylingTailwind CSS + DaisyUIv4 + v5
BackendSpring Boot + Maven4.x
LanguageJava (OpenJDK Temurin)25
DatabasePostgreSQL + Flyway18 + latest
Real-timeSpring WebSocket (STOMP + SockJS)
Office Add-inOffice.js + Vite + TypeScript
AI / NLPAzure OpenAIGPT-4o
AuthAzure CIAM (Entra External Identities)
CloudAzure App Service + SWA + PostgreSQL Flexible
CI/CDGitHub Actions
DocsDocusaurus 33.x