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.
- 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.
- 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.
-
Clone the repository:
git clone https://github.com/yourusername/LaundryAPI.git cd LaundryAPI
-
Install dependencies:
npm install
-
Configure environment variables:
- Rename
.env.example
to.env
and update the configuration settings (database connection, API keys, etc.).
- Rename
-
Run the server:
npm start
-
API Documentation:
- Visit
http://localhost:3000/api-docs
for detailed API documentation using Swagger.
- Visit
- 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.).
- 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.
- 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.
- 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.
- 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.
The UML diagram above outlines the interaction between users and the system, illustrating the process of auto-scheduling and predictive detergent reordering.
- Behavioral Patterns: LaundryAPI learns your habits over time, adapting its recommendations and schedules to fit your routine.
- Minimal Input: After initial setup, the API requires minimal user input, automating most of the tasks involved in laundry management.
- Smart Notifications: Stay informed with timely notifications for both laundry schedules and detergent reorders.
- 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.
Contributions are welcome! If you'd like to contribute to LaundryAPI, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
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.