> secruxity_

security architecture hack western 12 · 2024

// 00 - executive summary

this is a hackathon project which repurposes old devices such as phones and old laptops to act as a security camera system.

most people throw out old tech, and then go buy expensive cloud cameras like ring that require a $100 upfront cost and monthly subscriptions just to access their own footage. worse, those commercial cameras have a massive attack surface: if their cloud gets breached, your living room feed is compromised. secruxity solves this by using the hardware you already own, for $0, and completely cutting out the vulnerable cloud infrastructure.

// 01 - how it works

the setup relies on the devices being on the same network. it works by utilizing webrtc for peer-to-peer audio and feed streams, combined with cloudflare tunneling to add an https secure layer.

secure remote access

the cloudflare tunnel is crucial. it means i don't have to open ports on my router to view the feed from outside the house. the connection is outbound-only and encrypted, giving me remote access without exposing my local network to the open internet.

// 02 - image vs video storage

storing 24/7 video is incredibly expensive and takes up massive amounts of hard drive space.

saving money on storage

for the feed, instead of recording massive continuous videos, secruxity stores images of each camera view per timeframe you set. for example, you can set it to capture an image every 5 seconds or 10 seconds. this ends up saving a huge amount of money by not requiring a constant video feed or giant hard drives to store weeks of footage.

// 03 - ai & true privacy

dumb motion detection is useless. it alerts you every time a shadow moves. to fix this, secruxity currently uses the gemini api to summarize the current feed and tell you exactly what's happening.

can it be fully private?

yes. if you are worried about feeding data to an ai model such as gemini, it is very simple to fix. you can just set the mainframe pc (which is connecting all the security camera devices) to run the analysis through a local llm.

the ultimate goal: zero third-party costs running a local llm makes this project fully self-sufficient. it completely zeroes out any costs in terms of third-party api usage or connection issues. the only thing you pay for is the electricity to keep the mainframe running.

// 04 - tools & techniques

here's the core stack we used to put it together at the hackathon.

WebRTC Cloudflare Tunnels Gemini API Local LLMs JavaScript Node.js

// 05 - lessons learned

building this in 36 hours proved that you don't need to buy into expensive ecosystems to have good home security.

key takeaway

repurposing old hardware isn't just about reducing e-waste; it's a massive cost-saver. by switching from video to interval images and preparing the architecture to swap cloud ai for local llms, you can build a highly capable system where the recurring cost is literally zero.