2025-01-07 21:19:38 -05:00
2025-01-07 21:19:38 -05:00
2025-01-05 18:35:37 -05:00
2024-12-25 17:52:13 -05:00
2025-01-07 21:19:38 -05:00
2024-12-26 21:21:25 -05:00
2024-12-26 21:21:25 -05:00
2025-01-07 21:19:38 -05:00
2025-01-07 21:19:38 -05:00
2024-12-25 17:52:13 -05:00
2024-12-25 17:52:13 -05:00
2024-12-25 17:52:13 -05:00
2025-01-06 21:57:48 -05:00
2024-12-25 17:52:13 -05:00
2024-12-25 17:52:13 -05:00
2024-12-25 17:52:13 -05:00
2025-01-07 19:18:00 -05:00
2025-01-05 22:38:35 -05:00
2024-12-25 17:52:13 -05:00
2024-12-25 17:52:13 -05:00
2024-12-25 17:52:13 -05:00
2025-01-06 19:59:20 -05:00
2025-01-07 19:18:00 -05:00
2024-12-25 17:52:13 -05:00

Version Status License ActivityPub Contributors Forks Stargazers Issues


OurSpace

A decentralised clone of MySpace based in the ActivityPub protocol.

Table of Contents
  1. About The Project
  2. Getting Started
  3. TODO

About The Project

OurSpace is a decentralised social networking platform inspired by the early concepts of MySpace but built using the ActivityPub protocol for enhanced privacy and interoperability. The goal of OurSpace is to provide users with a space to express themselves, share content, and connect with others in a federated environment that prioritises user privacy and data ownership.

Built With

  • Laravel
  • PHP
  • Redis

Getting Started

OurSpace is meant to be easy to set up and run on your own server. Below are the steps to get started with OurSpace.

Prerequisites

To use OurSpace we need to have installed PHP 8.2 or later and Redis. We can install them in a Debian-based system with the following commands:

sudo apt update
sudo apt install nginx mysql-server php php-fpm php-mbstring php-xml php-bcmath php-curl php-redis redis nginx zip unzip composer nodejs npm

Now, enable nginx, mysql and php-fom services:

sudo systemctl enable --now nginx mysql php-fpm redis-server

Create a database for OurSpace:

mysql
CREATE DATABASE ourspace;
CREATE USER 'ourspace_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON ourspace.* TO 'ourspace_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Installation

Once you have all the required software installed and the database created, you can proceed to install OurSpace. First, clone the repository:

cd /var/www/html
git clone https://github.com/0xd011f4ce/OurSpace

Now, edit the .env file with your database, redis, and mail credentials. You can copy the .env.example file to .env and edit it with your favourite text editor.

Install all the dependencies:

composer install
npm install

Now, create the key and run the migrations:

php artisan key:generate
php artisan migrate

Build the styles:

npm run build

Give the proper permissions:

chown -R www-data:www-data /var/www/html/OurSpace
chmod -R 755 /var/www/html/OurSpace

Finally, create a virtual host for OurSpace. You can create a file in /etc/nginx/sites-available/ourspace with the following content:

server {
    listen 80;
    server_name ourspace.lat;
    root /var/www/html/OurSpace/public;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    index index.html index.htm index.php;

    charset utf-8;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    error_page 404 /index.php;

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.(?!well-known).* {
        deny all;
    }
}

Enable the config:

sudo ln -s /etc/nginx/sites-available/ourspace.conf /etc/nginx/sites-enabled/

Restart nginx:

sudo systemctl restart nginx

Now link the storage to the public folder:

php artisan storage:link

And finally, we need to create a service to handle the jobs that OurSpace needs to run. So run something emacs /lib/systemd/system/ourspace-queue.service and add the following content:

[Unit]
Description=OurSpace queue worker

[Service]
User=www-data
Group=www-data
Restart=on-failure
ExecStart=/usr/bin/php /var/www/html/ourspace/artisan queue:work --daemon --env=production

[Install]
WantedBy=multi-user.target

TODO:

For a list of planned features and improvements, please refer to the TODO file.

Description
A decentralized MySpace clone made in Laravel with ActivityPub support
Readme GPL-3.0 885 KiB
Languages
PHP 58.8%
Blade 21.2%
CSS 19.6%
JavaScript 0.4%