Skip to content

SamarthPD-21/Ecom_Spring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ecom – Full‑Stack E‑Commerce App

A full‑stack e‑commerce application with a Next.js (App Router) frontend and a Spring Boot backend. It supports user authentication, product management, cart and order flows, Stripe payments, and an admin dashboard.

Features

  • User registration/login with JWT
  • Product listing and admin product management
  • Cart management and checkout flow
  • Orders and order status tracking
  • Stripe payment intent creation + webhook simulation
  • Admin dashboard stats and user management
  • Optional email notifications

Tech Stack

Client

  • Next.js 16 (App Router), React 19, TypeScript
  • Tailwind CSS
  • Stripe JS

Server

  • Spring Boot 4 (Java 21)
  • MongoDB
  • Spring Security + JWT
  • Stripe Java SDK
  • Java Mail

Project Structure

Ecom/
  client/           # Next.js frontend
  server/demo/      # Spring Boot backend

Prerequisites

  • Node.js 20+ (18+ should work)
  • Java 21
  • Maven 3.9+
  • MongoDB Atlas or local MongoDB
  • Stripe account (test keys)

Environment Configuration

Server

Configure these values in your environment or in the Spring Boot properties file:

  • spring.data.mongodb.uri
  • stripe.api-key
  • jwt.secret
  • jwt.expiration
  • Email settings (optional)
  • Admin defaults (optional)

The current server/demo/src/main/resources/application.properties contains placeholder and test values. Replace them before deploying.

Client

Create a file client/.env.local:

NEXT_PUBLIC_API_BASE=http://localhost:8080

Run Locally

1) Start the backend

From the project root:

cd server/demo
mvn spring-boot:run

Backend runs on http://localhost:8080.

2) Start the frontend

From the project root:

cd client
npm install
npm run dev

Frontend runs on http://localhost:3000.

Test

Backend:

cd server/demo
mvn test

Frontend:

cd client
npm run lint

API Notes

The client communicates with the server via /api/** endpoints. If you change the backend port or host, update NEXT_PUBLIC_API_BASE.

Admin Access

Default admin credentials are defined in the server configuration. Update them for local testing and replace for production.

Git Ignore

The repository ignores IDE and editor settings, including .vscode/. If .vscode was already committed, remove it from git tracking:

git rm -r --cached .vscode

License

Add a license if you plan to distribute this project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors