• This repository has been archived on 06/Apr/2019
  • Stars
    star
    214
  • Rank 184,678 (Top 4 %)
  • Language
    C++
  • License
    Other
  • Created over 9 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

C++ forum system

LeanClub

Build Status

High performance C++ forum system

WARNING: Not recommended for production

DEMO: https://leanclub.org/

Features

  1. Extremely Fast , 20000 RPS on i7 iMac.
  2. Simple and clean frontend.
  3. Full ajax and API.
  4. Google GitHub Twitter OAuth sign in.

Minimum Requirements

  • GCC 4.8
  • CMake 2.8

(Windows is not supported)

Setup

Datebase

  1. Install Apache Couchdb
  2. Create 4 databases named “category” “notification” “topics” and “user”.
  3. Import design docs from “databases” directory.

Environment

  1. apt-get install build-essential cmake libcurl4-nss-dev libboost-all-dev redis-server libhiredis-dev libtcmalloc-minimal4 && sudo ln -s /usr/lib/libtcmalloc_minimal.so.4 /usr/lib/libtcmalloc_minimal.so
  2. Install hiredis from sources ( redis3m is already included )

Config

cp src/config.h.example.h src/config.h
vi src/config.h

Build and run

mkdir Build
cd Build
cmake ..
make
./leanclub

Nginx

server {
    listen 80;
    server_name leanclub.org;
    client_max_body_size MAX_UPLOAD_SIZE;
    root /path/to/leanclub/;

    location / {
        proxy_pass http://127.0.0.1:18080;
        proxy_redirect off;
        proxy_set_header X-Forwarded-For $http_x_forwarded_for;
        proxy_set_header Host leanclub.org;
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Frame-Options DENY;
    }
    	
    # Cache the avatar (Optional) 
    # location /info/ {
    #    proxy_pass http://127.0.0.1:18080;
    #    proxy_redirect off;
    #    proxy_set_header X-Forwarded-For $http_x_forwarded_for;
    #    proxy_set_header Host leanclub.org;
    #    proxy_cache one;
    #    proxy_cache_key "$request_uri";
    #    proxy_cache_valid  200 302  120m;
    # }

    location /static/ {
        expires 10d;
    }
    location /attachments/ {
        expires 365d;
    }
}   

reverse proxy 127.0.0.1:18080 , and map the "static" and "attachments" folder.

About

This program based on: Crow

I’m newbie for c++ , the code may “buggy" , not recommended for production.

License

MIT

More Repositories

1

bilibili-mac-client

An unofficial bilibili client for mac
Objective-C
3,903
star
2

163music-mac-client-unlock

Unlock netease music mac client using dylib inject
Objective-C
330
star
3

DLSiteDumper

Dump image from DMM & DLSite
C++
90
star
4

CrGuard

Prevent chrome run software report tool and check for incompatible applications
C
68
star
5

Blogile

A Node.js Blog System (Pending delete, Will be rewrite)
JavaScript
51
star
6

tysocks

A socks5 proxy server wrote last year, based on https://github.com/typcn/typroto
C
39
star
7

UnblockScreenshot

For some screenshot blocking DRM
C++
39
star
8

php-load-test

CVE 2015-4024 , bug #69364 , multi process php load test
Python
31
star
9

danmaku2ass_native

Convert comments from bilibili to ASS format ( cpp version )
C++
25
star
10

biliquery_db

Bilibili comment hash to user id rainbow table system
C++
24
star
11

ssl-cert-scan

Get website's source ip by ssl certificate
C
19
star
12

Open-Cloud-Forum

A very simple forum system (Outdated)
JavaScript
15
star
13

typroto

TYPCN Internal Software Communication Protocol
C
12
star
14

tydns

TYPCN DNS Server ( not completed )
C++
7
star
15

vp.youget

You-Get plugin for bilibili mac client
Objective-C
6
star
16

vp.baiduyun

Baidu cloud plugin for bilibili-mac-client
Objective-C
4
star
17

anycast-diag

检查 BGP 绕路
JavaScript
4
star
18

vp.tucao

C 站插件 & also as new plugin api example
Objective-C
4
star
19

videopolymer-linux

Excuse me? Linux 能看视频?
C++
3
star
20

vp.youku

Youku plugin for bilibili mac client
JavaScript
3
star
21

vp.letv

Letv plugin for bilibili mac client
Objective-C
2
star
22

SparkleGen

Generate Sparkle appcast.xml / delta patches and sign it automaticly
Objective-C
2
star
23

Tieba-Anti-Ad-for-Chrome

简单的贴吧去广告扩展
JavaScript
1
star