Project

General

Profile

Actions

Improvement #31319

open

Improvement #31248: New Theme based Nextjs application dev analysis

Basic Next.js Setup and Architecture Implementation

Added by Sachin Suresh 4 months ago. Updated 4 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Target version:
-
Start date:
12/17/2025
Due date:
12/22/2025 (about 4 months late)
% Done:

57%

Estimated time:
16:00 h (Total: 44:00 h)
Spent time:
8:00 h (Total: 27:30 h)
remarks:
DB Changes:
Keys & Permissions:
Areas Affected:
Files Changed:

Description

This task covers the foundational setup of the Next.js 15 application, including the authentication architecture, API integration patterns, and global state management.


Subtasks 5 (5 open0 closed)

Improvement #31373: implemented English/Arabic localization for the applicationFixed not TestedSachin Suresh12/17/202512/17/2025

Actions
Improvement #31374: Currency & Language Switcher ArchitectureAssignedSachin Suresh12/19/202512/19/2025

Actions
Improvement #31467: Currency Synchronization Implementation PlanFixed not TestedSachin Suresh12/19/202512/19/2025

Actions
Improvement #31417: Implement test architectureIn ProgressSachin Suresh12/18/202512/22/2025

Actions
Bug #31466: When multiple tabs or concurrent requests attempted to refresh an expired token simultaneouslyFixed not TestedSachin Suresh12/19/202512/19/2025

Actions
Actions #1

Updated by Sachin Suresh 4 months ago

  • Status changed from Assigned to In Progress
Actions #2

Updated by Sachin Suresh 4 months ago

1. Technology Stack
Framework: Next.js 15 (App Router)
State Management: TanStack Query (React Query) v5
Session Management: iron-session (Encrypted, HTTP-only cookies)

Actions #3

Updated by Sachin Suresh 4 months ago

  • % Done changed from 0 to 50
Actions #4

Updated by Sachin Suresh 4 months ago

implemented a secure, server-side session strategy to separate sensitive tokens from the client browser.

Middleware (

middleware.ts
): Handles global session initialization and persistence using iron-session. It assigns a unique sessionId to every visitor (Guest or User).
Token Store (

src/lib/token-store.ts
): An in-memory store that maps the sessionId (cookie) to the actual JWT Access/Refresh tokens. This ensures JWTs are never exposed to the client-side JavaScript (XSS protection).
Server Actions (

src/actions/auth-actions.ts
): Handles secure operations like

login
, token refresh, and guest recovery.
Resilience: Implemented logic to auto-recover Guest sessions if the server restarts (RAM cache cleared) but the browser still holds a valid cookie.

Actions #5

Updated by Sachin Suresh 4 months ago

  • Subtask #31373 added
Actions #6

Updated by Sachin Suresh 4 months ago

  • Subtask #31374 added
Actions #7

Updated by Sachin Suresh 4 months ago

  • Subtask #31417 added
Actions #8

Updated by Sachin Suresh 4 months ago

  • Subtask #31466 added
Actions

Also available in: Atom PDF