Giter Site home page Giter Site logo

satellity / satellity Goto Github PK

View Code? Open in Web Editor NEW
602.0 20.0 73.0 6.83 MB

Yet another open source forum written in Golang, React and PostgreSQL.

License: MIT License

Go 54.50% HTML 0.38% JavaScript 32.06% CSS 1.95% Shell 0.16% SCSS 10.95%
forum golang discussion-forum discussion-board react postgres restful-api community

satellity's Introduction

Satellity

Satellity is a 100% open source forum, written in Go. Please visit https://routinost.com for more details. For feedback, you can submit issues or join our slack(https://bit.ly/31b6xeX), Let's learn Go together!

How to deployment

  1. A VPS, I'm using Digital Ocean right now, and you can use any other VPS like GCP, AWS. You'll get some credit from the link, and it depends on you.
  2. Install Nginx sudo apt install nginx -y, here is an example config of nginx https://github.com/satellity/satellity/blob/master/deploy/nginx_example.conf , I'm using Ubuntu 20.04 LTS
  3. Install Postgresql sudo apt install postgresql -y, how to install PostgreSQL On Ubuntu, after create the database, you need import the database schema https://github.com/satellity/satellity/blob/master/internal/models/schema.sql
  4. Deploy the api server and web, you can find the shell script here: https://github.com/satellity/satellity/tree/master/deploy
  5. Use systemd to manage http server, here is the service template https://github.com/satellity/satellity/blob/master/deploy/systemd/satellity-http.service, and you can find the basic commands here
  6. Lets Encrypt, here is a step by step tutorial, https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04
  7. Then you can visit you website after restart nginx

Some people want to know why not use docker? The most direct reason is that I don't know docker and didn't take time on it. And a shell script is enough for me right now.

Features

  1. REST API back-end written in Golang
  2. React-based frontend
  3. PostgreSQL, one of the best open source, flexible database
  4. Social login (OAuth 2.0) only support Github now
  5. JSON Web Tokens (JWT) are used for user authentication in the API
  6. Markdown supported topic and comment
  7. Model tested

Built With

  1. go version go1.15 darwin/amd64
  2. postgres (PostgreSQL) 12.3
  3. react ^16.13.1

Structure

  1. ./ is back-end service, we followed golang-standards project-layout.
  2. ./app is front-end service, contains React, Parcel and etc.
  3. ./deploy contains example of deploy, nginx and systemd.

Screenshot

Satellity

Getting Started

Backend

  1. cd ./internal, copy config/config.example to config/config.yaml. Replace config with yours.
  2. Prepare and start database, the database schema under ./internal/models/schema.sql, how to install postgresql.
  3. cd ./ && go build && ./satellity to start Golang server

Frontend

  1. Copy env.example to .env, and replace Satellity with your project name.

    SITE_NAME=your site name
    
  2. run yarn install, then yarn start. It's running now.

Contribution

When contributing to this repository, please reach out to @jadeydi or other contributors via email, issue or any other means to discuss the changes you wish to make.

You can also just clone the repository, create a new branch of the feature or issue and make adequate changes then push and create a pull-request and request a review from other contributors.

License

https://opensource.org/licenses/MIT

satellity's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar guohuang avatar jadeydi avatar topseysuave avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

satellity's Issues

Unable to Start Docker

It seems that the Dockerfile is missing for ./internal

Here is error message when starting docker.

$ docker-compose up
Building api
ERROR: Cannot locate specified Dockerfile: Dockerfile

Better design request

As a software engineer, I'm not familiar with the design. If you are an expert please give me some feedbacks of UX.
Thanks

Git commnad

Hii
I want to know which command we can use for add git file
Like when we are using git add then we have to change directory but I want to add a specific directory without change directory like
When we are clone then we can direct clone
Git clone url folder name . here we no need to change directory like CD folder name

But I want to know how we can do for adding time please help me regarding this
Thanks

Got error when first startup

WebSocket connection to 'ws://localhost:34875/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

parcelRequire.node_modules/parcel-bundler/src/builtins/hmr-runtime.js @ hmr-runtime.js:29
  newRequire @
  (anonymous) @
  (anonymous) @

Dependabot couldn't find a go.mod for this project

Dependabot couldn't find a go.mod for this project.

Dependabot requires a go.mod to evaluate your project's current Go dependencies. It had expected to find one at the path: /app/go.mod.

If this isn't a Go project, or if it is a library, you may wish to disable updates for it from within Dependabot.

Resources & Articles help improve the project

Why not use an ORM Driver?

Why not allow using this piece of software with MySQL or even sqlite?
All you had/have to do is implement an orm driver such as GORM or the like...

Push notifications?

Plans to add web push api for notifications? Would be great with closed tab / browser support!

[HELP] Invalid Host Header

I run satellity but it only responds Invalid Host Header.
Could you tell me how to fix this issue?

p.s.
I did yarn build in app and pointed apache at build directory.
Then click 'Login' and I can see only busy circle as below:
ScreenShot 2019-11-18 10 58 17

how was database migration managed ?

Great work! Given an orm is not used, I wonder how do you manage data migration?

For myself play with the code, how do you recommend I get some fake data to start with ?

Code review request

GoDiscourse is an MIT open source, code review will help it improve the code quality! Any feedback is appreciated.

From demo site if cancel login popup callback enter loop state.

At demo-site when

  1. try to login
  2. login popup
  3. click cancel
  4. callback looping.

Env.

  • Firefox latest
  • Windows 10
https://routinost.com/oauth/github/callback?error=access_denied&error_description=The+user+has+denied+your+application+access.&error_uri=https%3A%2F%2Fdeveloper.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23access-denied

Supported for windows?

Because in the readme file you stated that Build with Go version go1.11.4 darwin/amd64

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.