README.md

Drinktr Web & Backend

Drinktr is a 24/7 online water delivery platform that allows users to place orders seamlessly. Vendors receive and process these orders through a dedicated backend system, ensuring efficient and timely deliveries. The platform is designed to provide a hassle-free experience with real-time order tracking, secure payments, and automated order management

https://drinktr.com

Key Features

  • Instant Water Delivery (Real-time order matching with nearby stores)
  • Seamless Payment Integration (Direct UPI payments to stores)
  • Live Order Tracking (Real-time updates for users and stores)
  • Automated Store Management (Order notifications and analytics for stores)

🛠 Tech Stack

frontend: React, Tailwind CSS, HTML
backend: Node.js, Express, MongoDB
devops: Docker, Kubernetes, AWS
testing: Jest, Cypress, Playwright

Project Structure

📁drinktr.pw.api
📁Public
📁Temp
📄.gitkeep
📄.gitkeep
📁src
📁api
📁controllers
📄order.controller.js
📄price.controller.js
📄review.controller.js
📄store.controller.js
📄user.controller.js
📄water.controller.js
📁routes
📄index.js
📄order.routes.js
📄price.routes.js
📄review.routes.js
📄store.routes.js
📄user.routes.js
📄water.routes.js
📁service
📄order.service.js
📄store.service.js
📁validators
📄order.validator.js
📄store.validator.js
📄user.validator.js
📁config
📄database.js
📄env.js
📄logger.js
📄redis.js
📁core
📁constants
📄httpStatus.js
📁errors
📄apiError.js
📁middleware
📄asyncHandler.js
📄error.middleware.js
📄multer.middleware.js
📄rateLimiter.middleware.js
📄requestLogger.middleware.js
📄store.auth.middleware.js
📄user.auth.middleware.js
📁response
📄apiResponse.js
📁db
📁models
📄notification.model.js
📄order.model.js
📄price.model.js
📄review.model.js
📄store.model.js
📄user.model.js
📄water.model.js
📁repositories
📄order.repository.js
📄review.repository.js
📄store.repository.js
📄user.repository.js
📁seed
📄seed.js
📁docs
📄swagger.yaml
📁jobs
📁queues
📄order.queue.js
📄store.queue.js
📁workers
📄order.worker.js
📄store.worker.js
📁lib
📄cloudinary.js
📄email.js
📄pushNotification.js
📄redis.js
📁scripts
📄deploy.sh
📄lint.sh
📁utils
📄calculateDistance.js
📄app.js
📄.dockerignore
📄.env.example
📄.eslintrc.js
📄.gitignore
📄.prettierignore
📄.prettierrc
📄README.md
📄docker-compose.yml
📄dockerfile
📄jest.config.js
📄package-lock.json
📄package.json
📄server.js
📁drinktr.pw.ui
📁Public
📁Images
📁src
📁assets
📁GetStart
📁Image
📁Login
📁Model
📁Other
📁components
📁About
📄AboutInfo.jsx
📄Heading.jsx
📄OurMission.jsx
📄OurVision.jsx
📁GetStarted
📄StoreRegistration.jsx
📁Home
📄Community.jsx
📄CopyRight.jsx
📄Footer
📄GetStarted.jsx
📄Heading.jsx
📄LinkSection.jsx
📄Navbar.jsx
📄OurModel.jsx
📄Review.jsx
📄Tracks.jsx
📄WhoWeAre.jsx
📁Legal
📄Order.jsx
📄Policy.jsx
📄Terms.jsx
📁Login
📄LoginScreen.jsx
📁Pricing
📄Plans.jsx
📄Price.jsx
📁Products
📄Cold.jsx
📄Normal.jsx
📄ProductHeading.jsx
📄Society.jsx
📁Store
📄Search.jsx
📁utils
📄SvgIcons.jsx
📁pages
📄About.jsx
📄ContactUs.jsx
📄CookiesPolicy.jsx
📄GetStarted.jsx
📄Home.jsx
📄Login.jsx
📄OrderCancellationPolicy.jsx
📄Pricing.jsx
📄PrivacyPolicy.jsx
📄Products.jsx
📄Stores.jsx
📄TermsAndConditions.jsx
📄app.js
📄index.css
📄main.jsx
📄.eslintrc.cjs
📄.gitignore
📄index.html
📄manifest.json
📄netlify.toml
📄package-lock.json
📄package.json
📄postcss.config.js
📄tailwind.config.js
📄vite.config.js

⚙️ Setup & Installation

# Clone the repository

git clone https://github.com/rahullbyte/drinktr.pw.api.git

# Navigate to the project directory

cd drinktr.pw.api

# Install dependencies

npm install

# Start the development server

npm start

🚀 Live Demo

🌍 Deployment

Frontend: Netlify

Backend: render

Report: jenkins

API Documentation: swagger

📜 Changelog

Version V1.5.0

Complete flow of order purchasing.

Version V2.5.0

Added OTP base Authentication.

Version V2.5.7

Improved backend project structure.

🔥 Challenges & Learnings

Challenge: Implementing real-time pop-up notifications for users.

Solution: Used Expo on the server side and efficiently managed an event-driven architecture.

Outcome: Reduced dependence on Firebase and other external services.

Performance Optimizations

  • Used lazy loading for images & components
  • Implemented request caching to reduce API calls and improve response times
  • Optimized database queries and indexing for faster data retrieval

🔒 Security Measures

  • JWT authentication for secure API access
  • Rate limiting and IP blocking to prevent DDoS attacks
  • Encrypted sensitive data using AES and hashed passwords with bcrypt
  • Regular security audits and vulnerability scanning

🔮 Future Improvements

  • Redesign the UI for a more modern and intuitive user experience
  • Add a dark/light mode toggle for better accessibility and user preference
  • Improve mobile responsiveness for a seamless experience across devices