Skip to content

DrFreaK231/FullStack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Full-Stack E-Commerce Demo (Next.js + Spring Boot + OAuth2 + PayPal + Docker)

This is a full-stack e-commerce demo project built as a portfolio piece, showcasing:

βœ… Multi-layer Spring Boot backend βœ… Next.js 14 frontend βœ… OAuth2 login (Google, GitHub, Internal Auth Server) βœ… PayPal payments βœ… Three independent microservices βœ… Full Docker & Docker Swarm setup βœ… JWT + refresh tokens βœ… SQL Server database βœ… Clean environment variable setup (no secrets in GitHub)

πŸ“¦ Tech Stack Frontend Next.js 14 React TypeScript JWT auth (HTTP-only cookies) Backend

Three independent Spring Boot services:

Service Description

Auth Server Issues OAuth2 tokens / JWT Client API Main e-commerce REST API RSS Server Demo RSS microservice Payments PayPal Sandbox integration (Orders API + Captures API) Database Microsoft SQL Server (via Docker) Security OAuth2 Login (Google / GitHub / Internal Server) JWT + Refresh Tokens CSRF protection Password hashing (BCrypt) Deployment Docker Docker Compose

πŸ“ Project Structure project-root/ β”‚ β”œβ”€ backend/ β”‚ β”œβ”€ as/ # Auth Server (Spring Boot) β”‚ β”œβ”€ client/ # Main API (Spring Boot) β”‚ └─ rss/ # RSS Microservice (Spring Boot) β”‚ β”œβ”€ frontend/ # Next.js 14 App β”‚ β”œβ”€ docker/ # Dockerfiles for each service β”‚ β”œβ”€ docker-compose.yml β”œβ”€ docker-stack.yml # For Docker Swarm └─ .env.example

βš™οΈ Environment Setup

Secrets are NOT included in this repository. Copy the example env file: cp .env.example .env Then fill in your values:

GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= GITHUB_CLIENT_ID= GITHUB_CLIENT_SECRET=

PAYPAL_CLIENT_ID= PAYPAL_CLIENT_SECRET=

SPRING_DATASOURCE_URL= SPRING_DATASOURCE_USERNAME= SPRING_DATASOURCE_PASSWORD=

Each backend uses these placeholders inside application.properties, e.g.: spring.security.oauth2.client.registration.google.client-id=${GOOGLE_CLIENT_ID}

🐳 Running with Docker (Local) Build and start all services:

docker compose up --build

Frontend: πŸ‘‰ http://localhost:3000

Client Backend: πŸ‘‰ http://localhost:8080

Auth Server: πŸ‘‰ http://localhost:8000

RSS Server: πŸ‘‰ http://localhost:9000

SQL Server: πŸ‘‰ localhost:1433

πŸ–₯️ Local Development (Without Docker) Backend cd backend/client mvn spring-boot:run

Frontend cd frontend npm install npm run dev

πŸ” Security Features

OAuth2 login (Google / GitHub / custom auth server) HTTPS-ready configuration CSRF tokens (Next.js fetch wrapper) Secure JWT & refresh token strategy BCrypt password hashing Strict CORS + cookie configuration

πŸ’³ PayPal Integration

Implemented features: Create order Capture payment Save transaction to database PayPal Webhook ready Return/cancel pages

πŸ“š What This Project Demonstrates This project is designed as a portfolio showcase, demonstrating:

βœ” Real full-stack architecture βœ” Multi-service backend βœ” OAuth2 + JWT authentication βœ” Secure payment workflow βœ” Dockerized production-ready stack βœ” Clean code & proper project structure

πŸ“ Notes for Testers

This repository does not include secrets.

Before running: Fill .env or application.properties Add your own OAuth client IDs Set your PayPal sandbox keys Configure your own SQL Server credentials

πŸ§‘β€πŸ’» Author

Tayza Thiha Full-Stack Developer (Singapore)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages