diff --git a/project-structure/Book-Diagram.png b/project-structure/Book-Diagram.png deleted file mode 100644 index 34e8b9f..0000000 Binary files a/project-structure/Book-Diagram.png and /dev/null differ diff --git a/project-structure/Borrowing-Diagram.png b/project-structure/Borrowing-Diagram.png deleted file mode 100644 index 97c1a26..0000000 Binary files a/project-structure/Borrowing-Diagram.png and /dev/null differ diff --git a/project-structure/ER-Diagram.md b/project-structure/ER-Diagram.md deleted file mode 100644 index de26876..0000000 --- a/project-structure/ER-Diagram.md +++ /dev/null @@ -1,115 +0,0 @@ -[//]: # (# ER Diagram) - -[//]: # () -[//]: # (```mermaid) - -[//]: # (erDiagram) - -[//]: # ( BOOKS {) - -[//]: # ( int book_id PK) - -[//]: # ( string title) - -[//]: # ( string author) - -[//]: # ( string isbn) - -[//]: # ( string publisher) - -[//]: # ( int published_year) - -[//]: # ( string genre) - -[//]: # ( int copies_available) - -[//]: # ( }) - -[//]: # () -[//]: # ( BORROWINGS {) - -[//]: # ( int borrowing_id PK) - -[//]: # ( int book_id FK) - -[//]: # ( int fine_id FK) - -[//]: # ( int member_id FK) - -[//]: # ( date borrow_date) - -[//]: # ( date due_date) - -[//]: # ( date return_date) - -[//]: # ( }) - -[//]: # () -[//]: # ( FINES {) - -[//]: # ( int fine_id PK) - -[//]: # ( int borrowing_id FK) - -[//]: # ( int member_id FK) - -[//]: # ( decimal amount) - -[//]: # ( boolean paid) - -[//]: # ( }) - -[//]: # () -[//]: # ( MEMBERS {) - -[//]: # ( int member_id PK) - -[//]: # ( string name) - -[//]: # ( string email) - -[//]: # ( string password) - -[//]: # ( enum role) - -[//]: # ( date membership_date) - -[//]: # ( }) - -[//]: # () -[//]: # ( NOTIFICATIONS {) - -[//]: # ( int notification_id PK) - -[//]: # ( int member_id FK) - -[//]: # ( string message) - -[//]: # ( enum notification_type) - -[//]: # ( timestamp sent_date) - -[//]: # ( string status) - -[//]: # ( }) - -[//]: # () -[//]: # ( MEMBERS ||--o{ BORROWINGS : has) - -[//]: # ( BOOKS ||--o{ BORROWINGS : has) - -[//]: # ( BORROWINGS ||--|{ FINES : generates) - -[//]: # ( MEMBERS ||--o{ FINES : receives) - -[//]: # ( MEMBERS ||--o{ NOTIFICATIONS : receives) - -[//]: # () -[//]: # (%% ||--o{: One-to-Many relationship.) - -[//]: # (%% ||--|{: One-to-One relationship.) - -[//]: # () -[//]: # (```) - -Screenshot 2024-08-29 at 12 34 48 AM \ No newline at end of file diff --git a/project-structure/Email-Send-Diagram.png b/project-structure/Email-Send-Diagram.png deleted file mode 100644 index 62b3c20..0000000 Binary files a/project-structure/Email-Send-Diagram.png and /dev/null differ diff --git a/project-structure/Exception-Diagram.png b/project-structure/Exception-Diagram.png deleted file mode 100644 index b1b9bba..0000000 Binary files a/project-structure/Exception-Diagram.png and /dev/null differ diff --git a/project-structure/Fine-Diagram.png b/project-structure/Fine-Diagram.png deleted file mode 100644 index 1942b2c..0000000 Binary files a/project-structure/Fine-Diagram.png and /dev/null differ diff --git a/project-structure/Member-Diagram.png b/project-structure/Member-Diagram.png deleted file mode 100644 index a9619bd..0000000 Binary files a/project-structure/Member-Diagram.png and /dev/null differ diff --git a/project-structure/Notification-Diagram.png b/project-structure/Notification-Diagram.png deleted file mode 100644 index c1ec815..0000000 Binary files a/project-structure/Notification-Diagram.png and /dev/null differ diff --git a/project-structure/Whole-Project-Diagram.png b/project-structure/Whole-Project-Diagram.png index 565a540..ddc1c35 100644 Binary files a/project-structure/Whole-Project-Diagram.png and b/project-structure/Whole-Project-Diagram.png differ diff --git a/project-structure/Whole-Project-Diagram.uml b/project-structure/Whole-Project-Diagram.uml deleted file mode 100644 index 4d22236..0000000 --- a/project-structure/Whole-Project-Diagram.uml +++ /dev/null @@ -1,539 +0,0 @@ - - - JAVA - /Users/ajaynegi/Downloads/libraryman-api/src/main/java/com/libraryman_api - - com.libraryman_api.member.MemberService - com.libraryman_api.notification.NotificationType - com.libraryman_api.fine.FineRepository - com.libraryman_api.book.Book - com.libraryman_api.exception.ResourceNotFoundException - com.libraryman_api.book.BookController - com.libraryman_api.borrowing.BorrowingController - com.libraryman_api.notification.NotificationRepository - com.libraryman_api.exception.ErrorDetails - com.libraryman_api.borrowing.BorrowingService - com.libraryman_api.member.Members - com.libraryman_api.member.MemberRepository - com.libraryman_api.book.BookService - com.libraryman_api.email.EmailSender - com.libraryman_api.exception.GlobalExceptionHandler - com.libraryman_api.borrowing.Borrowings - com.libraryman_api.member.Role - com.libraryman_api.notification.NotificationService - com.libraryman_api.email.EmailService - com.libraryman_api.notification.Notifications - com.libraryman_api.LibrarymanApiApplication - com.libraryman_api.member.MemberController - com.libraryman_api.notification.NotificationStatus - com.libraryman_api.fine.Fines - com.libraryman_api.book.BookRepository - com.libraryman_api.borrowing.BorrowingRepository - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - com.libraryman_api.member.MemberService - com.libraryman_api.fine.FineRepository - com.libraryman_api.borrowing.BorrowingRepository - com.libraryman_api.LibrarymanApiApplication - com.libraryman_api.book.BookController - com.libraryman_api.notification.Notifications - com.libraryman_api.member.Role - com.libraryman_api.member.MemberRepository - com.libraryman_api.exception.GlobalExceptionHandler - com.libraryman_api.notification.NotificationRepository - com.libraryman_api.member.MemberController - com.libraryman_api.notification.NotificationStatus - com.libraryman_api.fine.Fines - com.libraryman_api.borrowing.BorrowingController - com.libraryman_api.exception.ResourceNotFoundException - com.libraryman_api.book.BookRepository - com.libraryman_api.email.EmailSender - com.libraryman_api.notification.NotificationService - com.libraryman_api.borrowing.BorrowingService - com.libraryman_api.borrowing.Borrowings - com.libraryman_api.notification.NotificationType - com.libraryman_api.exception.ErrorDetails - com.libraryman_api.email.EmailService - com.libraryman_api.book.BookService - com.libraryman_api.member.Members - com.libraryman_api.book.Book - - - Constructors - Fields - Inner Classes - Methods - Properties - - All - private - - diff --git a/src/main/java/com/libraryman_api/security/config/WebConfiguration.java b/src/main/java/com/libraryman_api/security/config/WebConfiguration.java index 89627c1..b10232c 100644 --- a/src/main/java/com/libraryman_api/security/config/WebConfiguration.java +++ b/src/main/java/com/libraryman_api/security/config/WebConfiguration.java @@ -40,6 +40,7 @@ public SecurityFilterChain web(HttpSecurity http) throws Exception { .requestMatchers("/api/signup").permitAll() .requestMatchers("/api/login").permitAll() .requestMatchers("/api/logout").permitAll() + .requestMatchers("/api/books").permitAll() .requestMatchers("/api/analytics/**").hasAnyRole("ADMIN", "LIBRARIAN") // New line for analytics .anyRequest().authenticated() ) diff --git a/src/main/resources/application-production.properties b/src/main/resources/application-production.properties index 2905f10..3e13ee0 100644 --- a/src/main/resources/application-production.properties +++ b/src/main/resources/application-production.properties @@ -5,6 +5,7 @@ spring.datasource.password=${DATABASE_PASSWORD} spring.datasource.driver-class-name=${DATABASE_DRIVER_CLASS_NAME} spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=false + # --- Mail Service Setup --- spring.mail.host=${MAIL_SERVICE_HOST} spring.mail.port=${MAIL_SERVICE_PORT} @@ -13,6 +14,7 @@ spring.mail.password=${MAIL_SERVICE_PASSWORD} spring.mail.properties.mail.smtp.auth=${MAIL_SERVICE_SMTP} spring.mail.properties.mail.starttls.enable=${MAIL_SERVICE_STARTTLS} spring.mail.properties.domain_name=${MAIL_SERVICE_DOMAIN_NAME} + # --- Oauth 2.0 Configurations --- spring.security.oauth2.client.registration.google.client-name=google spring.security.oauth2.client.registration.google.client-id=${YOUR_CLIENT_ID} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 3fce839..3ef8ac0 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,3 +1,3 @@ spring.application.name=libraryman-api spring.profiles.active=${ENV:dev} -jwt.secretKey=${YOUR_JWT_SECRET_KEY} \ No newline at end of file +jwt.secretKey=0b563c76627dcf5a595c886f6b5301c1 \ No newline at end of file