Skip to content

Cyb-Leon/LaundryAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LaundryAPI (Vanilla JS)

Welcome to LaundryAPI! This is a smart and intuitive API designed to streamline your laundry process by automating task scheduling and managing detergent supplies based on your personal laundry habits.

πŸš€ Features

1. Auto-Scheduling Based on Usage Patterns

  • Smart Laundry Scheduler: Automatically schedules laundry tasks based on your historical laundry behavior.
  • Adaptive: Learns your preferred laundry days and suggests the best times to do laundry with minimal user input.
  • Notifications: Get notified when a laundry task is scheduled, ensuring you never miss a laundry day.

2. Predictive Detergent Reordering

  • Usage Tracking: Tracks your detergent usage and predicts when you're likely to run out.
  • Reorder Suggestions: Receive timely reminders to reorder detergent before you run out.
  • Seamless Reordering: Place orders for detergent directly through the app with a single tap.

πŸ› οΈ Setup & Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/LaundryAPI.git
    cd LaundryAPI
  2. Install dependencies:

    npm install
  3. Configure environment variables:

    • Rename .env.example to .env and update the configuration settings (database connection, API keys, etc.).
  4. Run the server:

    npm start
  5. API Documentation:

    • Visit http://localhost:3000/api-docs for detailed API documentation using Swagger.

πŸ“‹ API Endpoints

User Registration & Profile Setup

  • POST /user/register: Register a new user and gather initial data (laundry habits, detergent supply).
  • POST /user/laundry-data: Submit initial laundry data (preferred days, load size, etc.).
  • POST /user/detergent-data: Submit initial detergent supply data (brand, current level, etc.).

Auto-Scheduling

  • GET /laundry/schedule/auto: Fetch or generate an auto-scheduled laundry task based on usage patterns.
  • POST /laundry/schedule/create: Manually create or update a laundry schedule if needed.

Predictive Detergent Reordering

  • GET /supplies/detergent/predict: Predict when detergent will run out and suggest reordering.
  • POST /supplies/detergent/reorder: Trigger a reorder process based on prediction or user request.

πŸ“ Use Case Stories

1. Auto-Scheduling Based on Usage Patterns

  • As a user: I want the system to automatically schedule my laundry tasks based on my past behavior so that I don't have to manually set laundry reminders.
  • Precondition: The system has enough historical data about my laundry habits.
  • Outcome: Laundry tasks are scheduled automatically, and I'm notified in advance.

2. Predictive Detergent Reordering

  • As a user: I want the system to predict when my detergent will run out and suggest reordering in time, so I never run out of supplies.
  • Precondition: The system tracks my detergent usage and knows my current supply level.
  • Outcome: I receive a notification suggesting when to reorder detergent, with a seamless ordering process.

🎨 UML Diagram

UML Diagram

The UML diagram above outlines the interaction between users and the system, illustrating the process of auto-scheduling and predictive detergent reordering.

πŸ’‘ How It Works

  1. Behavioral Patterns: LaundryAPI learns your habits over time, adapting its recommendations and schedules to fit your routine.
  2. Minimal Input: After initial setup, the API requires minimal user input, automating most of the tasks involved in laundry management.
  3. Smart Notifications: Stay informed with timely notifications for both laundry schedules and detergent reorders.

πŸ›‘οΈ Security & Privacy

  • Data Encryption: All user data is encrypted to ensure privacy and security.
  • User Control: Users have full control over their data, with options to modify or delete their information at any time.

🀝 Contributing

Contributions are welcome! If you'd like to contribute to LaundryAPI, please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Submit a pull request.

πŸ“ License

This project is licensed under the MIT License. See the LICENSE file for details.


Happy Laundering!

Feel free to contribute, report issues, or suggest features to make LaundryAPI even better. πŸš€


This README.md gives potential users and developers a comprehensive overview of the LaundryAPI project, guiding them through setup, usage, and contribution.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published