Skip to content

alainpaluku/gohome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏠 GoHome

Smart Home System for Raspberry Pi

Go React Fiber Raspberry Pi


FeaturesQuick StartAPIDevelopment


GoHome Preview

⚡ Features

🎛️ Device Control

Control all your smart devices from one place - lights, thermostats, cameras, TVs and more.

🏡 Room Organization

Organize devices by rooms for easy management and quick access.

📊 Energy Monitoring

Track power consumption with real-time statistics and historical data.

🌙 Dark Mode

Beautiful dark and light themes that adapt to your preference.

🌍 Multi-language

Full support for English and French interfaces.

📱 Responsive Design

Works seamlessly on mobile, tablet and desktop.


🚀 Quick Start

One-line install (Raspberry Pi)

curl -fsSL https://raw.githubusercontent.com/alainpaluku/gohome/main/scripts/install-rpi.sh | bash

With Podman

git clone https://github.com/alainpaluku/gohome.git
cd gohome
podman-compose up -d

Then open http://localhost:3000


🏗️ Tech Stack

Layer Technology
🖥️ Frontend React 18 · TypeScript · Vite · TailwindCSS · shadcn/ui
⚙️ Backend Go · GoFiber · gRPC · Protocol Buffers
📨 Messaging NATS
📈 Monitoring VictoriaMetrics
📦 Container Podman

📁 Project Structure

gohome/
├── 📂 ui/                   # React Frontend
│   ├── src/components/      # UI Components
│   ├── src/pages/           # App Pages
│   └── src/lib/             # API Client
│
├── 📂 core/                 # Go Backend
│   ├── cmd/server/          # Entry Point
│   └── internal/
│       ├── api/             # REST API (Fiber)
│       ├── grpcserver/      # IoT Communication
│       ├── messaging/       # NATS Events
│       └── metrics/         # Monitoring
│
├── 📄 Containerfile         # Podman Build
└── 📄 podman-compose.yml    # Orchestration

📡 API

Devices
Method Endpoint Description
GET /api/v1/devices List all devices
GET /api/v1/devices/:id Get device details
POST /api/v1/devices Create device
PUT /api/v1/devices/:id Update device
DELETE /api/v1/devices/:id Delete device
POST /api/v1/devices/:id/command Send command
Rooms
Method Endpoint Description
GET /api/v1/rooms List all rooms
GET /api/v1/rooms/:id/devices Get room devices
Examples
# List devices
curl http://localhost:3000/api/v1/devices

# Toggle a light
curl -X POST http://localhost:3000/api/v1/devices/1/command \
  -H "Content-Type: application/json" \
  -d '{"action": "toggle"}'

💻 Development

# Backend
cd core && go run ./cmd/server

# Frontend (separate terminal)
cd ui && npm install && npm run dev

Build for ARM

cd core && make build-arm

🔌 Ports

Service Port
Web + API 3000
gRPC 50051
Metrics 8428
NATS 4222

📦 Podman Commands

podman-compose up -d          # Start
podman-compose logs -f        # Logs
podman-compose restart        # Restart
podman-compose down           # Stop
podman-compose up -d --build  # Rebuild

📄 License

MIT © Alain Paluku


⬆ Back to top

Releases

No releases published

Packages

 
 
 

Contributors