https://github.com/hirotakadango/hdboard
4chan clone in php and sqlite database with only single file.
https://github.com/hirotakadango/hdboard
4chan-clone anonymous booru forum imageboard php sqlite
Last synced: about 2 months ago
JSON representation
4chan clone in php and sqlite database with only single file.
- Host: GitHub
- URL: https://github.com/hirotakadango/hdboard
- Owner: HirotakaDango
- Created: 2025-04-22T09:39:13.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-26T08:30:09.000Z (about 1 year ago)
- Last Synced: 2025-04-27T09:59:04.649Z (about 1 year ago)
- Topics: 4chan-clone, anonymous, booru, forum, imageboard, php, sqlite
- Language: PHP
- Homepage: http://hdboard.rf.gd
- Size: 237 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HDBoard
**HDBoard** is a lightweight and customizable PHP-based message board system inspired by 4chan, designed to be simple, fast, and easy to deploy. Ideal for small communities, personal projects, or internal team boards, HDBoard runs as a single PHP file and uses SQLite for storage.
---
## Features
- **Single File**: Just one `index.php` file to deploy.
- **Easy Installation**: No dependencies besides PHP 7+; SQLite DB is created automatically.
- **Multiple Boards**: Supports dozens of boards/channels, grouped by category.
- **User Accounts & Legacy Posting**: Register/login or post as a legacy/anonymous user.
- **Media Uploads**: Supports image, video, and audio attachments (with previews).
- **BBCode Formatting**: Rich text support with BBCode (bold, italics, spoiler, code, quote, etc).
- **Role-Based Moderation**: Admin, moderator, janitor, and user roles; users can be banned/unbanned.
- **Post Management**: Edit and delete your own posts; moderators can manage others.
- **Security**: CSRF protection, session security, basic input validation.
- **Responsive UI**: Minimal, mobile-friendly interface with dark mode and quick navigation.
- **Customizable**: Change board titles, categories, and appearance by editing the file.
---
## Getting Started
### Requirements
- PHP 7.0 or higher
- A web server (Apache, Nginx, etc.)
### Installation
1. **Download:**
- Clone the repository or download the `index.php` file.
```bash
git clone https://github.com/HirotakaDango/HDBoard.git
# or download index.php from GitHub directly
```
2. **Deploy:**
- Place `index.php` in your web server's root directory.
3. **Access:**
- Open your browser and navigate to your site (e.g., `http://localhost/index.php`).
4. **First run:**
- The SQLite database (`board.db`) and uploads directory are created automatically on first use.
### Optional Configuration
You can edit `index.php` directly to modify:
- Board title and categories
- Storage path and file size limits
- Posting rules and board/channel names
- UI appearance (CSS is included in the file)
- User role hierarchy and permissions
---
## Folder Structure
```
/HDBoard
├── index.php
└── (Optional) uploads/
```
- **index.php** – Main application file (all logic/UI)
- **uploads/** – Where user uploads are stored (auto-created)
---
## Usage
- **Browse boards:** Click any board from the index to view threads.
- **Register/Login:** Optional – registered users get enhanced features and protections.
- **Post Threads/Replies:** Fill out the form, attach files if desired, and submit.
- **Edit/Delete:** Available for your own posts; moderators/admins can manage all posts.
- **Moderation:** Ban/unban users (janitor+), edit/delete posts, manage users.
---
## Security
- **CSRF protection** for all forms.
- **Sessions** use secure cookie settings.
- **Passwords** stored as bcrypt hashes.
- **Input validation** for usernames, comments, and uploads.
---
## Customization
- **Adding Boards:** Edit the `ALLOWED_CHANNELS`, `CHANNEL_NAMES`, and `$channel_categories` sections in `index.php`.
- **Appearance:** All CSS is in the file; tweak to your liking.
- **Limits:** Adjust `MAX_FILE_SIZE`, allowed file extensions, etc.
---
## Credits
- Inspired by [4chan](https://4chan.org/) and classic imageboards.
- Created by [HirotakaDango](https://github.com/HirotakaDango).
- Contributions and feedback are welcome!
---
## Disclaimer
Use responsibly. Some channels may be NSFW. You are responsible for the content and moderation on your deployed instance.