Code Monkey home page Code Monkey logo

upsnap's Introduction

UpSnap

A simple wake on lan web app written with SvelteKit, Go and PocketBase.

โœจ Features

  • ๐Ÿš€ One-Click Device Wake-Up Dashboard
  • โฐ Timed Events via Cron for Automation
  • ๐Ÿ”Œ Ping Any Port You Choose
  • ๐Ÿ” Discover Devices with Network Scanning (nmap required)
  • ๐Ÿ‘ค Secured User Management
  • ๐ŸŽจ 29 Themes
  • ๐Ÿณ Docker images for amd64, arm64, arm/v7, arm/v6
  • ๐Ÿ  Self-Hostable, No Cloud Bullshit!

๐Ÿ“ธ Screenshots

Dark Light

๐Ÿš€ Run the binary

Just download the latest binary from the release page and run it ./upsnap serve --http=0.0.0.0:8090.

For more options check ./upsnap --help or visit PocketBase documentation.

If you want to use network discovery, make sure to have nmap installed and run UpSnap as root/admin.

๐Ÿณ Run in docker

You can use the docker-compose example. See the comments in the file for customization.

If you want to change the port, change the following (5000 in this case):

entrypoint: /bin/sh -c "./upsnap serve --http 0.0.0.0:5000"
healthcheck:
  test: curl -fs "http://localhost:5000/api/health" || exit 1
  interval: 10s

And if you need additional packages inside the container, do this:

entrypoint: /bin/sh -c "apk update && apk add --no-cache <YOUR_PACKAGE> && rm -rf /var/cache/apk/* && ./upsnap serve --http 0.0.0.0:8090"

You can search for your needed package here.

Reverse Proxy

Caddy example

upsnap.example.com {
    reverse_proxy localhost:8090
}

๐Ÿ”’ User permissions

UpSnap offers unique access for each user, per device. While admins have all permissions, they can assign specific rights to users such as displaying/hiding a device, accessing device editing, deleting and powering devices on/off.

๐ŸŒ Exposing to the open web

Although UpSnap has user authorisation, it is not recommended to expose it to the open web and make it accessible by everyone!

Reason: The shutdown device command is basically a command piped to #sh (root if you run docker). If anyone gains unauthorized access and can abuse this api route in any way, the attacker has access to a (root) shell on your local network.

Recommended: If you need access from outside your network, please use a vpn. Wireguard or OpenVPN is your way to go.

๐Ÿ”ง Help developing

Fork this branch and clone it.

  1. Start backend
cd backend
go mod tidy
go run main.go serve
  1. Start frontend
cd frontend
pnpm i
pnpm run dev

Open up http://localhost:5173/, create an admin user and add some devices.

๐ŸŒŸ Star History

Star History Chart

upsnap's People

Contributors

seriousm4x avatar dependabot[bot] avatar github-actions[bot] avatar jarrettgilliam avatar gaby avatar

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.