Giter Site home page Giter Site logo

hometab's Introduction

HomeTab

Self hosted life/home assistant.
Designed to run on NAS Linux box with x64 CPU within secure network.

Detailed docs are WIP
If you have any questions, just create an issue, I'll be glad to help :)

Requirements

  • x86-64 CPU (AMD/Intel)
  • Linux (Windows support in the future)
  • MariaDB / MySQL
  • Redis

How to run

Docker

Basic example:

docker run -p "3000:3000" quay.io/systemz/hometab

You should configure DB credentials via ENV settings. All ENV variables can be found in internal/config/config.go

If configured properly you should be able to reach web interface

Dev setup

# backend
docker-compose up -d
./Taskfile.sh install-tools
./Taskfile.sh dev-backend
./Taskfile.sh dev-seed

# frontend
./Taskfile.sh dev-frontend

# android app
# open android dir with Android Studio

Notes

This is important. Project is in early stage. Due to security reasons, please don't expose HomeTab to public internet. Firewall or IPv4 NAT should be your good friend for now.

Repo structure

Directory structure mostly assembles this:

This repo is a merge of three, previously separate projects that were closed source:

  • tasktab
  • tasktab-android
  • gotag

Due to high context switching mental cost during development, I merged them into one.
During merge I had an idea to share code with community and here we are :)

Stack

Golang backend + Vue.js/Vuetify (material design) frontend.
As an additional client, we have Android app too.

Android app

App doesn't use any Google dependent services. Should run on any custom ROM, with our without root.
Notifications are based on pretty good and free service https://pushy.me/.

Previously I wrote push notifications based on MQTT myself, it was working quite good. Should be findable by "RabbitMQ" in removed code. With this setup, whole app worked fully offline in LAN.

Android app is not available on Play store and probably never will.
Author want to spend more time on useful features for users than boxing with mostly nonsense store ToS changes and constantly changing app in strange ways.
Just ignore all google nagging popups about "security" (in reality it is about their market domination), download .apk and install it. Done.
I will try to put it on https://f-droid.org/ to make updates easier.

TODO

  • few screens and webms from web gui and android app in readme
  • integrate web templates within binary like migrations already are
  • finish cmd/agent that will send events from user PCs to backend
  • docker-compose for easier production setup
  • doc pushy.me token requirement

License

MIT

hometab's People

Contributors

aylin777 avatar systemz avatar

Watchers

 avatar  avatar

hometab's Issues

Tasker integration

QR code scanning to login

Mobile app should be able to scan QR code with token to prevent user from copy-pasting or worse - typing manually.
Token should be pretty long to be secure but it's in reverse to being comfortable to user to type it.

News feed generator

For future RSS reader, we can generate feed with aggregated news source: https://newsapi.org/.
As a start, we can just create endpoint which will provide RSS/Atom feed of those news from API.
Next we can implement some filtering options via title or content.

Make public URLs for android app

Artifact builds aren't available to anonymous users on GitHub.
Probably we should just run rclone via CI on master branch to upload to some bucket with short commit in filename.

Blog post helper

From my own experience, markdown plaintext files are the best solution for blog posts. It's resistant to standards changing and lacks vendor lock-in.
https://gohugo.io/ works nicely for generating blogs.

Unfortunately, creating posts when you have the idea is a chore.
Typing out creation date, uploading some images to buckets, resizing to thumbs, this takes some effort.
We can create some sort of temp storage when you can easily draft a post and then when convenient just export it or copy paste to "real" editor.

ProseMirror should be ideal for this, we have markdown support and image upload support almost out of the box:

Alternatively: https://codemirror.net/6/

We can probably just fix out current note system and add uploading to object storage on backend.
Selecting what bucket we want to use and URL alias for them would be nice, then we can have nice links to images in posts.

Device endpoint doesn't show new devices

Device endpoint needs additional events in DB to correctly show device on Settings page. It should not. README command (dev-seed) doesn't provide enough data & there is no way to add data without manually inserting it into DB.

INSERT INTO `devices` (`id`, `user_id`, `name`, `token`, `token_push`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'PhoneX', 'ea2f5fc2-8fc9-11eb-b2f9-2fb84f6e38f4', 'v609234pclq0mamocusx3a', '2021-03-28 13:30:17', '2021-03-28 13:30:17', NULL),
(2, 1, 'Zphone', '0bae9ada-8fcc-11eb-96a4-bf39709cff3e', 'wcqd3uqj8jmf7q1xwevfzx', '2021-03-28 13:30:17', '2021-03-28 13:30:17', NULL);


INSERT INTO `events` (`id`, `user_id`, `device_id`, `code`, `val_str`, `val_int`, `created_at`) VALUES
(1, 1, 1, 1, NULL, 69, '2021-03-28 13:39:41'),
(6, 1, 1, 2, NULL, NULL, '2021-03-28 13:39:41'),
(9, 1, 1, 1, NULL, 42, '2021-03-28 13:39:41'),
(10, 1, 1, 3, 'Never Gonna Give You Up', NULL, '2021-03-28 13:39:41'),
(11, 1, 1, 4, 'Rick Astley', NULL, '2021-03-28 13:39:41'),
(12, 1, 1, 5, NULL, NULL, '2021-03-28 13:39:41');

Those two inserts solve the problem.

Auto importing new images

We can add new memes or other images from sources that we can like or it's popular right now to some sort of queue to like/dislike

Related:
#37
#39

Show real Projects on Settings page

Currently there's mockup of projects data, so it should be swapped for getting it from backend.

Notes for the future:

  • getProjects frontend method
  • populate DB with Projects (see seed dir with devices)

Last 10 counters list

Usually we use just use repeatedly just few of them, yet we must search for it constantly.
It would be nice to have quick links above datatable, just like google drive have tiles about main list of files, we just need names and tags in small tiles.

Backend should be already done or needs just misc adjustment.
We already have endpoint for last counters for android app:

r.HandleFunc("/api/v1/counter/{id}", ApiCounter)

func ApiCounter(w http.ResponseWriter, r *http.Request) {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.