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 Destination | Direction | Event |
|---|---|---|
/topic/polls/{pollId} | Server → Clients | Question state changes, response counts |
/topic/polls/{pollId}/format | Server → Clients | Chart format changes |
/topic/polls/{pollId}/timer | Server → Clients | Timer start/pause/expire |
/topic/qa/{pollId} | Server → Clients | New Q&A submissions and votes |
/app/polls/{pollId}/response | Client → Server | Participant response submission |
/app/polls/{pollId}/qa | Client → Server | Q&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
| Layer | Technology | Version |
|---|---|---|
| Frontend | Next.js + TypeScript | 16 |
| Styling | Tailwind CSS + DaisyUI | v4 + v5 |
| Backend | Spring Boot + Maven | 4.x |
| Language | Java (OpenJDK Temurin) | 25 |
| Database | PostgreSQL + Flyway | 18 + latest |
| Real-time | Spring WebSocket (STOMP + SockJS) | — |
| Office Add-in | Office.js + Vite + TypeScript | — |
| AI / NLP | Azure OpenAI | GPT-4o |
| Auth | Azure CIAM (Entra External Identities) | — |
| Cloud | Azure App Service + SWA + PostgreSQL Flexible | — |
| CI/CD | GitHub Actions | — |
| Docs | Docusaurus 3 | 3.x |