Skip to content

AbdullahWins/Falaj_Server_Nodejs

Repository files navigation

Falaj Rent and Management Software

The Falaj Rent and Management Software is a modern digital solution designed to streamline the rental and management processes of the traditional Aflaj irrigation systems in Oman. Inspired by the ancient water channels, this software aims to efficiently allocate and manage water resources among users, just as the original Falaj system divided water among inhabitants.

Table of Contents

Introduction

The Falaj Rent and Management Software provides a platform for users to effectively rent, manage, and share water resources from the Aflaj irrigation systems. It enables users to allocate water for their cropland, homes, and other purposes while ensuring fair distribution and optimal utilization of the available resources.

Features

  • User Registration and Authentication: Users can sign up, log in, and manage their accounts securely using JSON Web Tokens (JWT).

  • Water Allocation: Users can request water allocation based on their needs. The software will intelligently distribute available water resources among users, ensuring equitable sharing.

  • Rent Management: Users can pay rent for their water usage through the software, facilitating a streamlined payment process.

  • Monitoring and Notifications: Real-time monitoring of water flow and usage, along with automated notifications and alerts to users regarding their water allocation.

  • Resource Utilization Analytics: Generate reports and visualizations to help users analyze their water usage patterns, promoting responsible consumption.

Technologies Used

  • Node.js
  • Express.js
  • MongoDB (for data storage)
  • Firebase Storage (for file storage)
  • JSON Web Tokens (JWT) for authentication
  • Other relevant npm packages for various functionalities

Installation

  1. Clone this repository to your local machine.
  2. Navigate to the project directory and run npm install to install dependencies.
  3. Set up a MongoDB database and update the connection details in the configuration files.
  4. Set up a Firebase project for file storage and update the Firebase configuration.
  5. Run npm start to start the server.

Usage

  1. Register an account or log in if you already have one.
  2. Navigate through the user-friendly interface to allocate water, pay rent, and monitor usage.
  3. Utilize the analytics dashboard to gain insights into your water consumption habits.

API Endpoints

  • POST /api/register: Register a new user.
  • POST /api/login: Log in an existing user.
  • POST /api/water/allocate: Request water allocation.
  • POST /api/payment/pay: Make rent payments.

Authentication

Authentication is handled using JWT. Users receive a token upon successful login, which they include in the headers of subsequent requests for authorization.

Database

MongoDB is used to store user data, water allocation records, payment history, and more.

File Storage

Firebase Storage is utilized to store files related to the irrigation system, such as images, documents, and reports.

Contributors

License

This project is licensed under the MIT License.


By implementing the Falaj Rent and Management Software, we aim to bridge the gap between ancient water-sharing traditions and modern technology, ensuring the sustainable utilization of water resources in Oman's Aflaj irrigation systems.