Go to file
Luna Mendes 02d37091a7 pyflakes pass 2018-11-15 00:43:46 -03:00
images all: add guild icon support 2018-11-13 21:12:40 -03:00
litecord pyflakes pass 2018-11-15 00:43:46 -03:00
manage all: add guild icon support 2018-11-13 21:12:40 -03:00
tests tests: add test_no_tracking.py 2018-11-13 02:53:53 -03:00
.gitignore gitignore: add images dir 2018-11-13 21:15:30 -03:00
.gitlab-ci.yml .gitlab-ci.yml: try to fix pillow by adding -dev packages 2018-11-15 00:31:02 -03:00
LICENSE Initial Commit 👌 😂 2018-06-15 21:59:52 -03:00
Pipfile blueprints: add icons blueprint 2018-11-13 17:33:28 -03:00
Pipfile.lock user.billing: add create_payment 2018-11-14 19:49:36 -03:00
README.md README: change tox from pipenv to global env 2018-11-12 18:15:04 -03:00
__init__.py tests: add basic test 2018-11-12 04:10:31 -03:00
config.ci.py first try at a gitlab ci config 2018-11-13 03:52:45 -03:00
config.example.py config: s/WEBSERVER_URL/WEBSOCKET_URL 2018-07-21 17:19:57 -03:00
manage.py add manage.py 2018-11-06 17:42:27 -03:00
nginx.conf channel: add reactions blueprint 2018-11-02 18:29:07 -03:00
requirements.txt Pipfile: add pyflakes 2018-11-12 18:11:04 -03:00
run.py user.billing: add create_payment 2018-11-14 19:49:36 -03:00
schema.sql litecord.blueprints: split users bp into user sub-bp 2018-11-14 03:43:40 -03:00
setup.py Pipfile: add pyflakes 2018-11-12 18:11:04 -03:00
tox.ini Pipfile: add pyflakes 2018-11-12 18:11:04 -03:00

README.md

litecord

Litecord is an open source implementation of Discord's backend and API in Python.

This project is a rewrite of litecord-reference.

Notes

  • Unit testing isn't completly perfect.
  • No voice is planned to be developed, for now.
  • You must figure out connecting to the server yourself. Litecord will not distribute Discord's official client code nor provide ways to modify the client.

Install

Requirements:

  • Python 3.7 or higher
  • PostgreSQL
  • Pipenv
$ git clone https://gitlab.com/luna/litecord.git && cd litecord

# Setup the database:
# don't forget that you can create a specific
# postgres user just for the litecord database
$ createdb litecord
$ psql -f schema.sql litecord

# Configure litecord:
# edit config.py as you wish
$ cp config.example.py config.py

# run database migrations (this is a
# required step in setup)
$ pipenv run ./manage.py migrate

# Install all packages:
$ pipenv install --dev

Running

Hypercorn is used to run litecord. By default, it will bind to 0.0.0.0:5000. You can use the -b option to change it (e.g. -b 0.0.0.0:45000).

Use --access-log - to output access logs to stdout.

$ pipenv run hypercorn run:app

Updating

$ git pull
$ pipenv run ./manage.py migrate

Running tests

To run tests we must create users that we know the passwords of. Because of that, never setup a testing environment in production.

# setup the testing users
$ pipenv run ./manage.py setup_tests

# make sure you have tox installed
$ pip install tox

# run basic linter and tests
$ tox