All Projects → funmaker → Hybooru

funmaker / Hybooru

Licence: MIT license
Hydrus-based booru-styled imageboard in React

Programming Languages

typescript
32286 projects
SCSS
7915 projects
javascript
184084 projects - #8 most used programming language
Handlebars
879 projects
PLpgSQL
1095 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to Hybooru

Boorunaut
A taggable imagebord built in Django. Based on Danbooru.
Stars: ✭ 18 (-66.04%)
Mutual labels:  imageboard, booru
maniwani
Imageboard software for the 21st century
Stars: ✭ 66 (+24.53%)
Mutual labels:  imageboard, imageboard-engine
4scanner
Continuously search imageboards threads for images/webms and download them
Stars: ✭ 103 (+94.34%)
Mutual labels:  imageboard, hydrus
fukuro
Lightweight and powerful next-gen imageboard software based on abandoned Tinyboard
Stars: ✭ 21 (-60.38%)
Mutual labels:  imageboard, imageboard-engine
Imageboards
🍜 an overview of popular imageboard software
Stars: ✭ 83 (+56.6%)
Mutual labels:  imageboard
Flexbooru
A booru client for Android, support Danbooru, Moebooru, Gelbooru, Sankaku, etc.
Stars: ✭ 393 (+641.51%)
Mutual labels:  imageboard
Meguca
anonymous realtime imageboard focused on high performance and transparent moderation
Stars: ✭ 286 (+439.62%)
Mutual labels:  imageboard
iyagi-bbs
Python web board system (textboard, CGI, flatfile)
Stars: ✭ 18 (-66.04%)
Mutual labels:  imageboard
saguaro
saguaro imgboard software
Stars: ✭ 13 (-75.47%)
Mutual labels:  imageboard
Nntpchan
nntp based decentralized imageboard
Stars: ✭ 179 (+237.74%)
Mutual labels:  imageboard
Monaba
Imageboard engine written in Haskell and powered by Yesod
Stars: ✭ 69 (+30.19%)
Mutual labels:  imageboard
Nyx
A simple imageboard with no javascript or dependencies written in Go
Stars: ✭ 19 (-64.15%)
Mutual labels:  imageboard
Hydrus Presets And Scripts
collection of presets and scripts for Hydrus
Stars: ✭ 101 (+90.57%)
Mutual labels:  imageboard
Lainchan
The version of vichan running on lainchan.org
Stars: ✭ 310 (+484.91%)
Mutual labels:  imageboard
Tinyib
MOVED TO GITLAB - Lightweight PHP image board with MySQL, PostgreSQL, SQLite and flat file database support
Stars: ✭ 191 (+260.38%)
Mutual labels:  imageboard
anon.land
open source Imageboard just like was Voxed.net
Stars: ✭ 16 (-69.81%)
Mutual labels:  imageboard
Danbooru
A taggable image board written in Rails 6.
Stars: ✭ 1,077 (+1932.08%)
Mutual labels:  imageboard
Infinity Next
Infinity Next is an imageboard suite utilizing the Laravel framework.
Stars: ✭ 153 (+188.68%)
Mutual labels:  imageboard
Imgbrd Grabber
Very customizable imageboard/booru downloader with powerful filenaming features.
Stars: ✭ 1,006 (+1798.11%)
Mutual labels:  imageboard
Flexbooru Ap
An anime-pictures.net client for Android.
Stars: ✭ 41 (-22.64%)
Mutual labels:  imageboard

Hybooru


Hydrus-based booru-styled imageboard in React, inspired by hyve.

Demo: https://booru.funmaker.moe/

API Documentation

Changelog

Hybooru allows you to create an online booru-styled imageboard and REST API on top of Hydrus client, allowing you to access your collection from anywhere, without the need for running Hydrus instance. It uses its own PostgreSQL database, populated using metadata from Hydrus' SQLite database. Files are not cloned and instead served directly from Hydrus's database. You need to regenerate the Hybooru's database every time you want to update it. Make sure to properly configure configs.json file. Stop Hydrus when you regenerate HyBooru's database if you plan to use live Hydrus' database (use hydrus backup instead if possible)

Features

  • Searching by tags
  • Negative search
  • Ratings
  • Sorting (date imported, rating, size, etc)
  • Searching tags and autocomplete
  • tag and post relations (parents/siblings, duplicates/alternatives)
  • Colored tags
  • REST API
  • Mobile support
  • OpenGraph and OpenSearch
  • Supports browsers without JS

Minimum Hydrus Version: v447

Keep in mind this project is not a standalone, fully-fledged booru, but rather a read-only interface to your Hydrus database. It does not provide any way to manage your posts or tags. The only way to add/modify your data is to do these changes in Hydrus and then rebuild Hybooru's database again(can be done from the cog menu on search/post page).

Currently, only Hydrus Client database is supported. You cannot use Hybooru on top of Hydrus Server.

