Skip to content

purniiiima/Astrologer-Flow-Distribution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Astrologer Flow Distribution

Manage user allocations among astrologers with fairness and efficiency using this Node.js application. This project demonstrates backend system design principles, focusing on distributing users among astrologers based on availability and preferences.

Table of Contents

Features

  • Fair Distribution: Algorithms to evenly distribute users among astrologers.
  • Customizable Allocation: Ability to allocate more users to top astrologers based on preferences.
  • RESTful API: API endpoints for adding users and astrologers, toggling top astrologer status, and distributing users.

Technologies

  • Node.js
  • Express.js

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/astrologer-flow-distribution.git
    
  2. Navigate to the project directory:

    cd astrologer-flow-distribution
    
  3. Install dependencies:

    npm install
    

Usage

Start Server

  1. To start the server:

    npm start
    

API Endpoints

POST /users

  1. Add a new user:

    {
    "id": 1,
    "name": "User Name"
    }
    

POST /astrologers

  1. Add a new astrologer:

    {
    "id": 1,
    "name": "Astrologer Name",
    "topAstrologer": true/false
    }
    
    

PUT /astrologers/

/top

Toggle top astrologer status.

POST /distribute

Distribute users among astrologers.

GET /assignments

Retrieve assignments showing which users are assigned to which astrologers.

Contributing

Contributions are welcome! Fork the repository and submit a pull request.

License

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published