Skip to content

πŸš— Car-Sales-API A RESTful API for a car sales platform enabling both admins and users to manage announcements, profiles, bookmarks, and support requests with secure JWT authentication.

License

Notifications You must be signed in to change notification settings

usermemmdli/Car-Sales-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CarSales-API

CarSales-API is a RESTful backend application for a car sales platform. The API supports both admin and user operations through a unified system. It allows users to post car listings, view ads, manage profiles, and interact with bookmarked or expired listings. Admins can manage announcements, assist users, and moderate the platform.


🎯 Project Objectives

  • Provide a single API endpoint for both admin and user functionalities.
  • Enable secure and role-based access using Spring Security and JWT.
  • Offer full CRUD capabilities for car listings, user profiles, bookmarks, and support requests.

πŸš€ Main Features

βœ… AuthService

  • signUpUser: Registers a new user.
  • loginUser: Authenticates users and returns a JWT token.

πŸ“£ AnnouncementService

  • getAllUserAnnouncement: Lists all announcements by a user.
  • getPublishedAnnouncements: Shows all published ads.
  • getExpiredAnnouncements: Lists expired ads.
  • getRejectedAnnouncements: Lists rejected ads.
  • addNewAnnouncement: Adds a new car listing.

🧾 AdminService

  • getAnnouncement: View all ads for moderation.
  • checkAds: Approve or reject announcements.
  • helpUser: Respond to user support requests.
  • getHelpUser: View all incoming help requests.

πŸš— AutosService

  • getAnnouncement: Fetch only active announcements.
  • addCarInBookmarks: Add a car listing to the user's bookmarks.

πŸ”– BookmarksService

  • getMarkedAnnouncement: View all bookmarked ads.
  • removeMarkedAnnouncement: Remove a car from bookmarks.

πŸ™‹β€β™‚οΈ UsersService

  • getAccountInfo: Get current account details.
  • getUserProfile: View public user profile.
  • editUserProfile: Update user profile info.
  • changePassword: Change the user’s password.
  • getUserCards: View cards linked to a user.
  • addCard: Add a new card to the account.
  • deleteCard: Delete a specific card.
  • deleteAccount: Delete user account permanently.

πŸ†˜ HelpService

  • sendHelpRequest: Allows users to submit a support request.

πŸ›  Technologies Used

  • Java 17
  • Spring Boot
  • Spring Data JPA
  • Spring Security
  • JWT (JSON Web Token)
  • Stream API
  • PostgreSQL
  • MongoDB
  • Pagination
  • Swagger UI
  • JUnit & Mockito

About

πŸš— Car-Sales-API A RESTful API for a car sales platform enabling both admins and users to manage announcements, profiles, bookmarks, and support requests with secure JWT authentication.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages