Skip to content
forked from fr0tt/benotes

An open source self hosted notes and bookmarks taking web app.

License

Notifications You must be signed in to change notification settings

Nestecha/benotes

 
 

Repository files navigation

Benotes Logo

Benotes

Benotes Thumbnail

Benotes - Open source web app for your notes and bookmarks | Product Hunt

An open source self hosted web app for your notes and bookmarks side by side.

This project is currently in Beta. You may encounter bugs or errors.

Features

  • URLs are automatically saved with an image, title and description
  • can be installed as a PWA on your mobile devices (and desktop)
  • collections can be shared via a public available URL
  • supports both markdown and a rich text editor experience
  • links can be pasted (by pressing only one button)
  • can be hosted almost anywhere thanks to its use of the lightweight Lumen framework and well supported PHP language

Installation

Prerequisite:

Installation:

  • git clone https://github.com/fr0tt/benotes (download files version-controlled)
  • composer install (install dependencies accordingly to your php version.
    Please note that php8-cli will fail, use instead something similar to the likes of: /usr/bin/php7.4 /usr/local/bin/composer install or any other php-cli version between 7.2.5 and 7.4
    )
  • cp .env.example .env (copy configuration file)
  • generate a random string for APP_KEY in your .env file e.g. openssl rand -base64 32 (for security reasons)
  • create a database
  • also edit DB_DATABASE, DB_USERNAME and DB_PASSWORD in .env file accordingly (in order to be able to connect to your database)
  • php artisan install (amongst other: create database tables and fill them)
  • ln -sfn ../storage/app/public/ public/storage (create symlink for storage)
  • chown -R :www-data storage && chmod -R 774 storage (make storage directory writable for webserver if your webserver runs as user www-data)
  • if you wish to use it on a production server change in your .env file APP_ENV from local to production

Upgrade

  • git pull (upgrade files)
  • composer install (upgrade dependencies. See composer part of Installation for information about php8 above)
  • php artisan migrate (upgrade database schemas)

Feel free to contact me if you need any help or write an issue.

Rest API

Authentication

POST /api/auth/login

Logs in a user

Attribute Value
email Required.
password Required.

POST /api/auth/refresh

Refreshes the JWT Token

GET /api/auth/me

Returns the authenticated user

POST /api/auth/logout

Logs out the authenticated user


Posts

GET /api/posts

Get multiple posts

Attribute Value
collection_id Optional. Specify a collection of which you want to request posts. If collection_id is not specified you will get all posts from all collections from your user
is_uncategorized Optional. Specify if you wish to get all posts without a collection.
limit Optional. Limit the amount of requested posts by number

GET /api/posts/{id}

Get one post by its id

POST /api/posts

Create a new post

Attribute Value
collection_id Optional. Specify a collection you wish to save your new post to, if not, your post will not be part of a collection.
title Optional. Specify a title, gets automatically filled if your content is a link
content Required. Specify a link, post, message, ..

PATCH /api/posts/{id}

Update an existing post

Attribute Value
collection_id Optional. Specify a collection you want to save your post to instead. To patch a post from the uncategorized collection simply use 0 as value for the collection_id
title Optional. Change your posts title
content Optional. Change your posts content
order Optional. Specify a new order you wish to move your post to

DELETE /api/posts/{id}

Delete a post by its id

About

An open source self hosted notes and bookmarks taking web app.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 46.8%
  • Vue 37.9%
  • JavaScript 13.6%
  • SCSS 1.1%
  • Other 0.6%