Metadata-Version: 2.4
Name: djangochan
Version: 0.1.0
Summary: Django-powered image/textboard engine.
Author-email: konfou <mail@konfou.xyz>
License-Expression: MIT
Project-URL: Homepage, https://github.com/konfou/djangochan
Project-URL: Issues, https://github.com/konfou/djangochan/issues
Keywords: django,imageboard,textboard,htmx,rest-framework
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Framework :: Django :: 6.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Django
Requires-Dist: django-environ
Requires-Dist: django-precise-bbcode
Requires-Dist: django-simple-math-captcha
Requires-Dist: djangorestframework
Requires-Dist: passlib
Requires-Dist: sorl-thumbnail
Dynamic: license-file

# djangochan

A django-powered image/textboard engine. It's split to a core app with
the boards and posts models, a boards app with hmtx-dynamic
template-based server-rendered front-end, and a read-only (for time
being) JSON API utilizing Django REST framework.

You can set everything up with the `djangochan` CLI; no source checkout
needed. Site profile (title, description, others) is editable in the
admin panel.

## Installation

1. Create/activate a Python 3.10+ virtualenv.
2. Install: `pip install djangochan` (or `python -m pip install -e .`
   from source).
3. In an empty working directory,
   run `djangochan init --admin-password yourpass` to
   create `.env`, run migrations, create admin, and collect static
   files. Add `--sample-data` to load boards/profile from
   `djangochan/sample.py`.
4. Start: `djangochan runserver` (or `python -m djangochan runserver`).

### Configuration & overrides

- `.env` is created in your working directory by `djangochan init`;
  tweak secrets, hosts, paths as needed.
  A packaged `.env.dist` template is used when creating it.
- Media/static: `djangochan init` creates `media/` and `static/`;
  adjust `STATIC_ROOT`/`MEDIA_ROOT` in settings or `.env` as needed.
- Templates/static overrides: use `STATICFILES_DIRS` to point at your
  own theme/assets if you want to rebrand without forking.

This is mainly an educational project for myself to learn Django, and as
a template to follow for future projects. Issues and bug reports
welcome, contributions too considering previous.

There's a test instance deployed on PythonAnywhere, linked in repo
details, where someone can check how project looks like. It updates from
this repo ~~and resets once daily~~ (gonna be doing the reset
irregularly so it isn't permanently in wasteland mode).

## TODO

- refactor search, thread, incl/threads_list, reply templates (currently
  they share large parts)
- add per-board max filesize+
- add ip-based post limit (needed to prevent spam, theoretically server
  could do that)
- add ip-based ban (probably useless for users, and actual spam bots
  could be handled by server)
- improve htmx utilization (currently overlying on hx-boost)
- improve site and admin panel design (django project site has cool
  design and colorscheme to base on, also check simple.css)
- improve caching, maybe save rendered text
- provide posting via JSON API (requires changes to simple-math-captcha)
- add pagination
- add capcodes
- quote link preview utilizing the htmx or json api
- file deduplication+
- file filter+
- add tests to all apps+

Project considered feature complete after those are done.

## Dependencies

- Django
- django-environ
- django-precise-bbcode
- django-simple-math-captcha
- djangorestframework
- passlib (for tripcode hashing after crypt removal)
- sorl-thumbnail

## Similar

Projects to ~~copy ideas~~ get inspiration from.

- [Blazechan](https://gitgud.io/blazechan/blazechan) (2016-2018; &REST)
- [Monki](https://github.com/exclude/monki) (2017)
- [Hexchan](https://github.com/binakot/hexchan-engine) (2018-2019)
- [Picoboard](https://github.com/anonim-legivon/picoboard) (2019; REST)
- [Maniwani](https://github.com/DangerOnTheRanger/maniwani) (2018-2021; Flask)
