Nofu/README.md
2024-07-16 10:19:59 +02:00

201 lines
No EOL
7.2 KiB
Markdown

# Nofu
Nofu for **N**ot **O**nly **F**or **U**s is personal dashboard (V0.3.0)
## Table of Contents
- [Introduction](#introduction)
- [Features](#features)
- [Install](#install)
- [Data dir structure](#data_dir_structure)
- [Backup and restore](#backup_and_restore)
- [Ressources](#ressources)
- [Licence](#licence)
## Introduction
There are many impressive dashboards ([awesome-selfhosted](https://awesome-selfhosted.net/tags/personal-dashboards.html)), which are perfect for our needs. However, for non-technical people/geeks/computer enthusiasts/dev...., it can be difficult to understand all the features offered by these dashboards. That's why I created NOFU in 'scratch-an-itch' mode. Although it may not be perfect for everyone, it meets my needs and those of my family circle.
I also wanted a place where my family could find all my services with a quick documentation on my infrastructure (software used, what it's for, where it's located, where backups are stored...), in case I stop functioning one day. So that they can recover the family data or call someone to help them.
![screenshot](public/imgs/screenshots/screen_full_dark-light.webp)
![screenshot](public/imgs/screenshots/screen_compact_dark-light.webp)
![screenshot](public/imgs/screenshots/screen_icon_dark-light.webp)
## Features
* Simple to understand
* Easy customisation
* Minimal dependance
* No database
* Easy backup and deploy
* Static page
* Fast
* Minimal JS (no external file)
* Responsive
## Install
### Manual
Classic git clone, run composer, create website with your web server, that's all.
#### Clone
```shell
git clone https://forge.leslibres.org/Knah-Tsaeb/Nofu.git
```
#### Install dep
```shell
composer install --no-dev
```
Serve public folder throw your web server.
### Docker
Build image and run.
#### Build
```shell
cd /tmp
wget https://forge.leslibres.org/Knah-Tsaeb/Nofu/raw/branch/main/Dockerfile
```
```shell
docker buildx build -t nofu:0.3.0 .
```
#### Run
```shell
docker run -d --restart unless-stopped -v nofu_data:/var/www/data -e TZ=UTC -p 8189:80 --name nofu nofu:0.3.0
```
Open http://127.0.0.1:8189
## Data dir structure
### Assets
#### CSS
You can customize Nofu with your personal css. Just create /data/assets/css/user.css and re-import user file from settings page.
#### JS
Same with js, but in /data/assets/js/user.js.
### Imgs
#### Screenshots
Put screenshot of your service.
#### Favicons
Put favicon of your service. If you can prefer 128x128 favicon size (or higher).
### Services file
The services file contain a list of your service. Is simple text file, you can edit it with simple text editor (notepad, Pluma, Kate, Vim, Nano....). Nofu use[YAML](https://en.wikipedia.org/wiki/YAML) markup.
Create new file "/data/services.yaml" and edit it or create it localy and upload after on your server. You can use a basic editor include in Nofu, <img alt="docker icon" src="public/assets/icons/edit.svg" width="20">.
Example
```yaml
- title: Wikipedia
screenshot: wikipedia.png
favicon: wikipedia.png
link: https://en.wikipedia.org/wiki/Dashboard_(computing)
appHome: https://www.mediawiki.org/wiki/MediaWiki
location: Web
desc: Wikipedia, the free encyclopedia
type: webapp
```
- Title : name of your service
- Screenshot : name of your screenshot (locate in /data/imgs/screenshots/yourfile.png)
- favicon: name of your screenshot (locate in /data/imgs/favicons/yourfile.png)
- link : url to your service
- appHome : url of apps
- locaton : name of your machine or physical location
- desc : description of service
- type : can be webapp (hard install) or docker or vm (virtaul machine) or redirection
### Config file
Config.yaml is generate by Nofu, you can edit it manualy or via settings page
### Users file
Users.yaml is generate by Nofu, he contain username, password and role (not use for moment).
## Backup and restore
### Backup
All personal data are save in "data" folder. Just backup this dir.
### Restore
Replace the default data direcory by your backup, go to settings pages and check "Reimport images and user files".
## Ressources
### Images
* <a href="https://www.svgrepo.com/svg/448401/docker"><img alt="docker icon" src="public/assets/icons/docker.svg" width="24"> svgrepo.com (MLP licence)</a>
* <a href="https://www.svgrepo.com/svg/448409/edit"><img alt="docker icon" src="public/assets/icons/edit.svg" width="24"> svgrepo.com Logo (MLP License)</a>
* <a href="https://www.svgrepo.com/svg/308923/visual-interface-image-picture-tap"><img alt="docker icon" src="public/assets/icons/editImage.svg" width="24"> svgrepo.com Logo (CC0 License)</a>
* <a href="https://www.svgrepo.com/svg/375064/question-mark"><img alt="docker icon" src="public/assets/icons/help.svg" width="24"> svgrepo.com (CC Attribution License)</a>
* <a href="https://www.svgrepo.com/svg/56164/logout"><img alt="logout icon" src="public/assets/icons/logout.svg" width="24"> svgrepo.com (CCO licence)</a>
* <a href="https://www.svgrepo.com/svg/195725/moon"><img alt="logout icon" src="public/assets/icons/moon.svg" width="24"> svgrepo.com (CCO licence)</a>
* <a href="#"><img alt="docker icon" src="public/assets/icons/missing.svg" width="28"> Missing origin, need to find origin or change</a>
* <a href="https://www.svgrepo.com/svg/172573/arrow-right-curve"><img alt="redirection icon" src="public/assets/icons/redirection.svg" width="24"> svgrepo.com (CCO licence)</a>
* <a href="https://www.svgrepo.com/svg/260068/server"><img alt="docker icon" src="public/assets/icons/server.svg" width="24"> svgrepo.com (CCO licence)</a>
* <a href="https://www.svgrepo.com/svg/17826/setting-gears"><img alt="docker icon" src="public/assets/icons/settings.svg" width="24"> svgrepo.com (CCO licence)</a>
* <a href="https://www.svgrepo.com/svg/306622/qemu"><img alt="docker icon" src="public/assets/icons/vm.svg" width="24"> svgrepo.com (Logo License)</a>
* <a href="https://www.svgrepo.com/svg/521261/web"><img alt="docker icon" src="public/assets/icons/web.svg" width="24"> svgrepo.com Logo (CC Attribution License)</a>
* <a href="https://www.svgrepo.com/svg/105529/hard-drive-interior"><img alt="docker icon" src="public/assets/icons/webapp.svg" width="24"> svgrepo.com Logo (CC0 License)</a>
### Js libs
* <a href="https://github.com/nodeca/js-yaml">js-yaml (MIT licence)</a>
### PHP libs
* <a href="https://github.com/symfony/yaml">symfony/yaml (MIT License)</a>
* <a href="https://github.com/stefangabos/zebra_image">stefangabos/zebra_image (GNU License)</a>
* <a href="https://github.com/thephpleague/commonmark">thephpleague/commonmark (BSD 3-Clause "New" or "Revised" License)</a>
* <a href="https://github.com/stefangabos/zebra_image">stefangabos/zebra_image (GNU License)</a>
And some piece of code from Stack Overflow :-)
## Licence
WTFPL
```
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
```