puerta

command module
v0.0.0-...-2c276d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

README

la puerta de mi casa

A ridiculously elaborate rubegoldbergian contraption to exchange my guests' biometric data for my front door going bzzzz, built with go, css, html and javascript.

This project is:

  • highly insecure: you should not run this at home,
  • very alpha: to put it mildly,
  • poorly tested by my guests and myself, so barely—if at all, and
  • truly magical to see in action, when it does work.

Web App

This is what my guests see. It's basically a login page where they enter credentials, and then a big button to open the door. My guests are required to authenticate with a passkeys before opening the door, usually backed by a yubikey, TouchID or whatever android does.

A very simple admin page allows me to manage guests and see the entry log. Built with pochjs (plain-old css, html and js).

API

The API runs on my homelab, serves the web app and interacts with my front door's buzzer. It's built with go and backed by SQLite.

Adapters

Since the buzzer electrical setup is still not something i completely understand, I went around the issue by connecting the buzzer's power supply to a "smart" plug. Originally built it to control a wemo mini smart plug, but have since switched into using a hue one for no good reason other than the wemo's API is annoying.

CLI

There's a small CLI tool to start the API, setup and test the Hue connection, and to add users (helpful during bootstrap).

Documentation

Overview

SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>

Directories

Path Synopsis
cmd
admin
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
db
hue
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
server
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
internal
auth
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
constants
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
door
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
errors
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
server
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
user
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL