Webstore platform project that consists of two main applications:
- Webstore (store-) → customer-facing online store
- CRM (crm-) → administration and operations panel (❗️In progress, currently only initial placeholder code️)
- Backend for Frontend (BFF) architecture with Spring Boot and React
- Authentication and authorization using OAuth2 and OpenID Connect
- Data persistence with PostgreSQL
- Resource server (store-api) exposing a REST API
- Frontend with Next.js, shadcn-ui, and TanStack Query.
| Directory | Description |
|---|---|
| store-frontend/ | React frontend - Next.js |
| store-api/ | Resource Server - Spring Boot |
| store-auth-server/ | Authorization Server - Spring Boot |
| store-bff/ | BFF Server - Spring Boot |
| store-reverse-proxy/ | Reverse proxy - Spring Boot |
- Built with Next.js combining server and client components.
- Styled using shadcn/ui + Tailwind CSS.
- Data fetching with Next.js server components and TanStack Query, providing:
- Server-side and client-side fetching
- Prefetching with router integration
- Caching
- Loading and error handling
- Interacts with the authorization server as a confidential OAuth client.
- Manages OAuth tokens in the context of a cookie-based session, so the frontend never needs to handle OAuth tokens directly.
- Forwards API requests to the Resource Server (store-api).
- Handles user registration and login.
- Provides OAuth2 + OpenID Connect authentication and issues tokens.
- Exposes domain data (products, orders, etc.) as a REST API.
- Protected by OAuth access tokens and scopes.
- Ensures the frontend and BFF share the same origin, eliminating CORS issues and allowing secure cookies to be set with
SameSite=Lax.
- store-api (resource-server) migration for Spring Monolith



