NFBBS is a Node.js-based program designed to manage and back up files on a per-machine basis. It offers a container system, referred to as "buckets" to organize snapshots. But it still a work in progress (WIP).
A python interface to interact with NFBBS is going to be made ASAP.
NFBBS provides an HTTP API for managing buckets and file uploads. You can create, list, and delete buckets, as well as upload and retrieve files within buckets.
To set up NFBBS, follow these steps:
-
Clone this repository:
git clone https://github.com/your-username/your-repo.git cd your-repo
-
Install the required packages using npm:
npm install
-
Configure your passport authentication.
To use the HTTP API, follow these instructions:
To use the HTTP API, first initialize the Bucket Handler:
const Buckethandler = require('./path/to/Buckethandler');
const passport = ...; // Initialize passport authentication
const buckets = Buckethandler('your-bucket-folder', passport);
Before making any requests, ensure that you're authenticated using passport. The routes mentioned below require authentication.
Endpoint: POST /newbucket
Request:
{
"name": "my-new-bucket"
}
Response:
{
"message": "Bucket created successfully"
}
Endpoint: GET /list
Response:
[
"bucket1",
"bucket2"
]
Endpoint: GET /bucketName/list
Response:
[
"BucketName_date",
"BucketName_date2"
]
Endpoint: POST /bucketName/snapshotName/addFile
Request:
{
"file": (file data),
"name": "my-file.txt"
}
Response:
{
"message": "File added to the bucket successfully"
}
Endpoint: GET /bucketName/snapshotName/getFile
Response:
(File content)
We welcome contributions from the community to help improve NFBBS. If you'd like to contribute, please follow these steps:
- Fork the repository on GitHub.
- Clone your forked repository to your local machine.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with descriptive messages.
- Push your changes to your GitHub repository.
- Create a pull request to the main NFBBS repository.
- We will review your changes and merge them if they align with the project's goals.
NFBBS is open-source software released under the BSD 3-Clause. See the LICENSE
file for more details.