Keine Beschreibung

Skylar "The Cobra" Widulski 38b6df478d Merge pull request 'add rd.cmc.pub instance' (#8) from cmc/rural-dict:main into main vor 1 Tag
src 090f7e2363 feat: keep search query inside input box vor 7 Monaten
static 2c9111248b refactor: simplify project structure and make it "virtual" vor 7 Monaten
templates 2105e7487f fix: update templates vor 6 Monaten
.dockerignore 2c9111248b refactor: simplify project structure and make it "virtual" vor 7 Monaten
.editorconfig caf4d58922 refactor: update main template vor 7 Monaten
.gitignore cd542af102 style: format code with Ruff vor 7 Monaten
.python-version 4a72ed371b feat: use Rye to manage dependencies vor 7 Monaten
Dockerfile 2c9111248b refactor: simplify project structure and make it "virtual" vor 7 Monaten
LICENSE af195c54f9 init vor 2 Jahren
README.md 7635683df5 add rd.cmc.pub instance vor 2 Tagen
docker-compose.yml 2c9111248b refactor: simplify project structure and make it "virtual" vor 7 Monaten
instances.json 7635683df5 add rd.cmc.pub instance vor 2 Tagen
pyproject.toml 81a1df497a Widulski -> Astaroth vor 5 Monaten
requirements-dev.lock 2c9111248b refactor: simplify project structure and make it "virtual" vor 7 Monaten
requirements.lock 2c9111248b refactor: simplify project structure and make it "virtual" vor 7 Monaten

README.md

📖 Rural Dictionary

We're rural, not urban.

Privacy-respecting, NoJS-supporting Urban Dictionary frontend.

🌐 Instances

URL Country Owner name Owner Website
https://rd.vern.cc + Tor + I2P US ~vern https://vern.cc
https://rd.bloat.cat DE bloatcat https://bloat.cat
https://rd.thirtysix.pw NL thirtysix https://thirtysix.pw
https://rd.cmc.pub US ~cmc https://cmc.pub

✨ Features

Frontend supports all Urban Dictionary features and has endpoint-parity with it. Available features include:

  • Word definitions
  • Author pages
  • Homepage with words of the day
  • Random word definitions
  • 404 page with words similar to search
  • Pagination

🚀 Deployment

Clone repository:

git clone https://git.vern.cc/cobra/rural-dict.git
cd rural-dict

🐳 With Docker

docker build . -t rural-dict
docker compose up -d

💻 Without containerization

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.lock
uvicorn src.main:app --no-access-log --proxy-headers --forwarded-allow-ips '*' --host 0.0.0.0 --port 5758

🛡️ Running behind a reverse proxy

To run the app behind a reverse proxy, ensure that the appropriate proxy headers are added. Below is a sample configuration for NGINX:

location / {
    proxy_pass http://127.0.0.1:5758;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

🔧 Development

Install Rye by following the installation guide.

Use rye sync to install dependencies and required Python version.

Use rye run dev to start development server which will reload on every change to source code.

Use rye check --fix and rye fmt to lint and format code. Assumed to be run before each commit to guarantee code quality.

Use rye run basedpyright to ensure typing is correct.

🤝 Support

Join our Matrix room for support and other things related to Rural Dictionary.

🔗 Redirection

To use Rural Dictionary, simply replace an Urban Dictionary URL with a Rural Dictionary URL from the instance list above. Auto-redirect browser extension like Redirector can be used to achieve this.

For example, change:

https://urbandictionary.com/define.php?term=kin

to:

https://rd.vern.cc/define.php?term=kin

Note: More endpoints are supported.

👥 Contributors

  • thirtysix, rewrote project in a more modern libraries stack and implemented missing Urban Dictionary features
  • zortazert, created the initial Urban Dictionary frontend using JavaScript and helped develop Rural Dictionary

📜 License

This project is licensed under the AGPLv3+ license - see the license file for details.