https://github.com/nickcrisci/palpalette-2
๐จ Share ambient colors in real-time across IoT LED devices. Connect spaces and people through synchronized lighting experiences with mobile control and smart device integration.
https://github.com/nickcrisci/palpalette-2
ambient-lighting color-sharing docker embedded-systems esp32 ionic iot nestjs smart-lighting typescript websockets
Last synced: 3 months ago
JSON representation
๐จ Share ambient colors in real-time across IoT LED devices. Connect spaces and people through synchronized lighting experiences with mobile control and smart device integration.
- Host: GitHub
- URL: https://github.com/nickcrisci/palpalette-2
- Owner: nickcrisci
- Created: 2025-08-08T05:42:46.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-26T11:56:49.000Z (10 months ago)
- Last Synced: 2025-08-26T15:33:47.710Z (10 months ago)
- Topics: ambient-lighting, color-sharing, docker, embedded-systems, esp32, ionic, iot, nestjs, smart-lighting, typescript, websockets
- Language: TypeScript
- Homepage:
- Size: 1.11 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# PalPalette - IoT Color Sharing Platform
The original idea of this was to create a system that lets remote friends easily share moments with each other. The first version of this was created in the context of a university module. As there were deadlines to fullfill, our techstack was not optimal and the structure lacked... structure.
This second version seen here is the attempt to bring more structure and a better techstack to this project. But again, there were deadlines to fullfill (this time for a study using this system) and the second version had to be created rather quickly. Because of this it was decided to try to create the new system using AI support.
As many of you probably know, this can be rather chaotic at times. While some parts of this system are already working well, others are still chaotic and do not work as intended. In the near future human devs should take control back from the AI in this project, hopefully fixing what the AI could'nt.
As I'm neither an expert in C++, nor in NestJS, the AI created the code only with my supervision. I plan on learning these techs in the near future, to be able to further develop this on my own.
In the meantime, I invite everyone who has a better understanding of these technologies to refactor and expand this project :).
_The following readme was also created by the AI_
> **A revolutionary IoT ecosystem that bridges the digital and physical worlds through color**
PalPalette transforms how we share and experience colors by connecting mobile devices, cloud services, and physical LED displays. Extract colors from your world, share them with friends, and watch them come alive on beautiful LED installations in real-time.
## ๐ฏ Project Vision
In an increasingly digital world, PalPalette creates tangible connections through the universal language of color. Whether you want to share the sunset from your vacation, the cozy ambiance of your coffee shop, or simply brighten a friend's day with their favorite colors, PalPalette makes it possible with just a photo and a tap.
## โจ What Makes PalPalette Special
- **๐ Instant Color Magic**: Point, capture, extract, and share color palettes in seconds
- **๐ค Social Color Sharing**: Send colors to friends like sending messages
- **๐ก Physical Manifestation**: Watch digital colors transform into beautiful LED displays
- **๐ง Zero-Configuration Setup**: ESP32 devices that set themselves up automatically
- **๐ Real-Time Synchronization**: WebSocket-powered instant color delivery
- **๐ฑ Cross-Platform Mobile**: Works on iOS and Android with native performance
## ๐๏ธ System Architecture
### High-Level Overview
```
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Mobile App โโโโโบโ Backend API โโโโโบโ ESP32 Device โ
โ (Ionic/React) โ โ (NestJS + WS) โ โ (Arduino) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โ โ โ
โโโโโผโโโโโ โโโโโโผโโโโโ โโโโโโผโโโโโ
โ Camera โ โDatabase โ โ WS2812B โ
โ Color โ โ(Postgresโ โ LED โ
โExtract โ โ + JWT) โ โ Display โ
โโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ
```
### Detailed Component Architecture
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PalPalette System โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Frontend Layer โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ iOS App โ โ Android App โ โ Web Portal โ โ
โ โ (Ionic/Capacitorโ โ (Ionic/Capacitorโ โ (React) โ โ
โ โ + TypeScript) โ โ + TypeScript) โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ API Gateway Layer โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ NestJS Backend API Server โ โ
โ โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ โ
โ โ โ Auth โ โ Devices โ โMessages โ โ Users โ โ โ
โ โ โ Module โ โ Module โ โ Module โ โ Module โ โ โ
โ โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Communication Layer โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ REST APIs โ โ WebSocket โ โ
โ โ (HTTP/HTTPS) โ โ (Real-time) โ โ
โ โ โ โ โ โ
โ โ โข Authenticationโ โ โข Device Comms โ โ
โ โ โข User Managementโ โ โข Color Sharing โ โ
โ โ โข Device Setup โ โ โข Live Updates โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Data Layer โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ PostgreSQL Database โ โ
โ โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ โ
โ โ โ Users โ โ Devices โ โMessages โ โPalettes โ โ โ
โ โ โ Table โ โ Table โ โ Table โ โ Table โ โ โ
โ โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ IoT Layer โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ ESP32 MCU โ โ ESP32 MCU โ โ ESP32 MCU โ โ
โ โ โ โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ
โ โ โWiFi Manager โ โ โ โWiFi Manager โ โ โ โWiFi Manager โ โ โ
โ โ โDevice Setup โ โ โ โDevice Setup โ โ โ โDevice Setup โ โ โ
โ โ โWS Client โ โ โ โWS Client โ โ โ โWS Client โ โ โ
โ โ โLED Control โ โ โ โLED Control โ โ โ โLED Control โ โ โ
โ โ โโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ
โ โ โ โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ
โ โ โ WS2812B โ โ โ โ WS2812B โ โ โ โ WS2812B โ โ โ
โ โ โ LED Strip โ โ โ โ LED Strip โ โ โ โ LED Strip โ โ โ
โ โ โโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
## ๐ Quick Deployment
## ๐ Quick Deployment
Get PalPalette running in production with these simple steps:
```bash
# Clone the repository
git clone https://github.com/yourusername/PalPalette-2.git
cd PalPalette-2
# Configure environment
cp .env.production.example .env.production
nano .env.production # Set your DB_PASSWORD and JWT_SECRET
# Deploy with Docker
sudo docker-compose -f docker-compose.production.yml --env-file .env.production up -d --build
```
๐ **Complete deployment guide**: [DEPLOYMENT.md](DEPLOYMENT.md)
## ๐ฏ Core Features
### ๐ฑ **Mobile Experience**
- **๐จ Smart Color Extraction**: Advanced algorithms extract dominant colors from any photo
- **๐ฅ Social Color Networks**: Build friendships through shared color experiences
- **๐ง Guided Device Setup**: Intuitive wizard walks users through ESP32 pairing
- **๐ฌ Real-Time Color Chat**: Send colors like messages with instant delivery
- **๐ Color History**: Track and replay favorite color combinations
- **๐ญ Palette Collections**: Organize colors into themed collections
### ๐ **ESP32 IoT Devices**
- **๐ Auto-Configuration**: Zero-touch setup with captive WiFi portal
- **๐ Secure Self-Registration**: Automatic device authentication with pairing codes
- **โก Real-Time WebSocket**: Ultra-low latency color synchronization
- **๐พ Persistent Memory**: Device state preserved across power cycles
- **๐จ Advanced LED Control**: Support for WS2812B strips with smooth transitions
- **๐ก Robust Connectivity**: Automatic reconnection and error recovery
### ๐ฅ๏ธ **Backend Infrastructure**
- **๐ Enterprise Security**: JWT-based authentication with refresh tokens
- **๐ Scalable Architecture**: Microservice-ready NestJS modules
- **๐ Dual Communication**: REST APIs + WebSocket for optimal performance
- **๐ซ Social Features**: Friend networks, requests, and color sharing permissions
- **๐ Complete API**: RESTful endpoints for all system operations
- **๐๏ธ Robust Database**: PostgreSQL with comprehensive migrations
## ๐ญ User Journey Examples
### **The Sunset Sharer**
_"I captured the most beautiful sunset on my hike. Now my friend Emma can enjoy those exact colors on her bedroom LED strip while she relaxes after work."_
1. ๐ธ Capture sunset photo with mobile app
2. ๐จ App extracts warm orange, pink, and purple tones
3. ๐ซ Select Emma from friends list
4. ๐ก Choose Emma's bedroom LED device
5. โก Colors instantly appear on Emma's LED strip
6. ๐ฌ Emma receives notification with original photo
### **The Cozy Coffee Experience**
_"The lighting in this cafรฉ is perfect for reading. I'll share this ambiance with my study group's shared workspace."_
1. ๐ฑ Extract warm amber and soft white tones from cafรฉ photo
2. ๐ฏ Send to "Study Room" device owned by study group
3. ๐ Entire room transforms to match cafรฉ ambiance
4. ๐ Group enjoys enhanced focus atmosphere
### **The Long-Distance Love**
_"Even though we're in different cities, we can share the same colors and feel connected."_
1. ๐ Daily color sharing ritual between partners
2. ๐
Morning person shares sunrise colors
3. ๐ Evening person shares twilight hues
4. ๐ Both experience shared color moments simultaneously
## ๐๏ธ Technical Architecture Deep Dive
### **Data Flow Architecture**
```mermaid
graph TD
A[Mobile App] -->|HTTP REST| B[NestJS API Gateway]
A -->|Photo Capture| C[Color Extraction Engine]
C -->|Hex Colors| A
B -->|Query/Store| D[PostgreSQL Database]
B <-->|WebSocket| E[ESP32 Device Pool]
E -->|WiFi Setup| F[Captive Portal]
E -->|LED Control| G[WS2812B LEDs]
E -->|Status Updates| B
D -->|User Auth| H[JWT Service]
D -->|Device Registry| I[Device Manager]
D -->|Social Graph| J[Friends System]
```
### **Security Architecture**
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Security Layers โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Application Layer โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ JWT Auth โ โ Input Val โ โ Rate Limit โ โ
โ โ & Refresh โ โ & Sanitiz. โ โ & Throttle โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Transport Layer โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ HTTPS/ โ โ Secure โ โ Device โ โ
โ โ WSS TLS โ โ WebSocket โ โ Pairing Codesโ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Infrastructure Layer โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ Database โ โ Docker โ โ Network โ โ
โ โ Encryption โ โ Container โ โ Isolation โ โ
โ โ & Hashing โ โ Security โ โ & Firewall โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
## ๐ Project Structure
```
PalPalette-2/
โโโ ๐ฑ palpalette-app/ # Cross-Platform Mobile Application
โ โโโ src/
โ โ โโโ components/ # Reusable UI components
โ โ โ โโโ ColorExtractor/ # Camera & color analysis
โ โ โ โโโ DeviceSetup/ # ESP32 pairing wizard
โ โ โ โโโ SocialFeatures/ # Friends & sharing
โ โ โ โโโ LEDControls/ # Device management
โ โ โโโ contexts/ # React contexts
โ โ โ โโโ AuthContext.tsx # User authentication
โ โ โ โโโ DeviceContext.tsx # ESP32 device management
โ โ โ โโโ WebSocketContext.tsx# Real-time communication
โ โ โโโ pages/ # Main application screens
โ โ โ โโโ Dashboard/ # Color palette overview
โ โ โ โโโ Camera/ # Photo capture & extraction
โ โ โ โโโ Friends/ # Social network management
โ โ โ โโโ Devices/ # ESP32 device management
โ โ โโโ services/ # API & WebSocket services
โ โ โ โโโ api.service.ts # REST API client
โ โ โ โโโ websocket.service.ts# Real-time communication
โ โ โ โโโ color.service.ts # Color analysis algorithms
โ โ โโโ hooks/ # Custom React hooks
โ โ โโโ config/ # Configuration & constants
โ โโโ android/ # Android platform files
โ โโโ ios/ # iOS platform files (future)
โ โโโ docs/ # Mobile development guides
โ
โโโ ๐ฅ๏ธ backend/ # Enterprise NestJS API Server
โ โโโ src/
โ โ โโโ modules/ # Domain-driven feature modules
โ โ โ โโโ auth/ # JWT authentication system
โ โ โ โ โโโ guards/ # Route protection
โ โ โ โ โโโ strategies/ # Passport strategies
โ โ โ โ โโโ decorators/ # Custom auth decorators
โ โ โ โโโ devices/ # ESP32 device lifecycle
โ โ โ โ โโโ dto/ # Data transfer objects
โ โ โ โ โโโ entities/ # Database entities
โ โ โ โ โโโ services/ # Business logic
โ โ โ โโโ messages/ # Color sharing & WebSocket
โ โ โ โ โโโ gateways/ # WebSocket gateways
โ โ โ โ โโโ handlers/ # Message processors
โ โ โ โ โโโ queues/ # Message queuing
โ โ โ โโโ users/ # User management & social
โ โ โ โโโ friends/ # Friendship system
โ โ โ โโโ palettes/ # Color palette storage
โ โ โ โโโ profiles/ # User profile management
โ โ โโโ migrations/ # Database schema evolution
โ โ โโโ common/ # Shared utilities & decorators
โ โ โโโ config/ # Environment configuration
โ โโโ test/ # Comprehensive test suites
โ โโโ docs/ # API documentation & guides
โ
โโโ ๐ง controller/ # ESP32 Arduino Firmware
โ โโโ src/ # Modular firmware architecture
โ โ โโโ main.ino # Main application loop
โ โ โโโ config.h # Hardware & network configuration
โ โ โโโ core/ # Core system modules
โ โ โ โโโ DeviceManager.cpp # Device lifecycle & registration
โ โ โ โโโ WiFiManager.cpp # Network connectivity & portal
โ โ โ โโโ WebSocketClient.cpp# Real-time communication
โ โ โ โโโ SystemUtils.cpp # Utilities & diagnostics
โ โ โโโ lighting/ # LED control subsystem
โ โ โ โโโ LEDController.cpp # WS2812B strip management
โ โ โ โโโ ColorAnimations.cpp# Smooth color transitions
โ โ โ โโโ EffectEngine.cpp # Advanced visual effects
โ โ โโโ network/ # Network protocols
โ โ โโโ CaptivePortal.cpp # WiFi setup web interface
โ โ โโโ HTTPClient.cpp # REST API communication
โ โ โโโ OTAUpdater.cpp # Over-the-air firmware updates
โ โโโ platformio.ini # PlatformIO configuration
โ โโโ examples/ # Usage examples & tutorials
โ โโโ docs/ # Firmware development guides
โ
โโโ ๐ณ deployment/ # Production deployment
โ โโโ docker-compose.production.yml # Production container orchestration
โ โโโ nginx/ # Reverse proxy configuration
โ โโโ ssl/ # SSL certificate management
โ โโโ monitoring/ # System monitoring & logging
โ
โโโ ๐ docs/ # Comprehensive documentation
โโโ ARCHITECTURE.md # System design & patterns
โโโ DEPLOYMENT.md # Production deployment guide
โโโ API.md # Complete API reference
โโโ DEVELOPMENT.md # Local development setup
โโโ HARDWARE.md # ESP32 & LED setup guide
โโโ TROUBLESHOOTING.md # Common issues & solutions
```
## ๐ง Development Setup
### Prerequisites
- **Node.js 18+** - JavaScript runtime
- **Docker & Docker Compose** - Containerization
- **Arduino IDE or PlatformIO** - ESP32 development
- **ESP32 Development Board** - Target hardware
- **WS2812B LED Strip** - Light display (optional)
### 1. Backend Development
```bash
# Start backend services
cd backend
npm install
docker-compose up -d # PostgreSQL database
npm run migration:run # Database schema
npm run seed:run # Sample data
npm run start:dev # Development server with hot reload
# Access points:
# API: http://localhost:3000
# WebSocket: ws://localhost:3001
# Database: localhost:5432
```
### 2. Mobile App Development
```bash
# Start mobile development
cd palpalette-app
npm install
npx ionic serve # Web browser development
# Platform-specific builds:
npx ionic cap run android # Android device/emulator
npx ionic cap run ios # iOS device/simulator (macOS only)
# Access: http://localhost:8100
```
### 3. ESP32 Firmware Development
```bash
# Prepare ESP32 development environment
cd controller
# Using Arduino IDE:
# 1. Install ESP32 board package
# 2. Install libraries: ArduinoJson, WiFi, WebSockets, Preferences
# 3. Open src/main.ino and upload
# Using PlatformIO:
pio run # Build firmware
pio upload # Flash to ESP32
pio device monitor # Serial monitor for debugging
```
## ๐ Key System Workflows
### **๐ง Device Setup & Pairing Flow**
```
1. ๐ฆ ESP32 powers on โ Creates "PalPalette-Setup" WiFi hotspot
2. ๐ฑ User connects phone โ Opens captive portal at 192.168.4.1
3. ๐ User enters home WiFi credentials โ ESP32 connects to internet
4. ๐ ESP32 auto-registers with backend โ Generates unique pairing code
5. ๐ฑ User opens mobile app โ Enters pairing code to claim device
6. โ
ESP32 receives claim notification โ Device becomes operational
7. ๐จ Device ready to receive and display colors
```
### **๐จ Color Capture & Sharing Flow**
```
1. ๐ธ User captures photo with mobile app camera
2. ๐ง Advanced color extraction algorithm analyzes image
3. ๐ญ App presents dominant color palette (3-8 colors)
4. ๐ฅ User selects friends and target ESP32 devices
5. โก Backend delivers colors via WebSocket to ESP32s
6. ๐ก ESP32 displays colors on LED strip with smooth transitions
7. ๐ฑ Recipients receive notification with original photo
8. ๐ Colors can be replayed, modified, or acknowledged
```
### **๐ซ Social Network & Friends Flow**
```
1. ๐ User searches for friends by username or email
2. ๐ค Sends friend request through mobile app
3. ๐ฌ Recipient receives in-app notification
4. โ
Recipient accepts/declines friend request
5. ๐ค Friends can now share colors and see each other's devices
6. ๐จ Color sharing permissions managed per friendship
7. ๐ Shared color history tracked and accessible
```
## ๐ Documentation & Resources
### ๐ **System Documentation**
- [๐๏ธ **System Architecture**](docs/ARCHITECTURE.md) - Detailed technical architecture
- [๐ **Deployment Guide**](docs/DEPLOYMENT.md) - Production deployment instructions
- [๐ก **API Documentation**](docs/API.md) - Complete REST API reference
- [๐ป **Development Setup**](docs/DEVELOPMENT.md) - Local development environment
- [๐ง **Hardware Guide**](docs/HARDWARE.md) - ESP32 setup and LED configuration
- [๐ **Troubleshooting**](docs/TROUBLESHOOTING.md) - Common issues and solutions
### ๐งฉ **Component Documentation**
- [๐ฑ **Mobile App Guide**](palpalette-app/docs/README.md) - Ionic development & deployment
- [๐ฅ๏ธ **Backend API Guide**](backend/docs/README.md) - NestJS architecture & patterns
- [๐ง **ESP32 Firmware Guide**](controller/docs/README.md) - Arduino firmware development
## ๐ ๏ธ Technology Stack
### **Frontend Technologies**
- **๐ Ionic Framework** - Cross-platform mobile development
- **โ๏ธ React** - Component-based UI framework
- **๐ฑ Capacitor** - Native mobile platform integration
- **๐จ TypeScript** - Type-safe JavaScript development
- **๐ท Camera API** - Native camera access for color capture
- **๐ญ Color Analysis** - Advanced color extraction algorithms
### **Backend Technologies**
- **๐๏ธ NestJS** - Enterprise Node.js framework with dependency injection
- **๐ WebSockets** - Real-time bidirectional communication
- **๐๏ธ PostgreSQL** - Relational database with JSON support
- **๐ JWT Authentication** - Stateless security tokens
- **๐ TypeORM** - Object-relational mapping with migrations
- **๐ณ Docker** - Containerized deployment and development
### **IoT & Hardware**
- **๐ง ESP32** - WiFi-enabled microcontroller with dual-core processing
- **๐ก WS2812B LEDs** - Individually addressable RGB LED strips
- **โก Arduino Framework** - Embedded C++ development environment
- **๐ Captive Portal** - Auto-setup WiFi configuration interface
- **๐พ EEPROM Storage** - Persistent device configuration storage
### **DevOps & Infrastructure**
- **๐ณ Docker Compose** - Multi-container application orchestration
- **๐ Environment Management** - Secure configuration with .env files
- **๐ฆ Git Version Control** - Source code management and collaboration
- **๐ RESTful APIs** - Stateless HTTP service architecture
- **โก WebSocket Protocol** - Low-latency real-time communication
## ๐ Getting Started
### **For Users**
1. **๐ฑ Download the mobile app** (coming to app stores)
2. **๐ Get an ESP32 device** and LED strip
3. **โก Flash the firmware** to your ESP32
4. **๐ง Follow the setup wizard** in the mobile app
5. **๐จ Start sharing colors** with friends!
### **For Developers**
1. **๐ฅ Clone this repository**
2. **๐ Read the development documentation**
3. **๐ง Set up the development environment**
4. **๐งช Run the test suites**
5. **๐ก Start building amazing features!**
### **For Makers & Hardware Enthusiasts**
1. **๐ Check the hardware requirements**
2. **๐ Wire up your ESP32 and LED strip**
3. **โก Flash the firmware**
4. **๐จ Create beautiful LED installations**
5. **๐ค Share your builds with the community!**
## ๐ค Contributing
We welcome contributions from developers, designers, makers, and color enthusiasts! Here's how you can help:
### **๐ Bug Reports & Feature Requests**
- Use GitHub Issues for bug reports
- Provide detailed reproduction steps
- Include hardware/software versions
- Suggest new features and improvements
### **๐ป Code Contributions**
1. **๐ด Fork the repository**
2. **๐ฟ Create a feature branch**: `git checkout -b feature/amazing-feature`
3. **โ
Write tests** for your changes
4. **๐ Update documentation** if needed
5. **๐ Submit a Pull Request** with detailed description
### **๐ Documentation**
- Improve existing documentation
- Add tutorials and examples
- Translate documentation
- Create video guides
### **๐ง Hardware & Firmware**
- Test on different ESP32 variants
- Add support for new LED types
- Optimize power consumption
- Create new visual effects
## ๐ฏ Future Roadmap
### **๐ Coming Soon**
- **๐ iOS App** - Native iOS application
- **๐ Web Dashboard** - Browser-based device management
- **๐ต Music Sync** - Color visualization synchronized with audio
- **๐ค AI Color Suggestions** - Intelligent palette recommendations
- **๐ฑ Widget Support** - Home screen color widgets
### **๐ฎ Future Vision**
- **๐ Smart Home Integration** - Philips Hue, LIFX compatibility
- **๐ฎ Gaming Integration** - Color effects for gaming events
- **๐บ Screen Mirroring** - Display computer/TV colors on LEDs
- **๐ Global Color Events** - Worldwide synchronized color displays
- **๐จ AR/VR Integration** - Virtual color palette interactions
## โ ๏ธ Development Disclaimer
**This project was built with AI assistance** using GitHub Copilot and other AI tools, building upon an original human-created foundation. While the core concepts, architecture decisions, and user experience design reflect human creativity and expertise, significant portions of the implementation were enhanced and accelerated through AI collaboration.
### **๐ค AI-Assisted Development**
- **Code Generation**: Many code components were generated or enhanced by AI
- **Documentation**: Large portions of documentation were created with AI assistance
- **Architecture Refinement**: AI helped optimize and expand the original architecture
- **Testing & Debugging**: AI assisted in creating comprehensive test suites
### **๐จโ๐ป Human Foundation**
- **Original Concept**: The core idea and user experience were human-designed
- **System Architecture**: Base architecture and technology choices were human-driven
- **Creative Vision**: The product vision and user stories are human-created
- **Final Validation**: All AI-generated code was reviewed and validated by humans
This hybrid approach demonstrates the powerful collaboration possible between human creativity and AI capabilities, resulting in a more robust and feature-complete system than either could achieve alone.
## ๐ License
This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.
### **๏ฟฝ Open Source Philosophy**
- โ
**Free to use** for personal and commercial projects
- โ
**Modify and distribute** with attribution
- โ
**Learn and experiment** with the codebase
- โ
**Build upon** for your own projects
## ๏ฟฝ๐ Acknowledgments & Credits
### **๐ ๏ธ Technology & Framework Credits**
- **โ๏ธ React & Ionic Teams** - For exceptional cross-platform mobile frameworks
- **๐๏ธ NestJS Community** - For the robust, enterprise-ready backend framework
- **๐ง Espressif Systems** - For the powerful and affordable ESP32 platform
- **๐ก FastLED Community** - For advanced LED control libraries and effects
### **๐ค Development & Community**
- **๐ค OpenAI & GitHub Copilot** - For AI development assistance and code generation
- **๐ฅ Open Source Community** - For countless libraries and tools that made this possible
- **๐จ Color Theory Researchers** - For algorithms and insights into color perception
- **๐ป Stack Overflow Contributors** - For solutions to countless development challenges
### **๐จ Design & Inspiration**
- **๐ Color Enthusiasts** - For inspiring the core concept of color sharing
- **๐ Smart Home Community** - For pioneering IoT integration patterns
- **๐ฑ UX/UI Designers** - For mobile app design patterns and best practices
---
**๐ Made with โค๏ธ for the IoT and Color Community ๐**
_Bringing digital colors to life, one LED at a time_
[](https://github.com/nickcrisci/PalPalette-2/stargazers)
[](https://github.com/nickcrisci/PalPalette-2/network/members)
[](https://twitter.com/intent/tweet?text=Check%20out%20PalPalette%20-%20IoT%20Color%20Sharing%20Platform!&url=https://github.com/nickcrisci/PalPalette-2)