{"id":13467360,"url":"https://github.com/discuitnet/discuit","last_synced_at":"2025-03-26T01:30:53.055Z","repository":{"id":210064194,"uuid":"725630697","full_name":"discuitnet/discuit","owner":"discuitnet","description":"A free and open-source community discussion platform.","archived":false,"fork":false,"pushed_at":"2024-10-22T10:04:58.000Z","size":1899,"stargazers_count":420,"open_issues_count":44,"forks_count":50,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-10-29T20:36:56.007Z","etag":null,"topics":["community","go","open-source","pwa","react","reddit","social-network"],"latest_commit_sha":null,"homepage":"https://discuit.net","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/discuitnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"discuit"}},"created_at":"2023-11-30T14:50:01.000Z","updated_at":"2024-10-28T06:50:39.000Z","dependencies_parsed_at":"2023-12-05T10:31:58.480Z","dependency_job_id":"2b3032b7-3797-4b38-82b9-4ea7ff73c7b0","html_url":"https://github.com/discuitnet/discuit","commit_stats":{"total_commits":182,"total_committers":14,"mean_commits":13.0,"dds":"0.20879120879120883","last_synced_commit":"844d1544a19a586ca00a7f8db774a85a52bedea4"},"previous_names":["discuitnet/discuit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discuitnet%2Fdiscuit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discuitnet%2Fdiscuit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discuitnet%2Fdiscuit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discuitnet%2Fdiscuit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/discuitnet","download_url":"https://codeload.github.com/discuitnet/discuit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245571728,"owners_count":20637386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["community","go","open-source","pwa","react","reddit","social-network"],"created_at":"2024-07-31T15:00:55.412Z","updated_at":"2025-03-26T01:30:53.047Z","avatar_url":"https://github.com/discuitnet.png","language":"JavaScript","funding_links":["https://patreon.com/discuit"],"categories":["TypeScript"],"sub_categories":[],"readme":"# Discuit\n\nThis is the codebase that powers [Discuit](https://discuit.org), which is an\nopen-source community platform, an alternative to Reddit.\n\nBuilt with:\n\n- [Go](https://go.dev): The backend.\n- [React](https://react.dev/): The frontend.\n- [MariaDB](https://en.wikipedia.org/wiki/MariaDB): The main datastore.\n- [Redis](https://redis.io/): For transient data.\n\n## Getting started\n\n### Running locally\n\nTo setup a development environment of Discuit on your local computer:\n\n1.  Install Go (1.21 or higher) by following the instructions at\n    [go.dev.](https://go.dev/doc/install)\n1.  Install MariaDB, Redis, Node.js (and NPM). On Ubuntu, for instance, you might\n    have to run the following commands:\n\n    ```shell\n    sudo apt update\n\n    # Install and start MariaDB\n    sudo apt install mariadb-server\n    sudo systemctl start mariadb.service\n\n    # Install and start Redis\n    sudo apt install redis-server\n    sudo systemctl start redis.service\n\n    # Install Node.js and NPM\n    sudo apt install nodejs npm\n    ```\n\n1.  Create a MariaDB database.\n\n    ```shell\n    # Open MariaDB CLI\n    mariadb -u root -p --binary-as-hex\n\n    # Create a database named discuit (you may use a different name)\n    create database discuit;\n\n    # Enter exit (or press Ctrl+D) to exit\n    exit;\n    ```\n\n1.  Discuit uses `libvips` for fast image transformations. Make sure it's\n    installed on your computer. On Ubuntu you can install it with:\n    `sudo apt install libvips-dev`.\n1.  Clone this repository:\n\n    ```shell\n    git clone https://github.com/discuitnet/discuit.git \u0026\u0026 cd discuit\n    ```\n\n1.  Create a file named `config.yaml` in the root directory and copy the contents\n    of `config.default.yaml` into it. And enter the required config parameters in\n    `config.yaml`.\n1.  Build the frontend and the backend:\n\n    ```shell\n    ./build.sh\n    ```\n\n1.  Run migrations:\n\n    ```shell\n    ./discuit migrate run\n    ```\n\n1.  Start the server:\n\n    ```shell\n    ./discuit serve\n    ```\n\nAfter creating an account, you can run `./discuit admin make username` to make\na user an admin of the site.\n\nNote: 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.\n\n### Running with Docker\n\n1. **Build the Docker Image**\n\n   \u003e **Note**: If you need to run discuit on a different architecture, simply change the Dockerfile in the `-f` flag to the appropriate Dockerfile for your architecture, currently we support `linux/amd64` (docker/Dockerfile.amd64), and `linux/arm64` (docker/Dockerfile.arm64).\n\n   ```shell\n   docker build -t discuit -f docker/Dockerfile.amd64 .\n   ```\n\n2. **Run the Docker Container**\n\n   \u003e **Note**: The following command while having a persistent database, the included config.yaml file is not. You will need to mount the file to the container if you want to persist the configuration.\n\n   ```shell\n   docker run -d --name discuit -v discuit-db:/var/lib/mysql -v discuit-redis:/var/lib/redis -v discuit-images:/app/images -p 8080:80 discuit\n   ```\n\n3. **Accessing Discuit**: After the container starts, you can access Discuit by navigating to `http://localhost:8080` on your web browser, or to the specific port if you customized the port mapping.\n\n4. **Stopping the Container**: When you're done, you can stop the container by running:\n\n   ```shell\n   docker stop discuit\n   ```\n\n5. **Starting the Container Again**: To start the container again, use:\n\n   ```shell\n   docker start discuit\n   ```\n\n### Source code layout\n\nIn the root directory are these directories:\n\n- `cli`: Contains the command-line interface.\n- `core`: Contains all the core functionality of the backend.\n- `internal`: Contains Go packages internal to the project.\n- `migrations`: Contains the SQL migration files.\n- `server`: Contains the REST API backend.\n- `ui` - Contains the React frontend.\n\n## Roadmap\n\n- [x] Dark mode.\n- [x] User created communities.\n- UI preferences:\n  - [x] Compact mode.\n  - [x] Enable or disable infinite scroll.\n  - [x] Choose which notifications to get.\n  - [x] Change default feed sort.\n- Filtering:\n  - [x] Mute communities.\n  - [x] Mute users.\n  - [ ] Filter posts by topic.\n  - [ ] An explore page (modeled after Youtube's home page).\n  - [ ] Filter link-posts by URL or domain.\n- Moderation:\n  - [x] Pinned posts and comments.\n  - [ ] Lock individual comments (so they cannot be replied to).\n  - [ ] A single page for handling reports for users who moderate multiple communities.\n  - [ ] Temporary bans.\n- [ ] User and community mentions (@user and +community).\n- [x] Image posts.\n- [ ] Poll posts.\n- [x] Video embeds (Youtube, Vimeo, etc).\n- [x] Image galleries.\n- [ ] Server side rendering (for better SEO).\n- [ ] Direct messages.\n- [x] Saved posts and comments (modeled after Youtube playlists).\n- [ ] Multiple feeds (modeled after Twitter Lists).\n- [ ] Search.\n- [ ] Moderation log.\n- [ ] RSS feeds.\n- [ ] Wiki pages for communities.\n- [x] User profile pictures.\n- [x] User badges (displayed on profile page).\n- [ ] Post drafts.\n- [ ] History (viewed posts).\n- [ ] Something like Reddit's flairs to group posts within a community.\n\n## Contributing\n\nDiscuit is free and open-source software, and you're welcome to contribute to\nits development.\n\nIf you're thinking of working on something substantial, however, (like a major\nfeature) please create an issue, or contact [the\nmaintainer](https://discuit.org/@previnder), to discuss it before commencing\nwork.\n\nThe documentation of the API can be found at [docs.discuit.org](https://docs.discuit.org).\n\n## License\n\nCopyright (C) 2024 Previnder\n\nThis program is free software: you can redistribute it and/or modify it under\nthe terms of the GNU Affero General Public License as published by the Free\nSoftware Foundation, either version 3 of the License, or (at your option) any\nlater version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License along\nwith this program. If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscuitnet%2Fdiscuit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiscuitnet%2Fdiscuit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscuitnet%2Fdiscuit/lists"}