A modular smart mirror interface built with React. Features draggable and resizable apps that can be customized through a settings page.
- Modular Apps: Clock, Date, Weather, and News apps
- Draggable Interface: Apps can be dragged around the mirror surface
- Resizable Apps: Resize apps by dragging the corner handle
- Settings Page: Enable/disable apps and configure their settings
- Persistent Layout: App positions and sizes are saved between sessions
- Black Background: Optimized for mirror display
- Digital clock display
- 12/24 hour format toggle
- Show/hide seconds option
- Adjustable font size
- Current date display
- Multiple date format options
- Show/hide year option
- Current weather conditions
- Location-based weather data
- Temperature units (Celsius/Fahrenheit)
- Weather details toggle
- Latest news headlines
- Multiple news sources
- Configurable refresh interval
- Adjustable number of items
- Clone or copy the SmartMirror folder
- Navigate to the project directory:
cd SmartMirror
- Install dependencies:
npm install
- Start the development server:
npm start
- Open http://localhost:3000 to view the smart mirror
This project includes an optional Spotify widget that shows your currently playing track.
To enable it:
- Create a Spotify developer app
- Visit the Spotify Developer Dashboard: developer.spotify.com
- Create an app and note your Client ID and Client Secret.
- Add a Redirect URI
- In your app’s settings, add a redirect URI that matches your environment, e.g.:
http://localhost:3000/callback
(if running on port 3000)http://localhost:8888/callback
(if running on port 8888)
- In your app’s settings, add a redirect URI that matches your environment, e.g.:
- Configure in Settings
- Open the Smart Mirror → Settings → Spotify
- Paste Client ID and Client Secret
- Ensure Redirect URI matches the one registered in the Spotify Dashboard
- Sign in
- Click “Sign in with Spotify” and complete the login. You’ll be redirected back and the widget will start showing your current track.
Scopes used: user-read-currently-playing
, user-read-playback-state
(see Spotify Web API docs at developer.spotify.com).
- Apps are displayed on a black background
- Drag apps by clicking and holding anywhere on the app
- Resize apps by dragging the corner handle (bottom-right)
- Click the settings gear icon to access the settings page
- Toggle apps on/off using the switches
- Click on an app to view its specific settings
- Changes are saved automatically
- Return to the mirror view using the "Back to Mirror" button
- Create a new app component in
src/apps/
- Add the app configuration to
src/data/apps.js
- Import and add the component to the component map in
src/pages/SmartMirror.jsx
- Add settings UI to
src/pages/Settings.jsx
- The project uses Tailwind CSS for styling
- Apps have a semi-transparent black background with white borders
- Modify
src/index.css
for global styles
- React 18.2.0
- React Router DOM 6.8.1
- Tailwind CSS 3.3.2
- React Draggable 4.4.5
- React Resizable 3.0.5
The project follows a modular architecture similar to the HoloMat example:
- Pages: Main mirror view and settings page
- Apps: Individual app components
- Components: Reusable components like DraggableApp
- Data: App registry and configuration management
- Modern browsers with ES6+ support
- Chrome, Firefox, Safari, Edge
- Mobile browsers (touch support for dragging)
This project is intended for personal use and learning purposes.