A full-stack IoT home automation system with cross-platform mobile app, REST API backend, and ESP32 integration
- Overview
- Features
- Architecture
- Tech Stack
- Mobile App
- Backend API
- IoT Integration
- Getting Started
- Screenshots
- Contributing
HomeControl is a comprehensive IoT-based home automation system that demonstrates proficiency in full-stack development, mobile app development, IoT programming, and system architecture. The project showcases integration between mobile applications, web services, databases, and hardware devices.
Key Highlights:
- Cross-platform mobile app built with React Native & Expo
- RESTful API backend with Java servlets and Hibernate ORM
- ESP32-based IoT device control via WiFi
- Real-time device status tracking and history logging
- Modern UI/UX with gradient designs and smooth animations
- Secure Authentication - Login system with password visibility toggle
- Device Control Interface - Intuitive controls for smart home devices
- Real-time Status Updates - Live device status monitoring
- History Tracking - Complete log of device state changes
- Responsive Design - Optimized for both iOS and Android platforms
- RESTful API - Clean API endpoints for device management
- Database Integration - Hibernate ORM with MySQL database
- Session Management - Secure user session handling
- Device Status Logging - Comprehensive activity tracking
- JSON Response Format - Standardized API responses
- WiFi Connectivity - ESP32-based device networking
- Real-time Control - Instant device response via HTTP requests
- Multi-device Support - Control multiple connected devices
- Status Feedback - Device state confirmation and reporting
┌─────────────────┐ HTTP/REST ┌─────────────────┐ JDBC ┌─────────────────┐
│ │ Requests │ │ Hibernate │ │
│ React Native │◄───────────────►│ Java Servlet │◄──────────►│ MySQL DB │
│ Mobile App │ │ Backend │ │ │
│ │ │ │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
│ HTTP Requests
▼
┌─────────────────┐
│ │
│ ESP32 IoT │
│ Devices │
│ │
└─────────────────┘
- React Native - Cross-platform mobile development
- Expo - Development platform and build tools
- Expo Router - File-based navigation system
- Vector Icons - FontAwesome icon library
- Linear Gradient - Modern UI styling
- FlashList - High-performance lists
- Java - Core programming language
- Servlet API - HTTP request handling
- Hibernate ORM - Database abstraction layer
- MySQL - Relational database management
- Gson - JSON serialization/deserialization
- Apache Ant - Build automation
- ESP32 - WiFi-enabled microcontroller
- Arduino IDE - Development environment
- C/C++ - Embedded programming language
- NetBeans IDE - Java development environment
- VS Code - Code editing and debugging
- Git - Version control system
The mobile application provides an intuitive interface for controlling smart home devices:
- Authentication Screen (
index.js) - Secure login with animated UI - Home Dashboard (
home.js) - Device overview and quick controls - Device Controls (
controls.js) - Detailed device management interface
- Secure pin-based authentication with visibility toggle
- Beautiful gradient UI with smooth animations
- Real-time device status updates
- Responsive design for all screen sizes
- Fast navigation with Expo Router
RESTful API built with Java servlets providing comprehensive device management:
POST /LogIn- User authenticationGET /SaveStatus- Update device statusGET /LoadHistory- Retrieve device historyGET /Test- API health check
-- Core entities with relationships
Device (id, name)
Status (id, name)
History (id, device_id, status_id, datetime)
User (id, username, pin)- Session-based authentication
- Comprehensive activity logging
- Real-time status updates
- Structured JSON responses
- Error handling and validation
ESP32-based hardware control system:
- WiFi connectivity for remote control
- Real-time HTTP request processing
- GPIO pin control for connected devices
- Support for lights, switches, and other appliances
- Bi-directional communication with backend
Pin 12: Light Control 1
Pin 13: Light Control 2
WiFi: Network connectivity
HTTP Server: Port 80- Node.js and npm/yarn
- Expo CLI
- Java JDK 8+
- MySQL Server
- Arduino IDE
- ESP32 development board
cd HomeControlApp
npm install
npm startcd HomeControlBackEnd
# Configure database connection in hibernate.cfg.xml
# Deploy to Java application server (Tomcat/GlassFish)
ant build// Update WiFi credentials in home_control.ino
WiFi.begin("YOUR_WIFI_SSID", "YOUR_PASSWORD");
// Upload to ESP32 via Arduino IDECREATE DATABASE homecontrol;
-- Run SQL scripts for table creation
-- Update hibernate.cfg.xml with your credentialsUpdate the following configuration files:
HomeControlApp/app/home.js- Backend API URLHomeControlBackEnd/src/java/hibernate.cfg.xml- Database connectionHomeControlIOT/home_control.ino- WiFi credentials
This project demonstrates:
- Full-stack application design
- RESTful API architecture
- Database design and optimization
- IoT device integration
- Cross-platform mobile development
- Java enterprise application development
- Embedded systems programming
- Database management and ORM
- Modern mobile interface design
- Responsive layouts and animations
- User experience optimization
- Accessibility considerations
- Version control with Git
- Modular code organization
- Error handling and validation
- Documentation and commenting
- Push notifications for device status changes
- Analytics dashboard with usage statistics
- Room-based device grouping
- Scheduled device automation
- Advanced user roles and permissions
- Widget support for quick controls
- Web dashboard interface
- Support for additional IoT protocols
This project is part of my portfolio demonstrating full-stack development capabilities. While primarily for showcase purposes, suggestions and feedback are welcome!
For questions about this project or collaboration opportunities:
Developer: Abdur Rahman Hanas
- Email: nxt.genar7@gamil.com
- GitHub: gitxar7
If you found this project interesting, please give it a star!
Built with passion to showcase full-stack development skills