diff --git a/users_microservice/src/main/java/com/users/application/controllers/UsersAuthController.java b/users_microservice/src/main/java/com/users/application/controllers/UsersAuthController.java index 4f9e34d2..37269c1a 100644 --- a/users_microservice/src/main/java/com/users/application/controllers/UsersAuthController.java +++ b/users_microservice/src/main/java/com/users/application/controllers/UsersAuthController.java @@ -50,7 +50,6 @@ public ResponseEntity> login(@RequestBody Login return ResponseEntity.ok(List.of(users)); } else { ErrorResponse error = (ErrorResponse) list; - logger.warn("Error response : {}, error stack : {}", error, error.getException().getStackTrace()); return ResponseEntity.badRequest().body(List.of(error)); } } diff --git a/users_microservice/src/main/java/com/users/application/services/UsersService.java b/users_microservice/src/main/java/com/users/application/services/UsersService.java index 3ba1d6e2..50294821 100644 --- a/users_microservice/src/main/java/com/users/application/services/UsersService.java +++ b/users_microservice/src/main/java/com/users/application/services/UsersService.java @@ -421,12 +421,11 @@ private List login(RequestContract request) { } try { - authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(castedRequest.getUsersEmailAddress(), castedRequest.getUsersPassword())); if (redisStatus) { logger.info("user with email {} successfully logged in using cache data : {}", redisUserResponse.getUsersEmailAddress(), redisUserResponse); - return List.of(redisUserResponse); } else { + authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(castedRequest.getUsersEmailAddress(), castedRequest.getUsersPassword())); logger.info("user with email {} successfully logged in using jpa data : {}", castedRequest.getUsersEmailAddress(), jpaUserResponse); @@ -438,23 +437,17 @@ private List login(RequestContract request) { return List.of(jpaUserResponse); } } catch (AuthenticationException e) { - if (redisStatus) { - - logger.info("delete cached data for login : {}", redisService.delete(encrypt)); - var errorMessage = "cached data shows change of password "; - var resolveIssue = "please log in again"; - throw throwExceptionAndReport(new CachedUsersPasswordChangedException(errorMessage), errorMessage, resolveIssue); - } else { + if (passwordStatus) { var errorMessage = UsersControllerAdvice.setMessage("password inserted is incorrect"); - var resolveIssue = "please provide correct password or update password"; + var resolveIssue = "please provide correct password"; throw throwExceptionAndReport(new UsersPasswordIncorrectException(errorMessage), errorMessage, resolveIssue); } else { var errorMessage = UsersControllerAdvice.setMessage("email address " + castedRequest.getUsersEmailAddress() + " not found, verify your email or register"); - var resolveIssue = "Enter correct email address or register using the email entered"; + var resolveIssue = "Enter correct email address"; throw throwExceptionAndReport(new UserNotFoundException(errorMessage), errorMessage, resolveIssue); } - } + } } catch (NullPointerException e) { diff --git a/users_microservice/src/main/resources/templates/home/index.html b/users_microservice/src/main/resources/templates/home/index.html index 70a2d2a9..617e38a7 100644 --- a/users_microservice/src/main/resources/templates/home/index.html +++ b/users_microservice/src/main/resources/templates/home/index.html @@ -61,23 +61,15 @@

- Your smart companion for responsible choices, tracking, and awareness. -

+Skip the queue. Order drinks to your table. Track every purchase and catch every event — all in one app.

- -
-
- Alcohol Agent mobile app -
-
-
@@ -85,120 +77,190 @@

About Alcohol Agent

- Person tracking alcohol consumption responsibly on phone + Mobile app screens showing easy drink ordering and payment at a venue

- Alcohol Agent was created to help people make smarter, safer, and more aware choices around alcohol consumption. - We believe that better information leads to better decisions — without judgment or shame. + Long queues at the bar killing your vibe? Alcohol Agent fixes that — order drinks from your phone and keep the party going without missing a single moment with your crew. +

+

+ At your local tavern, shebeen, or club, open the app, check the live menu, pick your drinks (beers on promo, shots, cocktails), pay securely, and watch as your order heads straight to your table or spot. No crowds, no waiting, no hassle. +

+

+ It's built for real SA nights out — fast, safe, and all about keeping you in the energy instead of stuck in line. And when you're ready for more, dive into events without the stress.

- Our mission is simple: provide accurate, private, and easy-to-use tools that empower individuals to understand - their habits, track their intake responsibly, and stay informed about the real effects of alcohol on body and mind. + Alcohol Agent is a two-sided platform: patrons enjoy seamless ordering and event access, while taverns, shebeens and clubs get powerful backend tools to run smoother operations, track every sale, and grow their business.

- Health awareness and hydration tracking illustration + Friends cheering with drinks at a lively tavern or club event

- Whether you're looking to cut back, maintain moderation, or simply become more mindful, Alcohol Agent is your - personal companion — always available, always discreet, and focused on long-term well-being. + Alcohol Agent isn't just for drinks — it's your gateway to the hottest nights. Venues post events (DJ lineups, live sets, specials) and send invites directly to you via SMS or email. +

+

+ No more lost flyers or endless scrolling. Get notified personally, see who's playing, buy tickets in-app (digital only, no paper), and get reminders so you're always ready. Scan your QR at the door — easy entry, more time to enjoy. +

+

+ Proudly South African, for the way we celebrate: connected, loud, and unforgettable. Alcohol Agent brings patrons and venues together for smoother nights, bigger crowds, and better vibes — one order, one ticket at a time.

- Built with care in South Africa, we combine science-backed insights with modern, intuitive design - to support healthier relationships with alcohol — one conscious choice at a time. + Patrons track every purchase (how many bottles, shots or cases bought and exactly when), while venues see real-time stock movement, prevent losses, and run profitable events without paper chaos.

+ +
+

Queue-free drinks • Purchase tracking • Digital tickets & invites • Real-time venue sales & stock tools • Made for SA nightlife

+ Explore Features for You & Your Venue +
- +
-

Retail Companies Features

+

Venue & Business Features

+

Powerful tools for taverns, shebeens, clubs and liquor retailers to increase sales, eliminate losses and run events efficiently.

+
-
- Retail POS dashboard overview -

Consumption Tracking

-

Log drinks, see patterns, set limits — simple & private.

+
+ Real-time venue POS dashboard showing live orders and payments +

Real-Time Order & Sales Tracking

+

Every purchase is visible instantly — what was bought, by whom, when, and matched to payment. Eliminate cash discrepancies and unknown withdrawals.

+
-
- Inventory and sales management dashboard -

Real-time Awareness

-

BAC estimation, hydration reminders, risk alerts.

+
+ Live inventory dashboard with stock levels and alerts +

Smart Inventory & Stock Control

+

Track sold vs. available stock in real time. Detect losses, prevent theft or spoilage, and reorder with confidence.

+
+
+ +
+
+ Bottle service staff delivering drinks to tables +

Queue-Free Bottle Service

+

Staff or bottle girls deliver orders directly to tables — faster service, happier customers, higher spend and better table turnover.

+
-
- Liquor store sales analytics dashboard -

Goal & Progress

-

Set personal goals, view streaks, celebrate milestones.

+
+ SMS event promotion notification on mobile +

Event Hosting & Direct Promotion

+

Create events and send targeted SMS or email invites to registered customers only — no paper flyers or social media dependency.

+
+
+ +
+
+ QR code ticket scanning at venue entrance +

Digital Ticket Sales Only

+

Sell tickets exclusively through the app with secure pre-payments, automatic reminders, and QR entry tracking.

+
+
+ +
+
+ Customer loyalty and marketing dashboard +

Customer Loyalty & Direct Reach

+

Build an opt-in customer database and promote specials or events directly — drive repeat visits and grow revenue.

- +
-

Alcohol Agent Users Features

+

Alcohol Agent Patron Features

+

Order fast, track every purchase, catch the best events and enjoy nightlife without the hassle.

+
-
- Drink logging and habit tracking calendar -

Consumption Tracking

-

Log drinks, see patterns, set limits — simple & private.

+
+ Mobile app showing live drink menu and ordering cart +

Instant Drink Ordering

+

Browse live menus, order beers, shots, cocktails or specials, pay securely and receive delivery to your table — no more bar queues.

+
-
- Real-time hydration and level tracker UI -

Real-time Awareness

-

BAC estimation, hydration reminders, risk alerts.

+
+ Order status and delivery confirmation on phone +

Stay in the Vibe

+

Order from your phone without leaving your friends or the dancefloor — keep enjoying while your drinks are delivered.

+
-
- Goal and progress streaks tracker -

Goal & Progress

-

Set personal goals, view streaks, celebrate milestones.

+
+ Purchase history screen with dates, quantities and totals +

Purchase History Tracking

+

Track exactly how much booze you’ve bought — bottles, shots, cases or rounds — with full date, time and total for every order.

-
-
-
- - -
-
-

Our Growing Community

- -
-
-
- Community member Sarah + +
+
+ Event invite via SMS notification on smartphone +

Exclusive Event Invites

+

Receive direct SMS or email alerts from venues for DJ nights, specials and parties — no more missing flyers or social media posts.

-

Sarah Mthembu

-
0
-

Registered Users

- -
-
- Community member Thabo + +
+
+ Digital QR ticket ready for scanning on phone +

Digital Tickets & Fast Entry

+

Buy tickets in-app, get reminders and scan your QR code at the door — quick, paperless entry every time.

+
+
+ +
+
+ Group of friends enjoying drinks at a vibrant venue +

Discover Local Spots & Deals

+

Find nearby taverns, shebeens and clubs, unlock exclusive specials and support the South African nightlife scene.

-

Thabo Nkosi

-
0
-

Registered Users