https://github.com/Jrc356/analytics-dashboard
A custom analytics dashboard built with nodejs and react
https://github.com/Jrc356/analytics-dashboard
analytics-dashboard google-analytics-api nodejs react
Last synced: 9 months ago
JSON representation
A custom analytics dashboard built with nodejs and react
- Host: GitHub
- URL: https://github.com/Jrc356/analytics-dashboard
- Owner: Jrc356
- License: mit
- Created: 2019-08-15T15:43:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-10T07:05:06.000Z (over 2 years ago)
- Last Synced: 2024-12-02T15:46:33.569Z (over 1 year ago)
- Topics: analytics-dashboard, google-analytics-api, nodejs, react
- Language: JavaScript
- Homepage:
- Size: 446 KB
- Stars: 36
- Watchers: 3
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://actions-badge.atrox.dev/Jrc356/analytics-dashboard/goto?ref=master)
# Analytics Dashboard
This analytics dashboard is a custom built website analytics dashboard built on Nodejs and React.
It utilizes the googleapis package to read metrics and display them in a simple and elegant way. It also implements real
time analytics using Socket.io and a custom script. This project was written as a project for an upcoming article (stay tuned for link)
# Installation & Usage
Install the packages necessary by first installing the server side packages. Then install the client side packages.
Create a `.env` file with the following variables:
```bash
SERVER_PORT=
NODE_ENV=
CLIENT_EMAIL=
PRIVATE_KEY=
VIEW_ID=
```
From the top level directory install with yarn or npm:
```bash
$ yarn install
$ cd client
$ yarn install
```
or
```bash
$ npm install
$ cd client
$ npm install
```
Finally, run `npm start` from the top level directory.
This will start the node server and open the local webpack server for the front end.
*NOTE: The start script is built for \*nix systems and uses `&&` so it will not work on Windows systems at this time.
I do have an open issue for this and will return to it in the near future.*
# Deployment
Build the client by doing the following:
From the top level directory:
```bash
$ cd client
$ yarn build
```
or, using npm:
```bash
$ cd client
$ npm build
```
Then change the NODE_ENV variable in `.env` to `production`
Finally, use `npm run server` from the top level directory. This will start up the node server using the client `build`
output as the static directory. You can now navigate to `localhost:` and see your app.
# License
See [LICENSE](LICENSE.md)