GoDiscourse is a 100% open source, discourse-like forum written in Go. For demo, please visit https://live.godiscourse.com/. For feedback, you can submit issues or join our slack(https://bit.ly/2IV6LCW), Let's learn Go together!
- Go version go1.12.1 darwin/amd64
- postgres (PostgreSQL) 11.1
- react ^16.8.4
- REST API back-end written in Golang
- React-based frontend
- PostgreSQL, one of the best open source, flexible database
- Social login (OAuth 2.0) only support Github now
- JSON Web Tokens (JWT) are used for user authentication in the API
- Markdown supported topic and comment
- Model tested
./
is back-end service, we followed golang-standards project-layout../web
is front-end service, contains React, Parcel and etc../deploy
contains example of deploy, nginx and systemd.
- Set the following environment variables on your system:
export GODISCOURSE_URL=http://localhost
export GODISCOURSE_PORT=4000
export DB_USER=db user
export DB_PASSWORD=db pass
export DB_HOST=localhost
export DB_NAME=godiscourse_dev
export DB_PORT=5432
export ENV=test|development|production
cd ./internal
, copyconfig/example.cfg
toconfig/config.go
. Replace config with yours.- Prepare and start database, the database schema under
./internal/models/schema.sql
, how to install postgresql. cd ./ && make install && make build && ./bin/godiscourse
to start Golang server
-
cd ./web
, copy.env.example
to.env
and.env.development
and change the following fields:SITE_NAME=your site name API_HOST=http://localhost:4000 or production url GITHUB_CLIENT_ID=put your client id
-
run
npm install
to prepare front-end. -
npm run dev
and openhttp://localhost:1234
- go to godiscourse folder
- type
docker-compose up