aziascreations / Simple-Chan

A very basic textboard made for fun and to tinker with that only uses the standard JRE libraries and logback.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Chan

A very barebone textboard made using the standard JRE libraries for everything except the logging which is being removed.

Why

The goal of this project was to make the simplest "functional" and extensible imageboard I could possibly do without getting lost in complex libraries.

Features or lack thereof

Present

  ● Multiple boards per instance
  ● No storage usage (Everything stays in memory)
  ● Basic launch arguments for the port and boards

Missing

Here is a list of the missing features compared to more mainstream textboard solutions:
  ● Images
  ● Rate-limiting
  ● Captchas
  ● Auto thread pruning
  ● Admin controls
  ● Security measures (None are really implemented here)

All these features haven't been implemented in order to keep the project as simple as possible.

Running

java -jar simple-chan-1.1.0.jar [--board=<board_id;board_name>] [--help] [--port=<port>]

You can choose a specific port with the --port=<port> argument.

You can define custom baord with the --board=<board_id;board_name> argument.
  Example: --board=b;Random or "--board=g;Nerds' Den"

If no arguments are given, the application will use the default values given in the help text.

Building

In order to build the project, you can simply run the customFatJar gradle task and check the /build/libs folder for the compiled jar file.

API (Will be rewritten for v2.0 as I document the code)

GET - Using ???
POST - Using form fields
Responses - May return some JSON if the error is related to the API and not the URL.

GET

URL: /{board-id}/thread

POST

Thread

URL: /{board-id}/thread
Handler: WebBoardHandler

Fields:

message:
Specifies the post's message

author: Optional
Specifies the author's name

title: Optional
Specifies the post's title

Response:
FieldTypeMeaning
errorString Present if an error occurred and gives details about it.
threadIdLong The newly made thread's ID.

Post

URL: /{board-id}/post
Handler: WebBoardHandler

Fields:

thread:
Specifies in which thread the post should be posted

message:
Specifies the post's message

author: Optional
Specifies the author's name

Response:
FieldTypeMeaning
errorString Present if an error occurred and gives details about it.
postIdLong The new post's ID.
threadIdLong The thread's ID in which the post was made.

Configuring

TODO: Classpath overloading for config files...

License

This project, as well as all the libraries that are used, are licensed under the Apache V2 license.

About

A very basic textboard made for fun and to tinker with that only uses the standard JRE libraries and logback.

License:Apache License 2.0


Languages

Language:Java 79.2%Language:HTML 12.1%Language:CSS 8.7%