diff --git a/.gitignore b/.gitignore
index 85198aa..3269660 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,8 +7,5 @@ out/
/broadcast/*/31337/
/broadcast/**/dry-run/
-# Docs
-docs/
-
# Dotenv file
.env
diff --git a/docs/.gitignore b/docs/.gitignore
new file mode 100644
index 0000000..4e42a1b
--- /dev/null
+++ b/docs/.gitignore
@@ -0,0 +1 @@
+book/
\ No newline at end of file
diff --git a/docs/book.css b/docs/book.css
new file mode 100644
index 0000000..b5ce903
--- /dev/null
+++ b/docs/book.css
@@ -0,0 +1,13 @@
+table {
+ margin: 0 auto;
+ border-collapse: collapse;
+ width: 100%;
+}
+
+table td:first-child {
+ width: 15%;
+}
+
+table td:nth-child(2) {
+ width: 25%;
+}
\ No newline at end of file
diff --git a/docs/book.toml b/docs/book.toml
new file mode 100644
index 0000000..ef5975b
--- /dev/null
+++ b/docs/book.toml
@@ -0,0 +1,12 @@
+[book]
+src = "src"
+title = ""
+
+[output.html]
+no-section-label = true
+additional-js = ["solidity.min.js"]
+additional-css = ["book.css"]
+git-repository-url = "https://github.com/mgnfy-view/pystreams-monorepo"
+
+[output.html.fold]
+enable = true
diff --git a/docs/solidity.min.js b/docs/solidity.min.js
new file mode 100644
index 0000000..1924932
--- /dev/null
+++ b/docs/solidity.min.js
@@ -0,0 +1,74 @@
+hljs.registerLanguage("solidity",(()=>{"use strict";function e(){try{return!0
+}catch(e){return!1}}
+var a=/-?(\b0[xX]([a-fA-F0-9]_?)*[a-fA-F0-9]|(\b[1-9](_?\d)*(\.((\d_?)*\d)?)?|\.\d(_?\d)*)([eE][-+]?\d(_?\d)*)?|\b0)(?!\w|\$)/
+;e()&&(a=a.source.replace(/\\b/g,"(?{
+var a=r(e),o=l(e),c=/[A-Za-z_$][A-Za-z_$0-9.]*/,d=e.inherit(e.TITLE_MODE,{
+begin:/[A-Za-z$_][0-9A-Za-z$_]*/,lexemes:c,keywords:n}),u={className:"params",
+begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,lexemes:c,keywords:n,
+contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,o,s]},_={
+className:"operator",begin:/:=|->/};return{keywords:n,lexemes:c,
+contains:[a,o,i,t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s,_,{
+className:"function",lexemes:c,beginKeywords:"function",end:"{",excludeEnd:!0,
+contains:[d,u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,_]}]}},
+solAposStringMode:r,solQuoteStringMode:l,HEX_APOS_STRING_MODE:i,
+HEX_QUOTE_STRING_MODE:t,SOL_NUMBER:s,isNegativeLookbehindAvailable:e}
+;const{baseAssembly:c,solAposStringMode:d,solQuoteStringMode:u,HEX_APOS_STRING_MODE:_,HEX_QUOTE_STRING_MODE:m,SOL_NUMBER:b,isNegativeLookbehindAvailable:E}=o
+;return e=>{for(var a=d(e),s=u(e),n=[],i=0;i<32;i++)n[i]=i+1
+;var t=n.map((e=>8*e)),r=[];for(i=0;i<=80;i++)r[i]=i
+;var l=n.map((e=>"bytes"+e)).join(" ")+" ",o=t.map((e=>"uint"+e)).join(" ")+" ",g=t.map((e=>"int"+e)).join(" ")+" ",M=[].concat.apply([],t.map((e=>r.map((a=>e+"x"+a))))),p={
+keyword:"var bool string int uint "+g+o+"byte bytes "+l+"fixed ufixed "+M.map((e=>"fixed"+e)).join(" ")+" "+M.map((e=>"ufixed"+e)).join(" ")+" enum struct mapping address new delete if else for while continue break return throw emit try catch revert unchecked _ function modifier event constructor fallback receive error virtual override constant immutable anonymous indexed storage memory calldata external public internal payable pure view private returns import from as using pragma contract interface library is abstract type assembly",
+literal:"true false wei gwei szabo finney ether seconds minutes hours days weeks years",
+built_in:"self this super selfdestruct suicide now msg block tx abi blockhash gasleft assert require Error Panic sha3 sha256 keccak256 ripemd160 ecrecover addmod mulmod log0 log1 log2 log3 log4"
+},O={className:"operator",begin:/[+\-!~*\/%<>&^|=]/
+},C=/[A-Za-z_$][A-Za-z_$0-9]*/,N={className:"params",begin:/\(/,end:/\)/,
+excludeBegin:!0,excludeEnd:!0,lexemes:C,keywords:p,
+contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,s,b,"self"]},f={
+begin:/\.\s*/,end:/[^A-Za-z0-9$_\.]/,excludeBegin:!0,excludeEnd:!0,keywords:{
+built_in:"gas value selector address length push pop send transfer call callcode delegatecall staticcall balance code codehash wrap unwrap name creationCode runtimeCode interfaceId min max"
+},relevance:2},y=e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/,
+lexemes:C,keywords:p}),w={className:"built_in",
+begin:(E()?"(?
+
+[![Contributors][contributors-shield]][contributors-url]
+[![Forks][forks-shield]][forks-url]
+[![Stargazers][stars-shield]][stars-url]
+[![Issues][issues-shield]][issues-url]
+[![MIT License][license-shield]][license-url]
+
+
+
+
+
+
+
PayStreams
+
+
+ PayStreams is a payment streaming service supercharged with hooks
+
+ Report Bug
+ ·
+ Request Feature
+
+
+
+
+
+ Table of Contents
+
+ -
+ About The Project
+
+
+ -
+ Getting Started
+
+
+ - Roadmap
+ - Contributing
+ - License
+ - Contact
+
+
+
+
+
+## About The Project
+
+PayStreams is a payment streaming service which allows anyone to open token streams directed to any recipient. The recipient can collect the streamed funds over time, or when the stream ends. The stream creator can update, pause, unpause, or cancel the stream as well. Streams can be one-time, or recurring.
+
+Additionally, we introduce hooks, which are functions with custom logic that can be invoked at various points during the stream's lifespan. To opt into hooks, both the streamer and the recipient can set custom vaults with correct functions and hook configuration, and these functions will be invoked by the `PayStreams` contract when certain events occur. Hooks open up a wide array of use cases and customizations, enabling developers to extend the functionality of streams. You can find some hook examples in the `./src/exampleHooks/` folder.
+
+P.S. This project was built for the BuildOn hackathon on Devfolio.
+
+### Built With
+
+- Solidity
+- Foundry
+
+
+
+## Getting Started
+
+### Prerequisites
+
+Make sure you have git, rust, and foundry installed and configured on your system.
+
+### Installation
+
+Clone the repo,
+
+```shell
+git clone https://github.com/mgnfy-view/pay-streams.git
+```
+
+cd into the repo, and install the necessary dependencies
+
+```shell
+cd pay-streams
+forge build
+```
+
+Run tests by executing
+
+```shell
+forge test
+```
+
+That's it, you are good to go now!
+
+
+
+## Roadmap
+
+- [x] Smart contract development
+- [ ] Unit tests
+- [x] Write a good README.md
+
+See the [open issues](https://github.com/mgnfy-view/pay-streams/issues) for a full list of proposed features (and known issues).
+
+
+
+## Contributing
+
+Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
+
+If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
+Don't forget to give the project a star! Thanks again!
+
+1. Fork the Project
+2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
+3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
+4. Push to the Branch (`git push origin feature/AmazingFeature`)
+5. Open a Pull Request
+
+
+
+## License
+
+Distributed under the MIT License. See `LICENSE.txt` for more information.
+
+
+
+## Reach Out
+
+Here's a gateway to all my socials, don't forget to hit me up!
+
+[![Linktree](https://img.shields.io/badge/linktree-1de9b6?style=for-the-badge&logo=linktree&logoColor=white)][linktree-url]
+
+
+
+
+[contributors-shield]: https://img.shields.io/github/contributors/mgnfy-view/pay-streams.svg?style=for-the-badge
+[contributors-url]: https://github.com/mgnfy-view/pay-streams/graphs/contributors
+[forks-shield]: https://img.shields.io/github/forks/mgnfy-view/pay-streams.svg?style=for-the-badge
+[forks-url]: https://github.com/mgnfy-view/pay-streams/network/members
+[stars-shield]: https://img.shields.io/github/stars/mgnfy-view/pay-streams.svg?style=for-the-badge
+[stars-url]: https://github.com/mgnfy-view/pay-streams/stargazers
+[issues-shield]: https://img.shields.io/github/issues/mgnfy-view/pay-streams.svg?style=for-the-badge
+[issues-url]: https://github.com/mgnfy-view/pay-streams/issues
+[license-shield]: https://img.shields.io/github/license/mgnfy-view/pay-streams.svg?style=for-the-badge
+[license-url]: https://github.com/mgnfy-view/pay-streams/blob/master/LICENSE.txt
+[linktree-url]: https://linktr.ee/mgnfy.view
diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md
new file mode 100644
index 0000000..a89d1d3
--- /dev/null
+++ b/docs/src/SUMMARY.md
@@ -0,0 +1,14 @@
+# Summary
+- [Home](README.md)
+# src
+ - [❱ exampleVaults](src/exampleVaults/README.md)
+ - [❱ script](src/exampleVaults/script/README.md)
+ - [DeployPayStreams](src/exampleVaults/script/DeployPaymentSplitterVault.s.sol/contract.DeployPayStreams.md)
+ - [❱ vaults](src/exampleVaults/vaults/README.md)
+ - [PaymentSplitterVault](src/exampleVaults/vaults/PaymentSplitterVault.sol/contract.PaymentSplitterVault.md)
+ - [❱ interfaces](src/interfaces/README.md)
+ - [IHooks](src/interfaces/IHooks.sol/interface.IHooks.md)
+ - [IPayStreams](src/interfaces/IPayStreams.sol/interface.IPayStreams.md)
+ - [❱ utils](src/utils/README.md)
+ - [BaseVault](src/utils/BaseVault.sol/abstract.BaseVault.md)
+ - [PayStreams](src/PayStreams.sol/contract.PayStreams.md)
diff --git a/docs/src/src/PayStreams.sol/contract.PayStreams.md b/docs/src/src/PayStreams.sol/contract.PayStreams.md
new file mode 100644
index 0000000..672dcc0
--- /dev/null
+++ b/docs/src/src/PayStreams.sol/contract.PayStreams.md
@@ -0,0 +1,536 @@
+# PayStreams
+[Git Source](https://github.com/mgnfy-view/pystreams-monorepo/blob/c2bc4b1569db02cc5d60e647d96e72dffac4c56e/src/PayStreams.sol)
+
+**Inherits:**
+Ownable, [IPayStreams](/src/interfaces/IPayStreams.sol/interface.IPayStreams.md)
+
+**Author:**
+mgnfy-view.
+
+PayStreams is a payment streamming service supercharged with hooks.
+
+
+## State Variables
+### BASIS_POINTS
+
+```solidity
+uint16 private constant BASIS_POINTS = 10_000;
+```
+
+
+### s_feeInBasisPoints
+*The fee applied on streams in basis points.*
+
+
+```solidity
+uint16 private s_feeInBasisPoints;
+```
+
+
+### s_collectedFees
+*Any fees collected from streams is stored in the contract and tracked by this mapping.*
+
+
+```solidity
+mapping(address token => uint256 collectedFees) private s_collectedFees;
+```
+
+
+### s_streamData
+*Stores stream details.*
+
+
+```solidity
+mapping(bytes32 streamHash => StreamData streamData) private s_streamData;
+```
+
+
+### s_hookConfig
+*Stores the hook configuration for the streamer and the recipient.*
+
+
+```solidity
+mapping(address user => mapping(bytes32 streamHash => HookConfig hookConfig)) private s_hookConfig;
+```
+
+
+### s_streamerToStreamHashes
+*Utility storage for the streamer's stream hashes.*
+
+
+```solidity
+mapping(address streamer => bytes32[] streamHashes) private s_streamerToStreamHashes;
+```
+
+
+### s_recipientToStreamHashes
+*Utility storage for the recipient's stream hashes.*
+
+
+```solidity
+mapping(address recipient => bytes32[] streamHashes) private s_recipientToStreamHashes;
+```
+
+
+### s_gasLimitForHooks
+*The maximum gas that a hook can use. This prevents gas griefing attacks.*
+
+
+```solidity
+uint256 private s_gasLimitForHooks;
+```
+
+
+## Functions
+### constructor
+
+Initializes the owner and the fee value in basis points.
+
+
+```solidity
+constructor(uint16 _feeInBasisPoints, uint256 _gasLimitForHooks) Ownable(msg.sender);
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_feeInBasisPoints`|`uint16`|The fee value in basis points.|
+|`_gasLimitForHooks`|`uint256`||
+
+
+### setFeeInBasisPoints
+
+Allows the owner to set the fee for streaming in basis points.
+
+
+```solidity
+function setFeeInBasisPoints(uint16 _feeInBasisPoints) external onlyOwner;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_feeInBasisPoints`|`uint16`|The fee value in basis points.|
+
+
+### setGasLimitForHooks
+
+Allows the owner to set the gas limit for hooks.
+
+
+```solidity
+function setGasLimitForHooks(uint256 _gasLimitForHooks) external onlyOwner;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_gasLimitForHooks`|`uint256`|The gas limit for hooks.|
+
+
+### collectFees
+
+Allows the owner to withdraw fees collected from streams.
+
+
+```solidity
+function collectFees(address _token, uint256 _amount, address _to) external onlyOwner;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_token`|`address`|The address of the token.|
+|`_amount`|`uint256`|The amount of collected fees to withdraw.|
+|`_to`|`address`|The recipient of the funds.|
+
+
+### setStream
+
+Allows anyone to create a stream with custom parameters and hook configuration.
+
+
+```solidity
+function setStream(
+ StreamData calldata _streamData,
+ HookConfig calldata _streamerHookConfig,
+ string calldata _tag
+)
+ external
+ returns (bytes32);
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamData`|`StreamData`|The stream details.|
+|`_streamerHookConfig`|`HookConfig`|The streamer's hook configuration.|
+|`_tag`|`string`|Salt for stream creation. This allows a streamer to create multiple streams for different purposes targeted towards the same recipient and using the same token.|
+
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`bytes32`|The hash of the newly created stream.|
+
+
+### collectFundsFromStream
+
+Allows the recipient to collect funds from a stream. Can be called by anyone.
+
+
+```solidity
+function collectFundsFromStream(bytes32 _streamHash) external;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamHash`|`bytes32`|The hash of the stream.|
+
+
+### updateStream
+
+Allows the creator of a stream to update the stream parameters.
+
+
+```solidity
+function updateStream(
+ bytes32 _streamHash,
+ uint256 _amount,
+ uint256 _startingTimestamp,
+ uint256 _duration,
+ bool _recurring,
+ UpdateConfig calldata _updateConfig
+)
+ external;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamHash`|`bytes32`|The hash of the stream.|
+|`_amount`|`uint256`|The new amount to stream.|
+|`_startingTimestamp`|`uint256`|The new starting timestamp.|
+|`_duration`|`uint256`|The new stream duration.|
+|`_recurring`|`bool`|Update stream to be recurring or not.|
+|`_updateConfig`|`UpdateConfig`||
+
+
+### pauseStream
+
+Allows a streamer to pause an ongoing stream.
+
+
+```solidity
+function pauseStream(bytes32 _streamHash) external;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamHash`|`bytes32`|The hash of the stream.|
+
+
+### unPauseStream
+
+Allows a streamer to unpause a paused stream.
+
+
+```solidity
+function unPauseStream(bytes32 _streamHash) external;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamHash`|`bytes32`|The hash of the stream.|
+
+
+### cancelStream
+
+Allows the creator of a stream to cancel the stream.
+
+
+```solidity
+function cancelStream(bytes32 _streamHash) external;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamHash`|`bytes32`|The hash of the stream.|
+
+
+### setVaultAndHookConfig
+
+Sets the vault and hook config for streamer/recipient.
+
+
+```solidity
+function setVaultAndHookConfig(bytes32 _streamHash, address _vault, HookConfig calldata _hookConfig) external;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamHash`|`bytes32`|The hash of the stream.|
+|`_vault`|`address`|The streamer's or recipient's vault address.|
+|`_hookConfig`|`HookConfig`|The streamer's or recipient's hook configuration.|
+
+
+### setVault
+
+Allows the streamer or recipient of a stream to set their respective vaults.
+
+*Hooks can only be called on correctly configured and set vaults (both on streamer's
+and recipient's end).*
+
+
+```solidity
+function setVault(bytes32 _streamHash, address _vault) public;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamHash`|`bytes32`|The hash of the stream.|
+|`_vault`|`address`|The streamer's or recipient's vault address.|
+
+
+### setHookConfig
+
+Allows streamers and recipients to set their hook configuration.
+
+
+```solidity
+function setHookConfig(bytes32 _streamHash, HookConfig calldata _hookConfig) public;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamHash`|`bytes32`|The hash of the stream.|
+|`_hookConfig`|`HookConfig`|The streamer's or recipient's hook configuration.|
+
+
+### _checkIfStreamCreator
+
+Checks if the caller is the creator of the stream.
+
+
+```solidity
+function _checkIfStreamCreator(StreamData memory _streamData) internal view;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamData`|`StreamData`|The stream details.|
+
+
+### _checkIfCreatorOrStreamer
+
+Checks if the caller is the creator or recipient of the stream.
+
+
+```solidity
+function _checkIfCreatorOrStreamer(StreamData memory _streamData) internal view;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamData`|`StreamData`|The stream details.|
+
+
+### getFeeInBasisPoints
+
+Gets the fee value for streaming in basis points.
+
+
+```solidity
+function getFeeInBasisPoints() external view returns (uint16);
+```
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`uint16`|The fee value for streaming in basis points.|
+
+
+### getCollectedFees
+
+Gets the total amount collected in fees for a given token.
+
+
+```solidity
+function getCollectedFees(address _token) external view returns (uint256);
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_token`|`address`|The address of the token.|
+
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`uint256`|The amount of token collected in fees.|
+
+
+### getStreamData
+
+Gets the details for a given stream.
+
+
+```solidity
+function getStreamData(bytes32 _streamHash) external view returns (StreamData memory);
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamHash`|`bytes32`|The hash of the stream.|
+
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`StreamData`|The stream details.|
+
+
+### getHookConfig
+
+Gets the hook configuration for a given user and a given stream hash.
+
+
+```solidity
+function getHookConfig(address _user, bytes32 _streamHash) external view returns (HookConfig memory);
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_user`|`address`|The user's address.|
+|`_streamHash`|`bytes32`|The hash of the stream.|
+
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`HookConfig`|The hook configuration details.|
+
+
+### getStreamerStreamHashes
+
+Gets the hashes of the streams created by a user.
+
+
+```solidity
+function getStreamerStreamHashes(address _streamer) external view returns (bytes32[] memory);
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamer`|`address`|The stream creator's address.|
+
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`bytes32[]`|An array of stream hashes.|
+
+
+### getRecipientStreamHashes
+
+Gets the hashes of the streams the user is a recipient of.
+
+
+```solidity
+function getRecipientStreamHashes(address _recipient) external view returns (bytes32[] memory);
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_recipient`|`address`|The stream recipient's address.|
+
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`bytes32[]`|An array of stream hashes.|
+
+
+### getGasLimitForHooks
+
+Gets the gas limit for hooks.
+
+
+```solidity
+function getGasLimitForHooks() external view returns (uint256);
+```
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`uint256`|The gas limit for hooks.|
+
+
+### getStreamHash
+
+Computes the hash of a stream from the streamer, recipient, token addresses and a string tag.
+
+
+```solidity
+function getStreamHash(
+ address _streamer,
+ address _recipient,
+ address _token,
+ string calldata _tag
+)
+ public
+ pure
+ returns (bytes32);
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamer`|`address`|The address of the stream creator.|
+|`_recipient`|`address`|The address of the stream recipient.|
+|`_token`|`address`|The address of the token.|
+|`_tag`|`string`|Salt for stream creation.|
+
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`bytes32`|The hash of the stream.|
+
+
+### getAmountToCollectFromStreamAndFeeToPay
+
+Gets the amount withdrawable from the stream as well as the fee amount.
+
+
+```solidity
+function getAmountToCollectFromStreamAndFeeToPay(bytes32 _streamHash) public view returns (uint256, uint256);
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamHash`|`bytes32`|The hash of the stream.|
+
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`uint256`|The amount of funds withdrawable from the stream.|
+|``|`uint256`|The fee amount applied to the withdrawable funds.|
+
+
diff --git a/docs/src/src/README.md b/docs/src/src/README.md
new file mode 100644
index 0000000..c24bab2
--- /dev/null
+++ b/docs/src/src/README.md
@@ -0,0 +1,7 @@
+
+
+# Contents
+- [exampleVaults](/src/exampleVaults)
+- [interfaces](/src/interfaces)
+- [utils](/src/utils)
+- [PayStreams](PayStreams.sol/contract.PayStreams.md)
diff --git a/docs/src/src/exampleVaults/README.md b/docs/src/src/exampleVaults/README.md
new file mode 100644
index 0000000..6701067
--- /dev/null
+++ b/docs/src/src/exampleVaults/README.md
@@ -0,0 +1,5 @@
+
+
+# Contents
+- [script](/src/exampleVaults/script)
+- [vaults](/src/exampleVaults/vaults)
diff --git a/docs/src/src/exampleVaults/script/DeployPaymentSplitterVault.s.sol/contract.DeployPayStreams.md b/docs/src/src/exampleVaults/script/DeployPaymentSplitterVault.s.sol/contract.DeployPayStreams.md
new file mode 100644
index 0000000..db47327
--- /dev/null
+++ b/docs/src/src/exampleVaults/script/DeployPaymentSplitterVault.s.sol/contract.DeployPayStreams.md
@@ -0,0 +1,37 @@
+# DeployPayStreams
+[Git Source](https://github.com/mgnfy-view/pystreams-monorepo/blob/c2bc4b1569db02cc5d60e647d96e72dffac4c56e/src/exampleVaults/script/DeployPaymentSplitterVault.s.sol)
+
+**Inherits:**
+Script
+
+
+## State Variables
+### stream
+
+```solidity
+address public stream;
+```
+
+
+### recipients
+
+```solidity
+address[] public recipients;
+```
+
+
+### weights
+
+```solidity
+uint256[] public weights;
+```
+
+
+## Functions
+### run
+
+
+```solidity
+function run() external returns (address);
+```
+
diff --git a/docs/src/src/exampleVaults/script/README.md b/docs/src/src/exampleVaults/script/README.md
new file mode 100644
index 0000000..d3760b9
--- /dev/null
+++ b/docs/src/src/exampleVaults/script/README.md
@@ -0,0 +1,4 @@
+
+
+# Contents
+- [DeployPayStreams](DeployPaymentSplitterVault.s.sol/contract.DeployPayStreams.md)
diff --git a/docs/src/src/exampleVaults/vaults/PaymentSplitterVault.sol/contract.PaymentSplitterVault.md b/docs/src/src/exampleVaults/vaults/PaymentSplitterVault.sol/contract.PaymentSplitterVault.md
new file mode 100644
index 0000000..ede5ed2
--- /dev/null
+++ b/docs/src/src/exampleVaults/vaults/PaymentSplitterVault.sol/contract.PaymentSplitterVault.md
@@ -0,0 +1,187 @@
+# PaymentSplitterVault
+[Git Source](https://github.com/mgnfy-view/pystreams-monorepo/blob/c2bc4b1569db02cc5d60e647d96e72dffac4c56e/src/exampleVaults/vaults/PaymentSplitterVault.sol)
+
+**Inherits:**
+[BaseVault](/src/utils/BaseVault.sol/abstract.BaseVault.md)
+
+**Author:**
+mgnfy-view.
+
+A payment splitter vault that splits any streamed payment among a
+list of recipients based on their assigned weights.
+
+
+## State Variables
+### s_payStreams
+
+```solidity
+address private s_payStreams;
+```
+
+
+### s_recipients
+
+```solidity
+address[] private s_recipients;
+```
+
+
+### s_weights
+
+```solidity
+uint256[] private s_weights;
+```
+
+
+### s_totalWeight
+
+```solidity
+uint256 private s_totalWeight;
+```
+
+
+## Functions
+### onlyPayStreams
+
+
+```solidity
+modifier onlyPayStreams();
+```
+
+### constructor
+
+Initializes the vault.
+
+
+```solidity
+constructor(address _payStreams, address[] memory _recipients, uint256[] memory _weights);
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_payStreams`|`address`|The address of the payStreams contract.|
+|`_recipients`|`address[]`|A list of recipients of the streamed amount.|
+|`_weights`|`uint256[]`|Assigned weight to each recipient in the list.|
+
+
+### afterFundsCollected
+
+Once funds have been received by this vault, this function is invoked by the
+payStreams contract to split the streamed funds among multiple recipients based on their weight.
+
+
+```solidity
+function afterFundsCollected(bytes32 _streamHash, uint256 _amount, uint256) external override onlyPayStreams;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_streamHash`|`bytes32`|The hash of the stream.|
+|`_amount`|`uint256`|The amount to received from stream.|
+|``|`uint256`||
+
+
+### updateRecipientAndWeightsList
+
+Allows the owner to update the recipient and the weights list.
+
+
+```solidity
+function updateRecipientAndWeightsList(address[] memory _recipients, uint256[] memory _weights) external onlyOwner;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_recipients`|`address[]`|The new list of recipients.|
+|`_weights`|`uint256[]`|The weights assigned to each recipient.|
+
+
+### getPayStreams
+
+Gets the payStreams contract address.
+
+
+```solidity
+function getPayStreams() external view returns (address);
+```
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`address`|The payStreams contract address.|
+
+
+### getRecipients
+
+Gets the recipients list.
+
+
+```solidity
+function getRecipients() external view returns (address[] memory);
+```
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`address[]`|The recipients list.|
+
+
+### getWeights
+
+Gets the weights list.
+
+
+```solidity
+function getWeights() external view returns (uint256[] memory);
+```
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`uint256[]`|The weights list.|
+
+
+### getTotalWeight
+
+Gets the total weight based on the weights list.
+
+
+```solidity
+function getTotalWeight() external view returns (uint256);
+```
+**Returns**
+
+|Name|Type|Description|
+|----|----|-----------|
+|``|`uint256`|The total weight.|
+
+
+## Events
+### PaymentSplit
+
+```solidity
+event PaymentSplit(address[] indexed recipients, uint256[] indexed amounts);
+```
+
+### RecipientAndWeightsListUpdated
+
+```solidity
+event RecipientAndWeightsListUpdated(address[] indexed recipients, uint256[] indexed weights);
+```
+
+## Errors
+### PaymentSplitterVault__ArrayLengthMismatch
+
+```solidity
+error PaymentSplitterVault__ArrayLengthMismatch();
+```
+
+### PaymentSplitterVault__NotPayStream
+
+```solidity
+error PaymentSplitterVault__NotPayStream();
+```
+
diff --git a/docs/src/src/exampleVaults/vaults/README.md b/docs/src/src/exampleVaults/vaults/README.md
new file mode 100644
index 0000000..e047bac
--- /dev/null
+++ b/docs/src/src/exampleVaults/vaults/README.md
@@ -0,0 +1,4 @@
+
+
+# Contents
+- [PaymentSplitterVault](PaymentSplitterVault.sol/contract.PaymentSplitterVault.md)
diff --git a/docs/src/src/interfaces/IHooks.sol/interface.IHooks.md b/docs/src/src/interfaces/IHooks.sol/interface.IHooks.md
new file mode 100644
index 0000000..18d71fd
--- /dev/null
+++ b/docs/src/src/interfaces/IHooks.sol/interface.IHooks.md
@@ -0,0 +1,82 @@
+# IHooks
+[Git Source](https://github.com/mgnfy-view/pystreams-monorepo/blob/c2bc4b1569db02cc5d60e647d96e72dffac4c56e/src/interfaces/IHooks.sol)
+
+
+## Functions
+### afterStreamCreated
+
+
+```solidity
+function afterStreamCreated(bytes32 _streamHash) external;
+```
+
+### beforeFundsCollected
+
+
+```solidity
+function beforeFundsCollected(bytes32 _streamHash, uint256 _amount, uint256 _feeAmount) external;
+```
+
+### afterFundsCollected
+
+
+```solidity
+function afterFundsCollected(bytes32 _streamHash, uint256 _amount, uint256 _feeAmount) external;
+```
+
+### beforeStreamUpdated
+
+
+```solidity
+function beforeStreamUpdated(bytes32 _streamHash) external;
+```
+
+### afterStreamUpdated
+
+
+```solidity
+function afterStreamUpdated(bytes32 _streamHash) external;
+```
+
+### beforeStreamPaused
+
+
+```solidity
+function beforeStreamPaused(bytes32 _streamHash) external;
+```
+
+### afterStreamPaused
+
+
+```solidity
+function afterStreamPaused(bytes32 _streamHash) external;
+```
+
+### beforeStreamUnPaused
+
+
+```solidity
+function beforeStreamUnPaused(bytes32 _streamHash) external;
+```
+
+### afterStreamUnPaused
+
+
+```solidity
+function afterStreamUnPaused(bytes32 _streamHash) external;
+```
+
+### beforeStreamClosed
+
+
+```solidity
+function beforeStreamClosed(bytes32 _streamHash) external;
+```
+
+### afterStreamClosed
+
+
+```solidity
+function afterStreamClosed(bytes32 _streamHash) external;
+```
+
diff --git a/docs/src/src/interfaces/IPayStreams.sol/interface.IPayStreams.md b/docs/src/src/interfaces/IPayStreams.sol/interface.IPayStreams.md
new file mode 100644
index 0000000..a62a0f3
--- /dev/null
+++ b/docs/src/src/interfaces/IPayStreams.sol/interface.IPayStreams.md
@@ -0,0 +1,370 @@
+# IPayStreams
+[Git Source](https://github.com/mgnfy-view/pystreams-monorepo/blob/c2bc4b1569db02cc5d60e647d96e72dffac4c56e/src/interfaces/IPayStreams.sol)
+
+
+## Functions
+### setFeeInBasisPoints
+
+
+```solidity
+function setFeeInBasisPoints(uint16 _feeInBasisPoints) external;
+```
+
+### setGasLimitForHooks
+
+
+```solidity
+function setGasLimitForHooks(uint256 _gasLimitForHooks) external;
+```
+
+### collectFees
+
+
+```solidity
+function collectFees(address _token, uint256 _amount, address _to) external;
+```
+
+### setStream
+
+
+```solidity
+function setStream(
+ StreamData calldata _streamData,
+ HookConfig calldata _streamerHookConfig,
+ string calldata _tag
+)
+ external
+ returns (bytes32);
+```
+
+### collectFundsFromStream
+
+
+```solidity
+function collectFundsFromStream(bytes32 _streamHash) external;
+```
+
+### updateStream
+
+
+```solidity
+function updateStream(
+ bytes32 _streamHash,
+ uint256 _amount,
+ uint256 _startingTimestamp,
+ uint256 _duration,
+ bool _recurring,
+ UpdateConfig calldata _updateConfig
+)
+ external;
+```
+
+### pauseStream
+
+
+```solidity
+function pauseStream(bytes32 _streamHash) external;
+```
+
+### unPauseStream
+
+
+```solidity
+function unPauseStream(bytes32 _streamHash) external;
+```
+
+### cancelStream
+
+
+```solidity
+function cancelStream(bytes32 _streamHash) external;
+```
+
+### setVaultAndHookConfig
+
+
+```solidity
+function setVaultAndHookConfig(bytes32 _streamHash, address _vault, HookConfig calldata _hookConfig) external;
+```
+
+### setVault
+
+
+```solidity
+function setVault(bytes32 _streamHash, address _vault) external;
+```
+
+### setHookConfig
+
+
+```solidity
+function setHookConfig(bytes32 _streamHash, HookConfig calldata _hookConfig) external;
+```
+
+### getFeeInBasisPoints
+
+
+```solidity
+function getFeeInBasisPoints() external view returns (uint16);
+```
+
+### getCollectedFees
+
+
+```solidity
+function getCollectedFees(address _token) external view returns (uint256);
+```
+
+### getStreamData
+
+
+```solidity
+function getStreamData(bytes32 _streamHash) external view returns (StreamData memory);
+```
+
+### getHookConfig
+
+
+```solidity
+function getHookConfig(address _user, bytes32 _streamHash) external view returns (HookConfig memory);
+```
+
+### getStreamerStreamHashes
+
+
+```solidity
+function getStreamerStreamHashes(address _streamer) external view returns (bytes32[] memory);
+```
+
+### getRecipientStreamHashes
+
+
+```solidity
+function getRecipientStreamHashes(address _recipient) external view returns (bytes32[] memory);
+```
+
+### getStreamHash
+
+
+```solidity
+function getStreamHash(
+ address _streamer,
+ address _recipient,
+ address _token,
+ string calldata _tag
+)
+ external
+ pure
+ returns (bytes32);
+```
+
+### getAmountToCollectFromStreamAndFeeToPay
+
+
+```solidity
+function getAmountToCollectFromStreamAndFeeToPay(bytes32 _streamHash) external view returns (uint256, uint256);
+```
+
+## Events
+### FeeInBasisPointsSet
+
+```solidity
+event FeeInBasisPointsSet(address indexed by, uint16 indexed _feeInBasisPoints);
+```
+
+### GasLimitForHooksSet
+
+```solidity
+event GasLimitForHooksSet(address indexed by, uint256 indexed gasLimitForHooks);
+```
+
+### FeesCollected
+
+```solidity
+event FeesCollected(address indexed token, uint256 indexed amount, address indexed to);
+```
+
+### StreamCreated
+
+```solidity
+event StreamCreated(bytes32 indexed streamHash);
+```
+
+### FundsCollectedFromStream
+
+```solidity
+event FundsCollectedFromStream(bytes32 indexed streamHash, uint256 indexed amountToCollect, uint256 indexed feeAmount);
+```
+
+### StreamUpdated
+
+```solidity
+event StreamUpdated(
+ bytes32 indexed streamHash,
+ uint256 amount,
+ uint256 startingTimestamp,
+ uint256 duration,
+ bool recurring,
+ UpdateConfig updateConfig
+);
+```
+
+### StreamPaused
+
+```solidity
+event StreamPaused(bytes32 indexed streamHash);
+```
+
+### StreamUnPaused
+
+```solidity
+event StreamUnPaused(bytes32 indexed streamHash);
+```
+
+### StreamCancelled
+
+```solidity
+event StreamCancelled(bytes32 indexed streamHash);
+```
+
+### VaultSet
+
+```solidity
+event VaultSet(address indexed by, bytes32 indexed streamHash, address indexed vault);
+```
+
+### HookConfigSet
+
+```solidity
+event HookConfigSet(address indexed by, bytes32 indexed streamHash);
+```
+
+## Errors
+### PayStreams__InvalidFeeInBasisPoints
+
+```solidity
+error PayStreams__InvalidFeeInBasisPoints(uint16 feeInBasisPoints);
+```
+
+### PayStreams__GasLimitZero
+
+```solidity
+error PayStreams__GasLimitZero();
+```
+
+### PayStreams__InsufficientCollectedFees
+
+```solidity
+error PayStreams__InsufficientCollectedFees();
+```
+
+### PayStreams__InvalidStreamConfig
+
+```solidity
+error PayStreams__InvalidStreamConfig();
+```
+
+### PayStreams__StreamAlreadyExists
+
+```solidity
+error PayStreams__StreamAlreadyExists(bytes32 streamHash);
+```
+
+### PayStreams__StreamHasNotStartedYet
+
+```solidity
+error PayStreams__StreamHasNotStartedYet(bytes32 streamHash, uint256 startingTimestamp);
+```
+
+### PayStreams__InvalidUpdateParams
+
+```solidity
+error PayStreams__InvalidUpdateParams();
+```
+
+### PayStreams__CannotUpdateWhenStreamPaused
+
+```solidity
+error PayStreams__CannotUpdateWhenStreamPaused();
+```
+
+### PayStreams__CannotPauseStream
+
+```solidity
+error PayStreams__CannotPauseStream();
+```
+
+### PayStreams__NotPaused
+
+```solidity
+error PayStreams__NotPaused();
+```
+
+### PayStreams__ZeroAmountToCollect
+
+```solidity
+error PayStreams__ZeroAmountToCollect();
+```
+
+### PayStreams__Unauthorized
+
+```solidity
+error PayStreams__Unauthorized();
+```
+
+## Structs
+### StreamData
+The stream details struct.
+
+
+```solidity
+struct StreamData {
+ address streamer;
+ address streamerVault;
+ address recipient;
+ address recipientVault;
+ address token;
+ uint256 amount;
+ uint256 startingTimestamp;
+ uint256 duration;
+ uint256 totalStreamed;
+ bool recurring;
+ uint256 lastPausedAt;
+}
+```
+
+### HookConfig
+The hook configuration details struct for both streamer and recipient.
+
+
+```solidity
+struct HookConfig {
+ bool callAfterStreamCreated;
+ bool callBeforeFundsCollected;
+ bool callAfterFundsCollected;
+ bool callBeforeStreamUpdated;
+ bool callBeforeStreamPaused;
+ bool callAfterStreamPaused;
+ bool callBeforeStreamUnPaused;
+ bool callAfterStreamUnPaused;
+ bool callAfterStreamUpdated;
+ bool callBeforeStreamClosed;
+ bool callAfterStreamClosed;
+}
+```
+
+### UpdateConfig
+The update function can update all the 4 params - amount, starting timestamp,
+duration, and the recurring variable. Flags must be passed to indicate which values
+to update and which to ignore.
+
+
+```solidity
+struct UpdateConfig {
+ bool updateAmount;
+ bool updateStartingTimestamp;
+ bool updateDuration;
+ bool updateRecurring;
+}
+```
+
diff --git a/docs/src/src/interfaces/README.md b/docs/src/src/interfaces/README.md
new file mode 100644
index 0000000..297d11f
--- /dev/null
+++ b/docs/src/src/interfaces/README.md
@@ -0,0 +1,5 @@
+
+
+# Contents
+- [IHooks](IHooks.sol/interface.IHooks.md)
+- [IPayStreams](IPayStreams.sol/interface.IPayStreams.md)
diff --git a/docs/src/src/utils/BaseVault.sol/abstract.BaseVault.md b/docs/src/src/utils/BaseVault.sol/abstract.BaseVault.md
new file mode 100644
index 0000000..ce57c1c
--- /dev/null
+++ b/docs/src/src/utils/BaseVault.sol/abstract.BaseVault.md
@@ -0,0 +1,129 @@
+# BaseVault
+[Git Source](https://github.com/mgnfy-view/pystreams-monorepo/blob/c2bc4b1569db02cc5d60e647d96e72dffac4c56e/src/utils/BaseVault.sol)
+
+**Inherits:**
+Ownable, [IHooks](/src/interfaces/IHooks.sol/interface.IHooks.md)
+
+**Author:**
+mgnfy-view.
+
+This base vault implementation can be extended by developers to build various
+plugins on top of the payStreams protocol using hooks.
+
+
+## Functions
+### constructor
+
+
+```solidity
+constructor() Ownable(msg.sender);
+```
+
+### afterStreamCreated
+
+
+```solidity
+function afterStreamCreated(bytes32 _streamHash) external virtual;
+```
+
+### beforeFundsCollected
+
+
+```solidity
+function beforeFundsCollected(bytes32 _streamHash, uint256 _amount, uint256 _feeAmount) external virtual;
+```
+
+### afterFundsCollected
+
+
+```solidity
+function afterFundsCollected(bytes32 _streamHash, uint256 _amount, uint256 _feeAmount) external virtual;
+```
+
+### beforeStreamUpdated
+
+
+```solidity
+function beforeStreamUpdated(bytes32 _streamHash) external virtual;
+```
+
+### afterStreamUpdated
+
+
+```solidity
+function afterStreamUpdated(bytes32 _streamHash) external virtual;
+```
+
+### beforeStreamPaused
+
+
+```solidity
+function beforeStreamPaused(bytes32 _streamHash) external virtual;
+```
+
+### afterStreamPaused
+
+
+```solidity
+function afterStreamPaused(bytes32 _streamHash) external virtual;
+```
+
+### beforeStreamUnPaused
+
+
+```solidity
+function beforeStreamUnPaused(bytes32 _streamHash) external virtual;
+```
+
+### afterStreamUnPaused
+
+
+```solidity
+function afterStreamUnPaused(bytes32 _streamHash) external virtual;
+```
+
+### beforeStreamClosed
+
+
+```solidity
+function beforeStreamClosed(bytes32 _streamHash) external virtual;
+```
+
+### afterStreamClosed
+
+
+```solidity
+function afterStreamClosed(bytes32 _streamHash) external virtual;
+```
+
+### collectFunds
+
+Allows the owner to collect funds from the vault.
+
+
+```solidity
+function collectFunds(address _token, uint256 _amount, address _to) external virtual onlyOwner;
+```
+**Parameters**
+
+|Name|Type|Description|
+|----|----|-----------|
+|`_token`|`address`|The token to be collected.|
+|`_amount`|`uint256`|The amount of token to be collected.|
+|`_to`|`address`|The recipient of the funds.|
+
+
+## Events
+### FundsCollected
+
+```solidity
+event FundsCollected(address indexed token, uint256 indexed amount, address indexed to);
+```
+
+## Errors
+### BaseVault__InsufficientFunds
+
+```solidity
+error BaseVault__InsufficientFunds();
+```
+
diff --git a/docs/src/src/utils/README.md b/docs/src/src/utils/README.md
new file mode 100644
index 0000000..b458801
--- /dev/null
+++ b/docs/src/src/utils/README.md
@@ -0,0 +1,4 @@
+
+
+# Contents
+- [BaseVault](BaseVault.sol/abstract.BaseVault.md)