Giter Site home page Giter Site logo

chieffucker / discuit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from discuitnet/discuit

0.0 0.0 0.0 1.21 MB

A free and open-source community discussion platform.

Home Page: https://discuit.net

License: GNU Affero General Public License v3.0

Shell 0.01% JavaScript 48.11% Go 38.32% HTML 0.42% SCSS 13.14%

discuit's Introduction

Discuit

This is the codebase that powers Discuit, which is an open-source community platform, an alternative to Reddit.

Built with:

  • Go: The backend.
  • React: The frontend.
  • MariaDB: The main datastore.
  • Redis: For transient data.

Getting started

Running locally

To setup a development environment of Discuit on your local computer:

  1. Install Go by following the instructions at go.dev.

  2. Install MariaDB, Redis, Node.js (and NPM). On Ubuntu, for instance, you might have to run the following commands:

    sudo apt update
    
        # Install and start MariaDB
        sudo apt install mariadb-server
        sudo systemctl start mariadb.service
    
        # Install and start Redis
        sudo apt install redis-server
        sudo systemctl start redis.service
    
        # Install Node.js and NPM
        sudo apt install nodejs npm
        ```
    
  3. Create a MariaDB database.

    # Open MariaDB CLI
    mariadb -u root -p --binary-as-hex
    
    # Create a database named discuit (you may use a different name)
    create database discuit;
    
    # Enter exit (or press Ctrl+D) to exit
    exit;
  4. Discuit uses libvips for fast image transformations. Make sure it's installed on your computer. On Ubuntu you can install it with: shell sudo apt install libvips

  5. Clone this repository:

    git clone https://github.com/discuitnet/discuit.git && cd discuit
  6. Create a file named config.yaml in the root directory and copy the contents of config.default.yaml into it. And enter the required config parameters in config.yaml.

  7. Build the frontend and the backend:

    ./build.sh
  8. Run migrations:

    ./discuit -migrate
  9. Start the server:

    ./discuit -serve

After creating an account, you can run ./discuit -make-admin username to make a user an admin of the site.

Note: Do not install the discuit binary using go install or move it somewhere else. It uses files in this repository at runtime and so it should only be run from the root of this repository.

Source code layout

In the root directory are these directories:

  • core: Contains all the core functionality of the backend.
  • internal: Contains Go packages internal to the project.
  • migrations: Contains the SQL migration files.
  • server: Contains the REST API backend.
  • ui - Contains the React frontend.

Contributing

Discuit is free and open-source software, and you're welcome to contribute to its development.

If you're thinking of working on something substantial, however, (like a major feature) please create an issue, or contact the maintainer, to discuss it before commencing work.

License

Copyright (C) 2023 Previnder

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

discuit's People

Contributors

previnder avatar tylercode avatar

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.