Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nas5w/react-mirror
React-based magic mirror with node/express back-end.
https://github.com/nas5w/react-mirror
javascript magic-mirror metro mirror-application nodejs react reactjs
Last synced: about 1 month ago
JSON representation
React-based magic mirror with node/express back-end.
- Host: GitHub
- URL: https://github.com/nas5w/react-mirror
- Owner: nas5w
- Created: 2018-11-16T21:34:33.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-17T00:38:53.000Z (almost 6 years ago)
- Last Synced: 2023-10-20T21:59:03.732Z (about 1 year ago)
- Topics: javascript, magic-mirror, metro, mirror-application, nodejs, react, reactjs
- Language: JavaScript
- Size: 527 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Magic Mirror
[![Build Status](https://travis-ci.com/nas5w/react-mirror.svg?branch=master)](https://travis-ci.com/nas5w/react-mirror)
This repository contains the front- and back-end code for a React-based Magic Mirror Application. If you don't know what a magic mirror is, take a look at [this site](https://www.raspberrypi.org/blog/magic-mirror/).
## Architecture
The application is composed of two main directories: `server` and `client`. The `server` directory contains a simple Node/Express application that hits the [OpenWeatherMap API](https://openweathermap.org/api) for weather data and the [WMATA API](https://developer.wmata.com/docs/services/) for metro data. To make this application work as-is, you'll need to get (free) API keys from both sources.
The `client` directory is a React application that uses `fetch` to periodicially retrieve data from the node server.
## Configuration
To configure the application, first install all client and server dependencies:
```bash
cd client
npm i
cd ../server
npm i
```Next, set node environment variables in the `server` and `client` directory for your API keys and settings:
```bash
cp .env.sample .env
```## Using the Application
To use the application, you can simply use node to start both the server and React app:
server:
```bash
cd server
npm start
```React application:
```bash
cd client
npm start
```Navigate to `http://localhost:3000` and you'll see your mirror application in all its glory!
![Magic Mirror Application](https://i.imgur.com/oqDHOIJ.png)