- Python 63%
- Jinja 26.8%
- CSS 7.6%
- JavaScript 2.1%
- Mako 0.5%
|
|
||
|---|---|---|
| src | ||
| .editorconfig | ||
| .eslintrc.js | ||
| .gitignore | ||
| .prettierrc | ||
| example.env | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
| tox.ini | ||
Arivertisements (ad.ari.lt)
Silly Arivertisements
TL;DR
Arivertisements are the more open, private, and transparent Johnvertisements.
For future contributors:
- https://git.ari.lt/ari.lt/ad.ari.lt is the backend
- https://git.ari.lt/ari.lt/arivertisements are the images/arivertisements
These two repositories are not the same.
Why?
This project was inspired by Johnvertisements from citrons.xyz, motivated by several significant concerns around security, privacy, transparency, and performance. Johnvertisements, for instance, forces an unrestricted iframe to be embedded on every page - a practice that raises security and privacy issues. Additionally, it is not open source or verifiable and exhibits generally poor performance.
My goal is to provide a self-hostable, open source alternative for displaying "advertisements" (not in the traditional commercial sense, but rather as a playful collection of silly images for silly people, this project does NOT support or encourage monetization through arivertisements)
Contributing
To contribute to the back-end, fork this repository (or clone to your favourite git forge) and either make a PR in the web UI or email it to:
Arija A. <ari@ari.lt>
OpenPGP key ID (RSA4096): 5594A925063F3E68885A8F42B6B1654EDCB0F20C
OpenPGP key ID (ECC): 20A6FBAC2E07A6256E5A435A841A60BFE0406195
This will be registered as a pull request by a manual git pull <url>.
For adding your own Arivertisement see https://git.ari.lt/ari.lt/arivertisements/src/branch/main/CONTRIBUTING.md and contribute to that repository. This repository only includes the backend logic.
Running
Firstly, you may want to clone https://git.ari.lt/ari.lt/arivertisements into /var/lib/ads or whatever you set your $ADS to in .env:
git clone --depth 1 https://git.ari.lt/ari.lt/arivertisements /var/lib/ads
Then:
python3 -m venv venv
source venv/bin/activate
source .env # see example.env
pip install --upgrade -r requirements.txt
cd src
# If you remove migrations/:
# flask db init
# vim migrations/script.py.mako (add import flask_app)
# flask db migrate -m 'Initial migration'
flask db upgrade
flask run
For production use a WSGI server such as Gunicorn:
python3 -m venv venv
source venv/bin/activate
source .env # see example.env
pip install --upgrade -r requirements.txt
pip install --upgrade gunicorn
cd src
flask db upgrade
python3 -m gunicorn -b 127.0.0.1:12345 -w 4 app:app # ... Or whatever your configuration is