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 URLusername:admin // DB usernamepassword:admin // DB passwordjpa:hibernate:ddl-auto:updateapplication:name:smart_homejwt:secret:wwwwQJIKGS78nt7686NSF7nfs76NFS7689w.i,e21;+E'!EQ'ew // Jwt Keyexpiration: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.