# piyushfunde/nova architecture

> Architecture diagram of the GitHub repository piyushfunde/nova, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/piyushfunde/nova
- Repository: https://github.com/piyushfunde/nova

## Overview

Nova is an AI conversational workspace with a Next.js marketing and chat frontend and a Spring Boot API. Users browse product information, register or sign in, then use the authenticated workspace to create and manage conversations, load history, and send messages. The backend authenticates requests, persists users/conversations/messages, and forwards chat context to an OpenAI-compatible provider. README documents DeepThink and provider choices; the sampled excerpts do not show DeepThink’s implementation, so it is represented within the workspace without an asserted backend flow.

Main entry points: [`backend/src/main/java/com/chatbot/chat/ConversationController.java`](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/ConversationController.java) (Conversation API), [`backend/src/main/java/com/chatbot/auth/AuthController.java`](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/auth/AuthController.java) (Auth endpoints), [`backend/src/main/java/com/chatbot/chat/ChatService.java`](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/ChatService.java) (Chat orchestration), [`src/services/api.ts`](https://github.com/piyushfunde/nova/blob/main/src/services/api.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_landing["Landing page<br/>[LandingPage.tsx]"]
  node_marketing["Marketing pages"]
  node_navigation["Marketing navigation<br/>[MarketingNav.tsx]"]
  node_faq["FAQ accordion<br/>[FaqAccordion.tsx]"]
  node_logo["Radial logo<br/>[RadialLogo.tsx]"]
  node_chatpage["Chat route<br/>[page.tsx]"]
  node_authpanel["Sign-in panel<br/>[AuthPanel.tsx]"]
  node_workspace["Chat workspace<br/>[ChatWorkspace.tsx]"]
  node_api["API client<br/>[api.ts]"]
end

subgraph group_identity["Identity and access"]
  node_authapi["Auth endpoints"]
  node_jwt["JWT service<br/>[JwtService.java]"]
  node_jwtfilter["JWT filter"]
  node_security["Security config"]
end

subgraph group_conversation["Conversation service"]
  node_conversationapi["Conversation API"]
  node_chatservice["Chat orchestration<br/>[ChatService.java]"]
end

subgraph group_storage["Persistence"]
  node_userentity["User account<br/>[User.java]"]
  node_userrepo["User repository"]
  node_conversationentity["Conversation record<br/>[Conversation.java]"]
  node_conversationrepo["Conversation repository"]
  node_messageentity["Message record<br/>[Message.java]"]
  node_messagerepo["Message repository"]
end

node_visitor(("Visitor"))
node_database[("Relational database")]
node_provider["AI provider"]

node_visitor -->|"visits"| node_landing
node_visitor -->|"browses"| node_marketing
node_visitor -->|"opens"| node_chatpage
node_landing -->|"renders"| node_navigation
node_marketing -->|"renders"| node_navigation
node_marketing -->|"renders"| node_faq
node_navigation -->|"renders"| node_logo
node_chatpage -->|"renders"| node_authpanel
node_chatpage -->|"renders"| node_workspace
node_authpanel -->|"authenticates via"| node_api
node_authpanel -->|"renders"| node_logo
node_workspace -->|"requests data"| node_api
node_api -->|"posts credentials"| node_authapi
node_api -->|"calls endpoints"| node_conversationapi
node_authapi -->|"looks up users"| node_userrepo
node_authapi -->|"issues tokens"| node_jwt
node_authapi -->|"creates accounts"| node_userentity
node_security -->|"registers filter"| node_jwtfilter
node_jwtfilter -->|"validates tokens"| node_jwt
node_conversationapi -->|"delegates chat"| node_chatservice
node_conversationapi -->|"reads and writes"| node_conversationrepo
node_conversationapi -->|"reads and deletes"| node_messagerepo
node_conversationapi -->|"finds account"| node_userrepo
node_chatservice -->|"loads and saves"| node_conversationrepo
node_chatservice -->|"loads and saves"| node_messagerepo
node_chatservice -->|"sends chat context"| node_provider
node_conversationrepo -.->|"persists records"| node_database
node_messagerepo -.->|"persists records"| node_database
node_userrepo -.->|"persists accounts"| node_database
node_conversationentity -->|"belongs to"| node_userentity
node_messageentity -->|"belongs to"| node_conversationentity

click node_landing "https://github.com/piyushfunde/nova/blob/main/src/components/LandingPage.tsx"
click node_marketing "https://github.com/piyushfunde/nova/tree/main/src/app"
click node_navigation "https://github.com/piyushfunde/nova/blob/main/src/components/MarketingNav.tsx"
click node_faq "https://github.com/piyushfunde/nova/blob/main/src/components/FaqAccordion.tsx"
click node_logo "https://github.com/piyushfunde/nova/blob/main/src/components/RadialLogo.tsx"
click node_chatpage "https://github.com/piyushfunde/nova/blob/main/src/app/chat/page.tsx"
click node_authpanel "https://github.com/piyushfunde/nova/blob/main/src/components/AuthPanel.tsx"
click node_workspace "https://github.com/piyushfunde/nova/blob/main/src/components/ChatWorkspace.tsx"
click node_api "https://github.com/piyushfunde/nova/blob/main/src/services/api.ts"
click node_authapi "https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/auth/AuthController.java"
click node_jwt "https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/auth/JwtService.java"
click node_jwtfilter "https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/auth/JwtAuthenticationFilter.java"
click node_security "https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/config/SecurityConfig.java"
click node_userentity "https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/user/User.java"
click node_userrepo "https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/user/UserRepository.java"
click node_conversationapi "https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/ConversationController.java"
click node_chatservice "https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/ChatService.java"
click node_conversationentity "https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/Conversation.java"
click node_conversationrepo "https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/ConversationRepository.java"
click node_messageentity "https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/Message.java"
click node_messagerepo "https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/MessageRepository.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_landing,node_marketing,node_navigation,node_faq,node_logo,node_chatpage,node_authpanel,node_workspace,node_api toneBlue
class node_authapi,node_jwt,node_jwtfilter,node_security,node_database toneAmber
class node_conversationapi,node_chatservice toneMint
class node_userentity,node_userrepo,node_conversationentity,node_conversationrepo,node_messageentity,node_messagerepo toneRose
class node_visitor,node_provider toneIndigo
```

## Components

### Web experience

- [Landing page](https://github.com/piyushfunde/nova/blob/main/src/components/LandingPage.tsx): `src/components/LandingPage.tsx`
- [Marketing pages](https://github.com/piyushfunde/nova/tree/main/src/app): `src/app`
- [Marketing navigation](https://github.com/piyushfunde/nova/blob/main/src/components/MarketingNav.tsx): `src/components/MarketingNav.tsx`
- [FAQ accordion](https://github.com/piyushfunde/nova/blob/main/src/components/FaqAccordion.tsx): `src/components/FaqAccordion.tsx`
- [Radial logo](https://github.com/piyushfunde/nova/blob/main/src/components/RadialLogo.tsx): `src/components/RadialLogo.tsx`
- [Chat route](https://github.com/piyushfunde/nova/blob/main/src/app/chat/page.tsx): `src/app/chat/page.tsx`
- [Sign-in panel](https://github.com/piyushfunde/nova/blob/main/src/components/AuthPanel.tsx): `src/components/AuthPanel.tsx`
- [Chat workspace](https://github.com/piyushfunde/nova/blob/main/src/components/ChatWorkspace.tsx): `src/components/ChatWorkspace.tsx`
- [API client](https://github.com/piyushfunde/nova/blob/main/src/services/api.ts): `src/services/api.ts`

### Identity and access

- [Auth endpoints](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/auth/AuthController.java): `backend/src/main/java/com/chatbot/auth/AuthController.java`
- [JWT service](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/auth/JwtService.java): `backend/src/main/java/com/chatbot/auth/JwtService.java`
- [JWT filter](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/auth/JwtAuthenticationFilter.java): `backend/src/main/java/com/chatbot/auth/JwtAuthenticationFilter.java`
- [Security config](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/config/SecurityConfig.java): `backend/src/main/java/com/chatbot/config/SecurityConfig.java`

### Conversation service

- [Conversation API](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/ConversationController.java): `backend/src/main/java/com/chatbot/chat/ConversationController.java`
- [Chat orchestration](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/ChatService.java): `backend/src/main/java/com/chatbot/chat/ChatService.java`

### Persistence

- [User account](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/user/User.java): `backend/src/main/java/com/chatbot/user/User.java`
- [User repository](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/user/UserRepository.java): `backend/src/main/java/com/chatbot/user/UserRepository.java`
- [Conversation record](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/Conversation.java): `backend/src/main/java/com/chatbot/chat/Conversation.java`
- [Conversation repository](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/ConversationRepository.java): `backend/src/main/java/com/chatbot/chat/ConversationRepository.java`
- [Message record](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/Message.java): `backend/src/main/java/com/chatbot/chat/Message.java`
- [Message repository](https://github.com/piyushfunde/nova/blob/main/backend/src/main/java/com/chatbot/chat/MessageRepository.java): `backend/src/main/java/com/chatbot/chat/MessageRepository.java`

### Other components

- **Visitor**
- **Relational database**
- **AI provider**

## Connections

- Visitor → Landing page: visits (evidence: `README.md`)
- Visitor → Marketing pages: browses (evidence: `README.md`)
- Visitor → Chat route: opens (evidence: `README.md`)
- Landing page → Marketing navigation: renders (evidence: `src/components/LandingPage.tsx`)
- Marketing pages → Marketing navigation: renders (evidence: `src/app/benefits/page.tsx`)
- Marketing pages → FAQ accordion: renders (evidence: `src/app/faq/page.tsx`)
- Marketing navigation → Radial logo: renders (evidence: `src/components/MarketingNav.tsx`)
- Chat route → Sign-in panel: renders (evidence: `src/app/chat/page.tsx`)
- Chat route → Chat workspace: renders (evidence: `src/app/chat/page.tsx`)
- Sign-in panel → API client: authenticates via (evidence: `src/components/AuthPanel.tsx`)
- Sign-in panel → Radial logo: renders (evidence: `src/components/AuthPanel.tsx`)
- Chat workspace → API client: requests data (evidence: `src/components/ChatWorkspace.tsx`)
- API client → Auth endpoints: posts credentials (evidence: `src/services/api.ts`)
- API client → Conversation API: calls endpoints (evidence: `src/services/api.ts`)
- Auth endpoints → User repository: looks up users (evidence: `backend/src/main/java/com/chatbot/auth/AuthController.java`)
- Auth endpoints → JWT service: issues tokens (evidence: `backend/src/main/java/com/chatbot/auth/AuthController.java`)
- Auth endpoints → User account: creates accounts (evidence: `backend/src/main/java/com/chatbot/auth/AuthController.java`)
- Security config → JWT filter: registers filter (evidence: `backend/src/main/java/com/chatbot/config/SecurityConfig.java`)
- JWT filter → JWT service: validates tokens (evidence: `backend/src/main/java/com/chatbot/auth/JwtAuthenticationFilter.java`)
- Conversation API → Chat orchestration: delegates chat (evidence: `backend/src/main/java/com/chatbot/chat/ConversationController.java`)
- Conversation API → Conversation repository: reads and writes (evidence: `backend/src/main/java/com/chatbot/chat/ConversationController.java`)
- Conversation API → Message repository: reads and deletes (evidence: `backend/src/main/java/com/chatbot/chat/ConversationController.java`)
- Conversation API → User repository: finds account (evidence: `backend/src/main/java/com/chatbot/chat/ConversationController.java`)
- Chat orchestration → Conversation repository: loads and saves (evidence: `backend/src/main/java/com/chatbot/chat/ChatService.java`)
- Chat orchestration → Message repository: loads and saves (evidence: `backend/src/main/java/com/chatbot/chat/ChatService.java`)
- Chat orchestration → AI provider: sends chat context (evidence: `backend/src/main/java/com/chatbot/chat/ChatService.java`)
- Conversation repository → Relational database: persists records (evidence: `README.md`)
- Message repository → Relational database: persists records (evidence: `README.md`)
- User repository → Relational database: persists accounts (evidence: `README.md`)
- Conversation record → User account: belongs to (evidence: `backend/src/main/java/com/chatbot/chat/Conversation.java`)
- Message record → Conversation record: belongs to (evidence: `backend/src/main/java/com/chatbot/chat/Message.java`)
