Advanced Installation

⚙️ Development Requirements

Before you begin building and running the project locally, make sure you have the following tools installed on your system:

  • Java 21 — required to build and run the backend

  • 🟦 Node.js — required for the frontend (Vite + React)

  • 📡 ESP-IDF — required if you plan to flash and configure ESP32 devices


📂 Clone Required Repositories

Start by cloning the necessary repositories for both the backend and frontend:

Backend: ⚙️ Backend

Frontend: 🌐 Frontend

git clone https://github.com/L0rdL0ther/smart_home #Backend
git clone https://github.com/L0rdL0ther/SmartHome #Frontend

🌐Setting Up Backend

First, you can customize the backend settings by modifying the application.yml file located in /src/main/resources/:

spring:
  datasource:
    url: jdbc:postgresql://localhost:5432/smart-home // DB Connection Protocol URL 
    username: admin // DB username
    password: admin // DB password
  jpa:
    hibernate:
      ddl-auto: update
  application:
    name: smart_home

jwt:
  secret: wwwwQJIKGS78nt7686NSF7nfs76NFS7689w.i,e21;+E'!EQ'ew // Jwt Key
  expiration: 86400000 // Thats Not Working

🛠️Building the Backend (Spring Boot)

Navigate to the smart_home directory. After making sure Java 21 is properly configured, run the following command to build the backend:


🌐 Setting Up the Frontend (React + Vite)

Navigate to the SmartHome directory and install dependencies:

To start the development server locally:

🔗 Changing the Backend API URL

To point the frontend to your own backend server, update the API URL in the following file:

📁 src/api/endpoints.ts

Look for this section:

Modify BASE_URL to match your backend's IP/domain and port.

To generate a production-ready build:

After building, your compiled frontend files will be available in the ./dist directory. You can serve these using any HTTP server like Apache or Nginx.

Last updated