Coder Social home page Coder Social logo

sh1luo / casnode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from casibase/casibase

0.0 0.0 0.0 5.5 MB

Next-generation forum software based on React + Golang, QQ group: 555019739

Home Page: https://forum.casbin.com/

License: Apache License 2.0

Go 25.81% HTML 0.78% CSS 2.17% JavaScript 71.25%

casnode's Introduction

Casnode

Casnode is the official forum for Casbin developers and users.

Link

https://forum.casbin.com/

Architecture

Casnode contains 2 parts:

Name Description Language Source code
Frontend Web frontend UI for Casnode Javascript + React https://github.com/casbin/casnode/tree/master/web
Backend RESTful API backend for Casnode Golang + Beego + MySQL https://github.com/casbin/casnode

Installation

Casnode uses Casdoor to manage members. So you need to create an organization and an application for Casnode in a Casdoor instance.

Necessary configuration

Get the code

go get github.com/casbin/casnode
go get github.com/casbin/casdoor

or

git clone https://github.com/casbin/casnode
git clone https://github.com/casbin/casdoor

Setup database

Casnode will store its users, nodes and topics informations in a MySQL database named: casnode, will create it if not existed. The DB connection string can be specified at: https://github.com/casbin/casnode/blob/master/conf/app.conf

dataSourceName = root:123@tcp(localhost:3306)/

Casnode uses XORM to connect to DB, so all DBs supported by XORM can also be used.

Run casnode

Optional configuration

Setup your forum to enable some third-party login platform

Casnode uses Casdoor to manage members. If you want to log in with oauth, you should see casdoor oauth configuration.

OSS, Mail, and SMS services

We use Ali OSS, Ali Mail, and Ali SMS to save the user's pictures, send emails to users and send short messages to users.

You could use another OSS, Mail, and SMS services, we separate those functions from main code, you could found those functions at https://github.com/casbin/casnode/tree/master/service

We would mainly use Ali services for example in the next.

Information in Conf.js

export const OSSRegion = "" //your oss region

//The endpoint of your oss region, find it on https://help.aliyun.com/document_detail/31837.html
export const OSSEndPoint = "" //your oss end point

export const OSSBucket = "" //your oss bucket

//The path stored in your oss
//eg: `casnode` or `casbin/forum/xxx/xxx`
export const OSSBasicPath = "" //prefix for saved pictures 

//If you set a custom domain name in ali-oss bucket, please fill in.
export const OSSCustomDomain = ""

Information in app.conf. You could get your roleArn in https://ram.console.aliyun.com/roles. Before that, you should have an independent account for this application, and add corresponding permissions. Such as:

{
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "oss:PutObject",
                "oss:GetObject",
                "oss:AbortMultipartUpload",
                "oss:DeleteObject"
            ],
            "Resource": [
                "acs:oss:*:*:yourbucket",
                "acs:oss:*:*:yourbucket/*"
            ]
        }
    ],
    "Version": "1"
}

By the way, you should set your bucket permissions to public read.

accessKeyID     = ""
accessKeySecret = ""
roleArn         = ""
OSSCustomDomain = ""
OSSBasicPath = ""
OSSRegion = ""
OSSEndPoint = ""
OSSBucket = ""
SMSSignName = ""
SMSTemplateCode = ""
mailUser = ""
mailPass = ""
mailHost = ""
mailPort = ""

Github corner

We added a Github icon in the upper right corner, linking to your Github repository address. You could set ShowGithubCorner to hidden it.

Configuration:

export const ShowGithubCorner = true

export const GithubRepo = "https://github.com/casbin/casnode" //your github repository

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.