HomeKitty is a website built in Vapor 3 that keeps track of all HomeKit accessories available in the market. Accessories are divided in 18 official categories to make it easier to find the perfect accessory for your needs. You can search any accessory by its name or manufacturer and directly open its official website to find more information.
To get started with HomeKitty, make sure you have installed Vapor on your machine. Please follow the official guide. Make sure to also install PostreSQL since HomeKitty uses it as database. Postgres app should work fine.
Enough with the dependencies, clone the repo.
$ git clone https://github.com/BalestraPatrick/HomeKitty
You can now choose to build via command line, or use Xcode. Who doesn't love Xcode? 🛠
vapor build && vapor run serve
vapor xcode -yand then
You will need to add some API keys as environment variables for the project to run successfully. If you're using Xcode, you can do it from the scheme menu. If you're not using Xcode, define them as environment variables. Here are the required variables:
STRIPE_API_KEYcan be any non-empty string.
SENDGRID_API_KEYcan be any non-empty string.
DB_DATABASEshould point to the PostgreSQL database that you have created locally. Only creating the database should be enough, Vapor will take care of generating all the needed tables when compiled for the first time.
HomeKitty has a very simple architecture. The
Sources folder contains two folders:
- Run: contains
main.swiftand it's the starting point of the application.
- App: contains all the controllers (route handlers), models and helper methods.
There are some basic tests in the Tests folder.
We would love to have you onboard and help us shape the future of HomeKitty. We have a ton of new features and bug fixes ready for you in the issues.
In case you need help or simply have a technical question, join us in the #development channel in our Slack.
All accessories are stored in a PostgreSQL database. If you are interested in contributing with new accessories which are release everyday, let me know and we can try to find a solution and open them up to the community to improve the database.
During development, it's possible to seed the database with some example data for debugging purposes. In order for the script to connect to the database, you have to specify
DB_DATABASE, so they point to the PostgreSQL database. The database at this point should have no table.
Run the HomeKitty project so that the database is prepared all the tables and their schemas are set up. After that's completed, you can run the seed script to populate it with some accessories.
$ cd Scripts && ./seed.sh
HomeKitty is available under the MIT license. See the LICENSE file for more info.
Please don't re-publish the project as it is under your name. Feel free to use it a starting point for any of your other side projects though.