/stella-smart-lock-mock-api

A mock api for smart door locks

Primary LanguageJavaScript

Stella Smart Lock API

Important Docs

Requirements

  • Node.js >= 16.17.1 (LTS)
  • PostgreSQL >= 14.0
  • Redis >= 7.0.0
  • Optional: docker

Development

$npm run migrate
# run db migrations

$npm run seed
# seed db with test data

$ npm run dev
# run in development

$ npm run start
# run in production

$ npm run lint
# check for errors

$ npm run fix
# fix any errors

$ npm run test
# run tests

Environment

See .env.template

License

See LICENSE.md

Notes

  • No tests for the tuya integration because the API is not working
  • I used uuids instead of auto-incrementing ids because they're more suitable for distributed systems and more secure.