commit e926b1827412809f6ef92ffe09abbf0a9ee94a95 Author: Skylar Ittner Date: Tue Jan 1 20:01:58 2019 -0700 Make some docs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..45ddf0a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +site/ diff --git a/docs/Self-Hosting and Development/API Documentation.md b/docs/Self-Hosting and Development/API Documentation.md new file mode 100644 index 0000000..04ebea1 --- /dev/null +++ b/docs/Self-Hosting and Development/API Documentation.md @@ -0,0 +1,53 @@ +# API Documentation + +The NotePost API is extremely simple to use. Requests can be sent via GET or POST, and responses are sent in JSON. + +## Request Structure + +API URLs are typically of the form `http(s)://notepost-url/api//?args`. + +Clients can authenticate to the API by using HTTP Basic Authentication or by including `username` and `password` arguments. + +## Response Structure + +Responses to well-formed requests will have a `status` field containing the string `OK` or `ERROR`. +If `status` is `ERROR`, there will also be a field named `msg` containing a human-readable localized error message suitable for display to the user. +If `status` is `OK`, there may or may not be additional fields sent, depending on the `action`. + +If the request is not well-formed (missing required arguments, invalid credentials, or invalid action), the API will send a 4xx HTTP code and some plain text, such as `"400 Bad Request"`, `"403 Unauthorized"`, or `"404 Action not defined"`. + +## Note JSON Format +```js + { + "noteid": 10, + "color": "673AB7", + "content": "#Note\ncontent", + "html": "

Note

content

