Giter Club home page Giter Club logo

shamichan's Introduction

Build

shamichan

anonymous realtime imageboard focused on high performance, free speech and transparent moderation

Platforms: Linux, Docker

License: GNU GPLv3

The master branch is currently undergoing active breaking changes towards shamichan v7. If you intend to deploy shamichan, please use the v6 branch.

Runtime dependencies

Docker

Shamichan can be deployed in a self-contained Docker container.

Simply run

docker run --restart unless-stopped -d --network host --mount type=bind,source=$image_dir,destination=/shamichan/images ghcr.io/bakape/shamichan -d $DB

where:

  • $image_dir is the directory to store uploaded images
  • $DB is the URL to a PostgreSQL database to use for data storage

Building from source

Native installation.

For installing shamichan directly onto a server follow the steps bellow. A reference list of commands can be found in ./docs/installation.md

Build dependencies

  • Go >=1.13 (for building server)
  • Node.js >=12.0 (for building client)
  • Rust >= 1.41
  • C11 compiler
  • make
  • pkg-config
  • pthread
  • ffmpeg >= 4.1 libraries (libavcodec, libavutil, libavformat, libswscale) compiled with:
    • libvpx
    • libvorbis
    • libopus
    • libtheora
    • libx264
    • libmp3lame
  • OpenCV 2-3
  • libgeoip
  • OpenSSL
  • git

NB: Ubuntu patches to ffmpeg on some Ubuntu versions <19.10 break image processing. In that case please compile from unmodified ffmpeg sources using:

sudo apt build-dep ffmpeg
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
git checkout n4.1
./configure
make -j`nproc`
sudo make install

Compilation

Run make

Setup

Deployment

shamichan can be started in debug mode simply with ./shamichan. Configurations are split between shamichan instance configurations and server instance configurations, which are required to start the server and connect to the database. The shamichan instance configurations are stored in the database, but server instance configurations are optionally loaded from a config.json file on server start. A sample configuration file can be found under docs/config.json. Documentation for this file is available under docs/config.jsonc.

It is recommended to serve shamichan behind a reverse proxy like NGINX or Apache with properly configured TLS settings. A sample NGINX configuration file can be found in docs/.

Initial instance configuration

  • TODO: grant first user to go to a URL admin rights

Development

TODO: note about compile-time query checking and how to support it

  • See ./docs for more documentation
  • make install_tools to install required build tools
  • make server and make client build the server and client separately
  • Pass DEBUG=1 before make command to build in debug mode
  • Pass NO_DEPS=1 before make command to not install dependencies with npm on each build
  • make clean removes files from the previous compilation
  • make {test,test_no_race} run regular test and tests without data race detection, respectively
  • To run server unit tests add database creation rights to your PostgreSQL role

shamichan's People

Contributors

bakape avatar cardealrusso avatar chiya-chan avatar dasdgdafg avatar dependabot[bot] avatar edisonlee55 avatar fourfivesix avatar hat0r avatar idle-z avatar justinanon avatar kagami avatar kamuso avatar kipukun avatar koinoaoi avatar lalcmellkmal avatar lc-guy avatar lightsockie avatar madouura avatar nbotz avatar nehalem9001 avatar pat36 avatar reiclone avatar rmiko avatar sinini avatar soreil avatar the8472 avatar underr avatar vampiricwulf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shamichan's Issues

404 page redirect

Make 404 redirect to site root instead of simply returning 404.html

Ban descriptions

I should create a new Backbone view for bans, instead of calling JS prompts.

Webm problems

  1. Can't adjust webm sound without it closing the webm (since I'm clicking on play controls, it closes it)
  2. I've had occasional issues where webms keep playing sound after they're closed. Requires a page refresh to stop
  3. I can right click -> "Show Controls"
    But the second I click the volume slider, it just closes it.

waa.ai links

  • it should be optional and disabled by default
  • every link posted would turn into a short and nice waa.ai link

They have an really simple API.

4chan-X like options menu

Are you accepting sugestions from strange anons?
It would be cool to have some options that 4chan-X has and that menu-scheme with theme preview, custom themes, filters, etc.
But I guess that wouldn't be easy
So it's just a random suggestion, thank you for reading

Random name hours

Each anon hour would have a 50% chance of being a random name hour. On a named post, the name is injected into a redis list key and the list is loaded as an array into memory at the start of a RN hour.

Archive purge script

Should be used with a manually input oldest archived post margin

Or I could write a something proper in node, that reads the existing archive.

ALL CAPS POSTING

FORCE IT
IT'S FUN
RANDOM TIMES LIKE ANON HOUR, OR RANDOM POSTS
IDEALLY WOULD ONLY BE VISIBLE TO USER AFTER POST IS COMPLETED, BUT THIS MAY GET COMPLICATED?

Localtime -> UTC -> other localtime conversion

"Something like that. Like, if Eku meant 6:30pm his local time, he puts #1630 correct #1830, and it automatically converts to your local time
So now we know when shit starts local time."

Dark room volatile board

Suggestions:
*No names or trips

  • Purge the database at the start of the hour (Probably means no post numbers, needs research (or use a different counter for posts))
  • No mod vision
  • No archive
  • No rules
  • "As for dark room. I suggest a way to win? It just sounds like an interrogation room with that name. So I expect there to be a way to win. yeah 'm odd.

Also maybe some rules. such as common sense, as in don't post things that are questionable anywhere."
*finding out who is who; something like a tagging system

  • People that get identified by the majority are banned for a day. Or maybe just can't post.
  • we could instead have a secret word. Try to find the password. Once someone says it their posts turn pink or some other bright color and others gotta guess what it is by interrogating them. 5 different pink posters = game over and know password?
    *new not know pick word semi-randomly y parsing the previous round)
  • mafia game
    • mafia can be pimps and all others are sex slaves

Forced anon hours.

Best approach should be blocking name writing to the database. Should be simple enough. writing from the database. Should be simple enough.

  • semi random hour assignment (1 hour in every 6 hours?)

Image hashing errors

Some high resolution images cause hashing errors. Does not seem to be related to the image size limits in imager/config.js Relevant image example:
spaapp

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.