Dream Factory is a RESTful API developed to manage usersβ travel dreams. Each user can share their desired destinations, leave reviews, like other destinations, comunicate in live chat and interact with a secure and modern backend system. This backend project is built using Java, Spring Boot, and Spring Security. It implements authentication with JWT + Refresh Token, supports Cloudinary for image storage, and includes integrated email notifications, Web Socket for live chat. The system features reviews, likes/unlikes, and global exception handling to ensure a reliable and user-friendly API experience.
- π Key Features
- π©π»βπ» Technologies Used
- π Clone the Repository
- π API Endpoints
- ππ»ββοΈ Running Tests
- π EER Diagram
- π¬ Chat Flow Diagram
- π¦ Class Diagram
- π₯ Contributors
-
Authentication with JWT + Refresh Token
-
Route protection using JWT Bearer Token
-
User roles: USER and ADMIN
-
Implemented login, sign-up, and email notifications:
Email confirmation upon registration
Email notification upon submitting a review
-
User registration and login
-
Access to personal user data
-
Admin panel (for ADMIN users only):
-
View all registered users
-
Edit user roles and data
-
Delete users from the system
-
CRUD operations for destinations (only for the user's own data)
-
Admins can manage all destinations
-
Destination images are stored using Cloudinary
-
Filter destinations by title or location
-
Pagination of destination list
-
Sort destinations so that userβs own entries appear first
-
Reviews: users can leave comments, with email notification sent to the author
-
Like / Unlike: authenticated users can like or unlike destinations
- Integrated with Swagger UI for API visualization and testing
-
Global exception handling using @ControllerAdvice (GlobalExceptionHandler)
-
Returns structured and informative error messages
git clone https://github.com/Dream-Factory-T6/DreamFactory.git
cd DreamFactory./mvnw spring-boot:runor
mvn spring-boot:runAlternative Way to Run the Application If you are using an IDE such as IntelliJ IDEA,VS Code etc, you can simply click the βRunβ button or run the main application class directly (the one annotated with @SpringBootApplication). For example, in IntelliJ IDEA, right-click the main class and choose "Run 'DfApplication...main()'".
POST /api/registerβ Create a new user.POST /api/auth/refreshβ Refresh access token using refresh token.POST /api/register/adminβ Create new user by user with role ADMIN.
GET /api/usersβ Get all users.GET /api/users/{id}β Get user by IDPUT /api/users/{id}β Update user by user with role ADMIN.DELETE /api/users/{id}β Delete user by ID
GET /api/destinationsβ Get all Destination.GET /api/destinations/{id}β Get Destination by ID.GET /api/destinations/filterβ Get Destination by filter.GET /api/destinations/my-destinations- Get Destination by username.POST /api/destinationsβ Create new Destination.PUT /api/destinations/{id}β Update Destination by IDDELETE /api/cart/remove/{productId}β Delete Destination by product ID
GET /api/reviewsβ Get all reviews by username from Authorization.GET /api/reviews/destination/{id}β Get all reviews by Destination ID.POST /api/reviewsβ Create new review.PUT /api/reviews/{id}β Update review by ID.DELETE /api/reviews/{id}β Delete review by ID.
POST /api/destinations/{id}/likes/toggleβ For Like/UnLike.GET /api/destinations/{id}/likesβ Get all Likes by Destination ID.
GET /api/chat/room/{roomId}/messagesβ Get the latest messages from the roomGET /api/chat/roomsβ Get a list of available rooms/chat.sendMessageβ Send message/chat.addUserβ Add user to room/chat.leaveRoomβ Leave the room