", + "title": "Note", + "modified": "2018-12-28 17:24:58", + "favorite": false, + "owner": { + "uid": 1, + "username": "someone", + "name": "Some One" + } + } +``` + +## Actions + +| Action | Additional Arguments | Description +| ------------- | --------------------- | ----------- +| `ping` | None | Used to check if the server is online and responding. Responds with `{"status":"OK"}`. +| `getnotes` | None | Returns all the notes that are readable with the sent credentials, as an array named `notes`. See note format above. +| `getnote` | `id` | Get one note by its ID. +| `savenote` | `text`, `id` (optional), `color` (optional), `modified` (optional), `favorite` (optional), `archived` (optional) | Update a note and return the updated note in `note`.
If `id` is not set, creates a new note. Returns the saved note as JSON, along with a `msg` containing a translated "Note saved" message.
If `color` is set to six hexadecimal digits, the note's background color will be set.
If `modified` is set to a string parsable by PHP `strtotime`, the note's last modified date will be set accordingly, otherwise the current date and time will be used.
If `favorite` is set to either `0` (no) or `1` (yes), the note's favorite/starred status will be updated.
`archived` is ignored for now, but will operate the same as `favorite` in the future as a non-destructive form of deletion. +| `deletenote` | `id` | Delete a note by its ID. This is not reversible. +| `favoritenote`| `id`, `favorite` (optional) | If `favorite` is not set, the favorite status of the note will be toggled. If `favorite` is set to either `0` (no) or `1` (yes), the note will be set as favorited or not. +| `tolist` | `id` | Convert a note to a list by prepending a checkbox (`- [ ]`) to each line of text. Returns the updated note as `note`. +| `togglelist` | `id`, `text` | Toggle the checked/crossed out state of the given line of text in the given note. + + +## Nextcloud Notes API + +A subset of NotePost's functionality can also be accessed via a server implementation the [Nextcloud Notes API](https://github.com/nextcloud/notes/wiki/API-0.2). Use it via `https://notepost-url/lib/nextcloudnotes.php`, or if your webserver is configured correctly (see the .htaccess file in the NotePost root folder), at `https://notepost-url/index.php/apps/notes/api/v0.2`. See the linked Nextcloud documentation for usage information. \ No newline at end of file diff --git a/docs/Self-Hosting and Development/Installing.md b/docs/Self-Hosting and Development/Installing.md new file mode 100644 index 0000000..6fbf1be --- /dev/null +++ b/docs/Self-Hosting and Development/Installing.md @@ -0,0 +1,11 @@ +# Installing + +0. Setup a LAMP server with PHP 7.2, including PHP extensions mbstring, zip, gd, and imagick +1. `git clone` the NotePost Git repository. This will make upgrades a matter of running `git pull` and importing any new SQL scripts. +2. Import `database.sql` into your database server +3. Follow [these instructions](https://docs.netsyms.com/docs/AccountHub/Self-Hosting%20and%20Development/Installing/) to install AccountHub and ManagePanel, which handle user accounts, login, and other "glue". +4. Copy `settings.template.php` to `settings.php` +5. Edit `settings.php` and fill in your DB info, then add the API key and other info from your AccountHub instance. +6. Run `composer install` (or `composer.phar install`) to install dependency libraries +7. Run `git submodule init` and `git submodule update` to install several other dependencies +8. From a web browser, visit `https://notepost-url` (or whatever your setup is). If you did everything right, you should be redirected to a login screen. Enter the admin username and password you setup when installing AccountHub. \ No newline at end of file diff --git a/docs/Self-Hosting and Development/System Requirements.md b/docs/Self-Hosting and Development/System Requirements.md new file mode 100644 index 0000000..144fc2e --- /dev/null +++ b/docs/Self-Hosting and Development/System Requirements.md @@ -0,0 +1,70 @@ +# System Requirements + +NotePost (and the other Apps) is tested and officially supported on the following configurations. Other systems may be supported at our discretion, possibly with an additional support fee. The Apps should work on any sane Linux/PHP/MySQL based web server, even if it is not within the requirements shown here. + +## Server + +### Minimum Hardware + +The Netsyms Apps are very lightweight on server resources. The minimum supported hardware is a $35 Rasperry Pi 3 (1.2 GHz quad-core ARM CPU, 1GB RAM, 100Mbps Ethernet). Cloud VPS servers with as little as 512 MB RAM are fine too. + +### Software and Operating System + +* Server Operating System + * Ubuntu + * Debian +* PHP + * 7.2 +* Database + * MySQL 5.7+ + * MariaDB 10.0+ +* Web Server + * Apache 2.4 + +### Recommended Software +For best performance, security, and ease of administration, we recommend installing the following on your server: + +* PHP's opcache (cached compiled PHP code for faster execution) +* Fail2ban (if using SSH or other remote administration methods) +* PHPMyAdmin (web-based MySQL/MariaDB server administration) +* LetsEncrypt (automatic free SSL encryption setup) + +## Client + +The Apps are web-based and built with modern technologies. This means any machine capable of running a standards-compliant, modern, up-to-date web browser will run the Apps just fine. + +### Officially Supported Operating Systems +Note: This list is incomplete, as any OS capable of running one of the browsers from the list below will suffice. + +* Linux + * Ubuntu Linux 18.04 and supported non-LTS releases + * Ubuntu derivatives (such as Linux Mint) based on a supported Ubuntu release + * Debian 8 or 9 +* Android + * 5.0+ with Chrome, or + * Any supported by Firefox, or + * Any supported by the Netsyms Apps for Mobile client + +### Supported Operating Systems +Any other operating system running a supported browser is also supported, but we may not provide support for issues not directly related to the Apps. + +### Supported Screen Resolutions +All screens with a viewport (the portion of the screen showing the app, in contrast to window borders, status bars, etc) having a resolution greater than 300x400 pixels will work, assuming use of a supported browser. + +### Supported Web Browsers +* Mozilla Firefox (latest and ESR) +* Chrome/Chromium (latest and latest-1) +* Chrome WebView, AOSP WebView (Android 5.0+) + +### Unsupported Web Browsers +While we do not support the following browsers, they will likely still work. You won't break anything by trying. + +* Edge +* Safari +* Opera + +### Known Incompatable Browsers +These legacy browsers are known to lack support for CSS rules, JavaScript APIs, and other technology required to run the Business Apps. + +* Opera Mini +* Internet Explorer \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..bbf468f --- /dev/null +++ b/docs/index.md @@ -0,0 +1,22 @@ +NotePost is a cloud-based notetaking app. + +# Features + +* __Stay Organized__ + * Color-code your notes and use the favorites feature to keep your thoughts together. + +* __Lists__ + * Keep track of your day by creating checklists. Existing notes can be converted into checklists with a single tap, and items can be marked as done with another tap. + +* __Across All Your Devices__ + * Your notes are available on everything, thanks to a fast and clean web version. We implemented the Nextcloud Notes API, so most notetaking apps that support Nextcloud will support NotePost. Official desktop and mobile apps coming soon. + +* __Exportable__ + * Notes can be easily downloaded as Markdown text, HTML, or OpenDocument text (.odt, compatible with most popular office software). + +* __Simple Formatting__ + * NotePost uses Markdown formatting, a method of showing bold or italic text, lists, headings, and more with plain text. Don't worry about learning Markdown though, you can use the formatting toolbar instead! + +* __JavaScript Optional__ + * When we said "available on everything", we meant everything. NotePost will run without JavaScript, and there's a [command-line Python app](https://source.netsyms.com/Apps/NotePostCLI) too. + diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..4e13262 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,23 @@ +site_name: NotePost Docs +theme: + name: 'material' + logo: 'https://static.netsyms.net/images/products/notepost/logo.svg' + favicon: 'https://static.netsyms.net/images/netsyms/documentation/docs-icon.svg' + font: false + feature: + tabs: false + palette: + primary: 'red' + accent: 'red' +extra_javascript: + - 'https://static.netsyms.net/fontawesome/5/js/all.min.js' + - 'https://docs.netsyms.com/track.js' +extra_css: + - 'https://docs.netsyms.com/font.css' + - 'https://docs.netsyms.com/media.css' +site_author: Netsyms Technologies +repo_name: 'Apps/NotePost' +repo_url: 'https://source.netsyms.com/Apps/NotePost' +copyright:
Creative Commons License
Copyright © 2018-2019 Netsyms Technologies. Some rights reserved.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. +markdown_extensions: + - codehilite