Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BookVerse - Online Bookstore

A Spring Boot application for managing an online bookstore with OAuth2 Google authentication.

Prerequisites

  • Java 11 or higher
  • MongoDB
  • Maven

Setup Instructions

1. Database Setup

Make sure MongoDB is running on localhost:27017

2. Google OAuth2 Configuration

To enable Google login, you need to:

  1. Go to Google Cloud Console
  2. Create OAuth 2.0 credentials
  3. Create a file src/main/resources/application-local.properties with:
spring.security.oauth2.client.registration.google.client-id=YOUR_GOOGLE_CLIENT_ID
spring.security.oauth2.client.registration.google.client-secret=YOUR_GOOGLE_CLIENT_SECRET

Note: Never commit application-local.properties to version control as it contains sensitive information.

3. Run the Application

./mvnw spring-boot:run

Or on Windows:

.\mvnw spring-boot:run

The application will be available at http://localhost:8080

Features

  • User authentication (login/register)
  • Google OAuth2 login
  • Book management
  • Shopping cart
  • Order management
  • Checkout process

Project Structure

  • src/main/java/khang/demo/bookstore/ - Main application code
    • controllers/ - Web and REST controllers
    • entities/ - Domain models
    • repositories/ - Data access layer
    • services/ - Business logic
    • security/ - Security configuration
  • src/main/resources/templates/ - Thymeleaf templates
  • src/main/resources/static/ - Static resources (CSS, JS, images)

Security

This application uses Spring Security with:

  • Form-based authentication
  • OAuth2 Google login
  • Password encryption
  • Role-based access control

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages