Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

infrastrux/haindex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Home Assistant Extension Index

About

This project aims to provide a comprehensive index of Lovelace plugins and custom components for the Home Assistant environment.

The production environment can be found on TBD

Indexed data

Most of the indexed data is directly crawled from GitHub. However, extension maintainers can add more structured information in the form of a package.yaml file at the root level of their extension repository.

An example package.yaml looks like:

name: My awesome extension
description: A short introduction to whatever my awesome extension does
type: lovelace
keywords:
  - awesome
  - terrific
  - gigantic
author:
  name: John Doe
  email: john@doe.com
  homepage: https://john.doe.com
license: MIT
dependencies:
  - thomasloven/lovelace-card-tools
files:
  - awesome-gigantic-card.js

More details about the package.yaml format can be found on TBD

Contribute

The maintainers like this project to be as open as Home Assistant itself and welcome everyone to provide ideas and contribute to extending the functionality of the index.

Services

This project makes use of the GitHub API and Google's recaptcha.

You will need to have access to both of them to be able to start developing.

Setup development environment

Prerequisites

A docker-compose environment is provided with this repository to make it as easy as possible to get up und running.

Please make sure that you're running

  • docker (at least 17.12.0+)
  • docker-compose (at least 1.18.0)

To manage your host file, the project relies on Leo Antunes' docker-etchost.

Docker

Project secrets are kept in environment. Please create a .env file at the project root with the following content and replace the placeholder (<>) with your actual secret data:

#####################
# uncritical
#####################

IPYTHONDIR=/app/.ipython
HISTFILE=/app/.bash_history
DJANGO_LOG_LEVEL=DEBUG
DATABASE_URL=postgres://app:app@haindex-db:5432/app
ELASTIC_HOST=haindex-search:9200
CELERY_BROKER_URL=amqp://haindex-rabbitmq
DEBUG=True

#####################
# critical
#####################

# your username on github
GITHUB_API_USER=
# a personal access token as generated on https://github.com/settings/tokens
GITHUB_API_TOKEN=
# any secret string that will be used to create and verify github webhook requests
GITHUB_WEBHOOK_SECRET=
# define if webhook creation should be enabled, your webserver must be publically accessible to receive webhooks
GITHUB_WEBHOOK_ENABLED=False
# register a new github oauth app on https://github.com/settings/applications/new with callback url https://haindex.org/complete/github/
SOCIAL_AUTH_GITHUB_KEY=
SOCIAL_AUTH_GITHUB_SECRET=
# the base url of your page that will be used as the webhook target
PAGE_URL=
# you recaptcha public and private keys as generated on https://www.google.com/recaptcha/admin
RECAPTCHA_PUBLIC_KEY=
RECAPTCHA_PRIVATE_KEY=

The default docker-compose setup contains containers for

  • Django
  • PostgreSQL
  • elasticsearch
  • RabbitMQ
  • Celery workers

start them all by running:

docker-compose up -d

Then migrate the database, load the prepared example data and rebuild the search index:

docker-compose run --rm django migrate
docker-compose run --rm django loaddata haindex/fixtures/repositories.json
docker-compose run --rm django search_index --rebuild

You're now ready to access your local copy on http://haindex.ix-dev.eu:8000/