Setup

  1. Install NodeJS, npm and PostgreSQL.
  2. Create new Postgresql database and user.
  3. Allow user to use pg_trgm and intarray extensions. Either:
    • Grant the user permission to create trusted extensions: GRANT CREATE ON DATABASE <database> TO <user>.
    • Create the extensions yourself: CREATE EXTENSION IF NOT EXISTS pg_trgm; CREATE EXTENSION IF NOT EXISTS intarray;.
  4. Download latest Release production build or build it yourself.
  5. Extract server files.
  6. Edit configs.json to specify database credentials, hydrus db location and other options. See Configuration.
  7. (Optional) Configure reverse proxy.
  8. Run npm install to install dependencies.
  9. Run npm start to start server.

Searching Query Syntax

Searching tries to imitate classical booru's syntax. All tags are lowercase and use _ instead of space character. You can also use ? to match for single character(eg: ?girl) and * to match number of characters(eg: blue_*). Patterns prefixed with - will be excluded from results. Patterns are matched against tag's name, but Hydrus's namespace:subtag syntax is also supported.

Additionally you can sort results by including order:* in query. Supported sorts are: order:posted(date), order:id, order:rating, order:size. You can also append _desc or _asc to specify order(eg: order:posted_asc). If not specified, post are sorted by date descending.

If you use a numeric rating service and successfully imported the ratings, you can also filter posts by their ratings using rating: namespace. You can search posts with specific rating(rating:3), range(rating:2-4) or query posts that have not been rated(rating:none).

Eg: 1girl blue_* -outdoors rating:3-5 order:rating_desc

Configuration

Hybooru's config is stored in configs.json file in the project's root directory. Restart Hybooru to apply changes.

Name Type Default Comment
port number 3939 HTTP server port.
hydrusDbPath string or null null Hydrus db or backup location. If null, default platform-dependent locaton is used: %appdata%/hydrus/db(Windows), ~/.local/share/hydrus/db(Linux), ~/Library/Preferences/hydrus/db(MacOS)
appName string "Hybooru" Specify name of your booru (appears as logo).
appDescription string "Hydrus-based booru-styled imageboard in React" Booru's description used in OpenGraph.
adminPassword string or null null Password used to regenerate database (can be accessed from the cog button). Null disables manual database regeneration.
isTTY boolean or null null Overrides colorful/fancy output. true forces, false disables, null automatically determines. Useful when piping output.
importBatchSize number 8192 Base batch size used during importing. Decrease it if hybooru crashes during import.
pageSize number 72 Number of posts on single page.
cachePages number 5 Number of pages cached in single cache entry.
cacheRecords number 1024 Max number of cache entries.
filesPathOverride string or null null Overrides location of post's files. If null, client_files inside hydrus's db folder is used.
thumbnailsPathOverride string or null null Overrides location of post's thumbnails. If null, filesPathOverride is used.
maxPreviewSize number 104857600 Max size in bytes of post that can be previewed in post page/gallery. Default is 100MB.
db PoolConfig local database node-postgres config object. See https://node-postgres.com/api/client for more details. By defaults it attempts to connect to hybooru database at localhost using hybooru as password.
tags object see below Options related to tags. All tags below support wildcards.
tags.services string[] or null null List of names of tag services to import. Use null to import from all services.
tags.motd string or object or null null Tag used to for random image displayed on main page. You can also specify object to specify different tags for different themes(use light, dark and auto as keys)
tags.untagged string "-*" Overrides query used to determine which posts require tagging. Default "-*" matches all posts with no tags.
tags.ignore string[] [] List of tags that will not be imported from Hydrus (posts tagged by these tags will still be imported).
tags.blacklist string[] [] All posts and tags matching any of specified tags will not be imported from Hydrus.
tags.whitelist string[] or null null Only posts matching specified tags will be imported from Hydrus. Use null or empty array to ignore whitelist.
tags.resolveRelations boolean true Resolve tag siblings and parents. Can be slow in large databases.
rating object or null see below Options related to numerical rating. Set null to remove ratings.
rating.enabled boolean true Enables or disables rating import.
rating.stars number 5 Number of stars used in rating.
rating.serviceName string or null null Name of the numerical rating service name. Set to null to pick any service.

Development

Build scripts are written for Linux. Building on Windows is currently not supported. However, you can still look into package.json and change scripts to use Window's commands. Alternatively you can probably just use Docker or a virtual machine.

Install Dependencies

npm install

Run development

npm run start

Build production

npm run build:prod

Output is saved to dist/ folder in project's root directory. These are the files you will want to deploy.

Start production

cd dist
npm start

Reverse Proxy

It is recommended to set up a reverse proxy to serve static files and enable HTTPS.

Example Nginx configuration:

server {
    listen 80;
    listen 443 ssl;
    
    server_name booru.example.com;
    
    # Uncomment to override thumbnails location
    #location ~ ^\/files\/t(..)(.*)$ { 
    #    root /path/to/thumbnails;
    #    try_files /t$1/$1$2 =404;
    #}
    
    location ~ ^\/files\/(.)(..)(.*)$ {
        root /path/to/files; # hydrus's files location (eg: client_files folder inside hydrus's db folder)
        try_files /$1$2/$2$3 =404;
    }
    
    location / {
        proxy_http_version 1.1;
        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 Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        
        proxy_pass http://localhost:3939/;
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].