- Go 97.8%
- CSS 2.2%
| activitypub | switch to .env | |
| cmd | close session | |
| config | add enable flag | |
| database | img pagination | |
| examples | cleanup | |
| helpers | add refederation flag | |
| logger | add refederation logic for single note | |
| routes | Update routes/handlers.go | |
| services | cleanup | |
| static | add: favicon handler | |
| views | Update views/templates/home.tmpl | |
| .gitignore | add err handling | |
| go.mod | close session | |
| go.sum | close session | |
| LICENSE | move picverse | |
| pod.json | add not found case | |
| README.md | cleanup | |
picverse
Table of Contents
About The Project
ActivityPub based blogengine
Getting Started
Installation
- if you want
useradd -m picverse passwd picverse - install go, nginx, certbot, postgres
- git clone [project_link]
cp -r ../examples/config.json.example config/config.jsonthen change dsn and hostmkdir /etc/nginx/sites-available&mkdir /etc/nginx/sites-enabledsudo ufw allow 'Nginx HTTP- create database and user in postgres
go build picverse/cmd/main.go./main picverse tablegit clone https://gitlab.com/kamee/picverse_template staticmkdir keysopenssl genrsa -out private.pem 2048openssl rsa -in private.pem -outform PEM -pubout -out public.pemvim /etc/nginx/sites-available/picverse.confexample:
upstream phoenix {
server 127.0.0.1:8080 max_fails=5 fail_timeout=60s;
}
server {
server_name example.rip www.example.rip;
listen 80;
listen [::]:80;
location / {
return 301 https://$server_name$request_uri;
}
}
server {
server_name example.rip www.example.rip;
# [...certificate configs...]
# the nginx default is 1m, not enough for large media uploads
client_max_body_size 1m;
ignore_invalid_headers off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location / {
proxy_pass http://phoenix;
}
location ~ ^/(media|proxy) {
slice 1m;
proxy_cache_key $host$uri$is_args$args$slice_range;
proxy_set_header Range $slice_range;
proxy_cache_valid 200 206 301 304 1h;
proxy_cache_lock on;
proxy_ignore_client_abort on;
proxy_buffering on;
chunked_transfer_encoding on;
proxy_pass http://phoenix;
}
}
./main -hto see available command to create new actor, new post, etc.
Usage
create a new actor:
./main -actor create
create a new post:
touch first_post.md
./main -note create
create a post from images directory
images in directory images/[some_dir/example.png
./main -note img
./main -note create
to see existing notes
./main -note load
TODO
Roadmap
TODO
- Docs
- Spam handling
- Testing/Benchmarks
- Multi-language Support
- Create a logo
- Improve perfomance of image loading
- C2S
- add .env - read db config from there
features
- Atom
- Sync with PubSub
- Sync with gemini capsule
- Convert posts to Gemini format
- Gallery mode
bugs
- fetching issues for unicode paths
- some follow requests were not added to db
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the GNU License. See LICENSE.txt for more information.
Contact
fedi - @kamee@vostain.net mail - nokamee@protonmail.com
Project Links: codeberg