Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.

Pre release 0.1 #5

Draft
wants to merge 54 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
c4d9f07
auth in db rework
CyanoFresh Jul 14, 2019
fea4450
auth in db rework
CyanoFresh Jul 14, 2019
f76fbfd
some work
CyanoFresh Jul 15, 2019
075b443
auth in db
CyanoFresh Jul 16, 2019
69a9520
fixes
CyanoFresh Jul 17, 2019
0ab24da
some work; added frontend
CyanoFresh Jul 26, 2019
0fd0fa1
some work
CyanoFresh Jul 27, 2019
5ab80e0
dashboard loading
CyanoFresh Jul 27, 2019
c8efd16
items loading
CyanoFresh Jul 31, 2019
4bd1656
Variable module fixes + frontend
CyanoFresh Aug 1, 2019
804237b
some work
CyanoFresh Aug 1, 2019
89db9ee
work on modules
CyanoFresh Aug 4, 2019
5be3a18
some work
CyanoFresh Aug 7, 2019
3242306
some work
CyanoFresh Aug 12, 2019
d7e45af
updated deps
CyanoFresh Aug 12, 2019
d07bb86
some work
CyanoFresh Aug 13, 2019
69bd9d0
buzzer done
CyanoFresh Aug 14, 2019
5e893a5
ашчуы
CyanoFresh Aug 14, 2019
9a6ac31
yarn
CyanoFresh Aug 14, 2019
3888664
some work
CyanoFresh Aug 14, 2019
6dde52a
users crud
CyanoFresh Aug 15, 2019
6b621b5
fix
CyanoFresh Aug 15, 2019
822d14a
fix
CyanoFresh Aug 15, 2019
e0f2a34
responsiveness fixes
CyanoFresh Aug 16, 2019
0e29be5
temp fix
CyanoFresh Aug 16, 2019
23d3167
fixes
CyanoFresh Aug 18, 2019
c39dc67
build added
CyanoFresh Aug 18, 2019
be6a477
build
CyanoFresh Aug 18, 2019
1bd1ac8
fixes
CyanoFresh Aug 18, 2019
e5c71a8
fixes; updated deps
CyanoFresh Sep 11, 2019
6b33100
deps
CyanoFresh Sep 13, 2019
ca04d6d
buzzer auto unlock fixes
CyanoFresh Sep 24, 2019
0aa6963
api_key fixes
CyanoFresh Sep 24, 2019
d7c2305
buzzer fixes
CyanoFresh Sep 24, 2019
1c8608d
switch api
CyanoFresh Sep 24, 2019
b7a416a
security fixes
CyanoFresh Sep 27, 2019
dad3654
fix
CyanoFresh Sep 27, 2019
c17dbe9
buzzer json decode fix
CyanoFresh Sep 29, 2019
f371d92
small refactor
CyanoFresh Sep 29, 2019
0557eb1
fix
CyanoFresh Sep 29, 2019
5b1e903
fix
CyanoFresh Oct 5, 2019
f3b0ee1
update readme
CyanoFresh Oct 5, 2019
cb17a95
updated deps
CyanoFresh Oct 5, 2019
6dec23f
auth fixes
CyanoFresh Oct 5, 2019
b6fd436
fixes
CyanoFresh Oct 5, 2019
73444d8
fixes
CyanoFresh Oct 6, 2019
fd71188
some work
CyanoFresh Oct 13, 2019
4170832
updated deps
CyanoFresh Nov 10, 2019
2c1ecc4
fixes
CyanoFresh Nov 10, 2019
7b3e028
updated deps
CyanoFresh Nov 10, 2019
dbc356e
changed motion icon
CyanoFresh Nov 10, 2019
933dfe0
build
CyanoFresh Nov 10, 2019
3d72163
Merge remote-tracking branch 'origin/dev' into dev
CyanoFresh Nov 10, 2019
26ede04
prettier watcher
CyanoFresh Nov 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 69 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,73 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea
/.env

.env
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/dictionaries/Alex.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/runConfigurations/backend_start.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/runConfigurations/frontend_start.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/sh.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions .idea/watcherTasks.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Solomaha Home
Solomaha Home
====

*Currently in ALPHA*

Smart Home hub & control panel written using JS, MQTT and React.

## Installation

1. Clone repo && cd:
Expand All @@ -23,13 +27,16 @@ Solomaha Home
```
npm i
```

3. Copy (if dev) and configure env variables:

```sh
cp .env.example .env
```

4. If needed configure & build the frontend (in `./frontend` folder)

## Topic structure:
## Topic structure: (probably outdated)

### Web Panel

Expand Down
27 changes: 27 additions & 0 deletions components/auth/UserModel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const Sequelize = require('sequelize');

module.exports = sequelize => sequelize.define('user', {
user_id: {
type: Sequelize.STRING(128),
allowNull: false,
},
password_hash: {
type: Sequelize.STRING(),
allowNull: false,
},
api_key: Sequelize.STRING(64),
name: Sequelize.STRING(128),
room_id: Sequelize.STRING(128),
last_login_at: Sequelize.INTEGER.UNSIGNED,
}, {
updatedAt: false,
indexes: [
{
fields: ['user_id'],
unique: true,
},
{
fields: ['api_key'],
},
],
});
23 changes: 23 additions & 0 deletions components/auth/UserTokenModel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const Sequelize = require('sequelize');

module.exports = sequelize => sequelize.define('user_token', {
user_id: {
type: Sequelize.STRING(100),
allowNull: false,
},
token: {
type: Sequelize.STRING,
allowNull: false,
},
}, {
updatedAt: false,
indexes: [
{
fields: ['token'],
unique: true,
},
{
fields: ['user_id'],
},
],
});
Loading