Skip to content

NilBBS is a minimalist anonymous bulletin board system (BBS) that supports posting and replying functionality.

Notifications You must be signed in to change notification settings

Mammoth777/nilbbs

Repository files navigation

nilbbs

NilBBS is a minimalist anonymous bulletin board system (BBS) that supports posting and replying functionality.

English | 中文

NilBBS Screenshot 1 NilBBS Screenshot 2

Features

  • Minimalist design
  • Anonymous posting
  • Replying to posts
  • Simple and clean user interface
  • Periodic deletion of old posts

Quick Start

Running with Executable

  1. Download: Download the latest release for your platform from GitHub Releases.

  2. Extract: Extract the archive (if applicable).

  3. Run:

    • Open a terminal and navigate to the extracted directory.
    • Run the executable:
    # On macOS/Linux
    chmod +x ./nilbbs
    ./nilbbs
    
    # On Windows
    nilbbs.exe
    • To run in the background on Linux/macOS (using nohup):
    # Run in background and redirect output to nohup.out
    nohup ./nilbbs &
    
    # Or specify a custom log file
    nohup ./nilbbs > nilbbs.log 2>&1 &
    
    # Check if the process is running
    ps aux | grep nilbbs

The server will start at http://localhost:8080.

You can configure the application using environment variables, such as setting the port or the automatic post deletion time. See the Configuration section for details.

Docker

You can also run nilbbs using Docker:

# Pull the latest image
docker pull mammoth777/nilbbs:latest

# Run the container
docker run -d -p 8080:8080 mammoth777/nilbbs:latest

# With custom configuration
docker run -d -p 3000:3000 -e NILBBS_PORT=3000 -e NILBBS_INACTIVE_DAYS_BEFORE_DELETE=14 mammoth777/nilbbs:latest

Or use docker-compose:

# docker-compose.yml
version: '3'
services:
  nilbbs:
    image: mammoth777/nilbbs:latest
    ports:
      - "8080:8080"
    environment:
      - NILBBS_INACTIVE_DAYS_BEFORE_DELETE=7
    restart: unless-stopped

Then run:

docker-compose up -d

Configuration

Configuration is handled through environment variables:

  • NILBBS_INACTIVE_DAYS_BEFORE_DELETE: Number of days before inactive posts are deleted (default: 7)
  • NILBBS_PORT: Server port to listen on (default: 8080)

Example:

# Set posts to be deleted after 14 days of inactivity
NILBBS_INACTIVE_DAYS_BEFORE_DELETE=14 ./nilbbs

# Start server on port 3000
NILBBS_PORT=3000 ./nilbbs

# Combine multiple settings
NILBBS_PORT=3000 NILBBS_INACTIVE_DAYS_BEFORE_DELETE=14 ./nilbbs

For Developers

Prerequisites

  • Go 1.19 or higher
  • Git

Development Setup

  1. Clone the repository:
git clone https://github.com/Mammoth777/nilbbs.git
cd nilbbs
  1. Run the application:
go run main.go

Or build and run:

go build
./nilbbs

Using Makefile

The project includes a Makefile for common operations:

make build-amd64 # Build for amd64
make package # Package the application

API Endpoints

  • GET /api/posts: Get all posts
  • GET /api/posts/:id: Get a specific post with its comments
  • POST /api/posts: Create a new post
  • POST /api/posts/:id/comments: Add a comment to a post

License

MIT License

About

NilBBS is a minimalist anonymous bulletin board system (BBS) that supports posting and replying functionality.

Resources

Stars

Watchers

Forks

Packages

No packages published