Giter Site home page Giter Site logo

p4ckysm4cky / booru Goto Github PK

View Code? Open in Web Editor NEW
4.0 7.0 2.0 3.72 MB

A lightweight tag based image board.

Home Page: https://booru.p4ckysm4cky.moe/

License: MIT License

Dockerfile 1.08% JavaScript 6.95% TypeScript 86.86% SCSS 4.53% CSS 0.58%
anime imageboard lightweight

booru's Introduction

booru

A lightweight tag based image board.

Demo

Notice

This project is in alpha. Installation and usage instructions will likely change and essential functionality may be missing.

Features

  • Uses SQLite to store metadata - no database server needed!
  • Simple single passphrase authentication
  • Image thumbnail generation
  • Tag search
  • Clean and responsive layout (mobile friendly)
  • Automatically extracts tags from NovelAI generated images (using a Danbooru filter)
  • Integrated image tag suggestions (optional)

Installation

  1. Ensure Docker is installed. If you do not wish to use Docker, try following the Development instructions below.

  2. Clone this repository:

    git clone https://github.com/p4ckysm4cky/booru.git
    
  3. Build the container:

    docker build -t booru ./booru
    
  4. Run the container:

    docker run \
    --publish $PORT:$PORT \
    --env PORT=$PORT \
    --env SECRET=$SECRET \
    --env PASSWORD=$PASSWORD \
    --volume booruData:/app/data \
    --detach -t booru
    

    replacing $PORT with the port to expose the server on, $SECRET with a random string, and $PASSWORD with a password. The command also creates a volume named booruData if it doesn't exist.

  5. Access the site on http://localhost:$PORT.

Development

  1. Clone this repository:

    git clone https://github.com/p4ckysm4cky/booru.git
    
  2. Enter the repository directory:

    cd booru
    
  3. Install dependencies:

    npm install
    
  4. Ensure the database has been migrated to the latest version:

    npm run migrate
    
  5. Start the development server:

    npm run dev
    

Open http://localhost:3000 with your browser to view the app.

To access authenticated routes, set these environment variables (in a .env.local file or otherwise):

  • SECRET
  • PASSWORD

Optional configuration

Image tag suggestions

To integrate with a service that suggests tags for an image (such as https://github.com/nanoskript/deepdanbooru-docker), set the environment variable SUGGEST_TAGS_ENDPOINT to the service endpoint URL:

docker run \
--env SUGGEST_TAGS_ENDPOINT=https://... \
...

This will add the Suggest button to the image tag editing interface:

When clicked, booru will send a multipart POST request to the specified URL with the image under the "image" key. The service must return a JSON list of suggested tags for the image:

[
  {
    "tag": "..."
  },
  ...
]

The suggested tags will appear in the tag editing interface:

Prevent indexing

To prevent search engines (such as Google) from indexing the site, add the NEXT_PUBLIC_NO_INDEX argument to the Docker build command:

docker build --build-arg NEXT_PUBLIC_NO_INDEX=true ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.