A social network for Android with many communities and a unique moderation system: its users can earn moderator privileges by completing achievements and gaining karma (likes). It has an extensive post editor that supports Markdown, images, GIFs, polls, etc. There are chats for each community, private chats between users (DMs) and private conferences.
- Anyone can create and curate their own community: there are wiki pages, quests, relay races and rubrics to help other communities engage with it.
- Users have full control over media: anyone can become a moderator and everyone can vote for adding a new rule or feature to any community.
- Community participation rewards: from special badges to moderation abilities depending on your level and karma. You can earn exclusive privileges by creating engaging spaces!
You can build and run the app using Android Studio. Java 17 is recommended.
-
Ensure you have the following:
- Android Studio or Java 17 with Command line tools to build the app
- Docker
- PostgreSQL database (the database should be named "postgres")
- MinIO server and client
-
Create a Firebase project:
- Open https://console.firebase.google.com
- Create a new project
- Click on
Add appand select Android - Enter package name (e.g. "sh.sit.devfire")
- Optionally enter app nickname and click on
Register app - Go back to the console
- Click on blue
Add appand select Android - Enter the same package name and type ".debug" at the end (e.g. "sh.sit.devfire.debug")
- Optionally enter app nickname and click on
Register app - You can now close the console
-
Download
google-services.json(Project settings -> General) and Admin SDK JSON (Project settings -> Service accounts -> Generate new private key) from Firebase Console -
Download and unpack this archive into another directory: https://drive.google.com/file/d/1V2cVKJ8JpRt7h_l64umXf75GxDjEkNgX
-
Open
local.properties,config.tomlandsecrets/Secrets.json:- Replace "<internal host>" with the IP address of your computer in your local network
(run
ip addrorifconfig) inlocal.propertiesandSecrets.json - Set database creds in
Secrets.json(lines 9-16) andconfig.toml(line 1) - Copy data from Admin SDK JSON to
Secrets.json(lines 45-55) andconfig.toml(lines 49-59) - Set S3 address and keys in
Secrets.json(lines 58-60) - Set the package ID you've previously entered (without ".debug") and optionally the
app's name in
local.properties(lines 7-8)
- Replace "<internal host>" with the IP address of your computer in your local network
(run
-
Clone this repo and copy
local.properties,config.tomlandsecrets/Secrets.jsonto its root -
Replace
Campfire/google-services.jsonwith yourgoogle-services.json -
Import the database dump and upload static resources to MinIO (change S3 address and keys to yours in
alias set local):On Linux:
sudo -u postgres psql \ -c "\i dump.sql" \ -c "alter database postgres set search_path = campfire_db,campfire_db_media,public" mcli alias set local http://localhost:9000 admin secretsecret mcli mb -p local/bonfire mcli anonymous set public local/bonfire ls -1 static | xargs -I {} mcli put static/{} local/bonfire/static/{}On Windows (PowerShell):
psql.exe ` -c "\i dump.sql" ` -c "alter database postgres set search_path = campfire_db,campfire_db_media,public" mc.exe alias set local http://localhost:9000 admin secretsecret mc.exe mb -p local/bonfire mc.exe anonymous set public local/bonfire gci -path static -file | foreach { mc.exe put $_.fullname local/bonfire/static/$_.name } -
Build and install the app
-
Build and run the server:
On Linux:
docker build -t bonfire . docker run --network=host -v./secrets:/app/secrets -v./config.toml:/app/config.toml bonfire:latestOn Windows:
docker.exe build -t bonfire . docker.exe run --network=host -v./secrets:/app/secrets -v./config.toml:/app/config.toml bonfire:latest
The server must not be exposed to public! If everything went smoothly, you can now open your custom Bonfire and log in as "default@user.com" with the password "00000000" (8 zeros). If you want to add another account, run this to verify it:
On Linux:
sudo -u postgres psql -c "update users set email_verified = now(), email_verification_sent = null where email_verified is null"
On Windows:
psql.exe -c "update users set email_verified = now(), email_verification_sent = null where email_verified is null"
This project contains components licensed differently. See LICENSE for full details.