Fork 0
MyShed is a social networking site.
Go to file
Toaster 3106eda024 I AM STUPID 2023-03-07 22:07:19 +01:00
avatars Add 'avatars/.placeholder' 2023-03-06 14:29:07 +01:00
static add friends list and themes 2023-03-07 19:05:48 +00:00
templates add friends list and themes 2023-03-07 19:05:48 +00:00
LICENSE Initial commit 2023-03-06 14:26:30 +01:00
README.md I AM STUPID 2023-03-07 22:07:19 +01:00
myshed.py add friends list and themes 2023-03-07 19:05:48 +00:00
salt.py add source 2023-03-06 14:27:26 +01:00
toolshed.py add friends list and themes 2023-03-07 19:05:48 +00:00



MyShed is a marriage of YCombinator's HackerNews site and Facebook written in Python.


Download the source code:

$ git clone https://git.catvibers.me/videotoaster/myshed.git
$ cd myshed

Create the SQLite3 database:

$ sqlite3 MyShed.db
sqlite> CREATE TABLE users(name, password, bio, credate, friends, avatar, ismod)
sqlite> CREATE TABLE friendships(friend1, friend2, accepted)
sqlite> CREATE TABLE posts(poster, date, replyto, subject, content, id)
sqlite> .quit

Create user accounts for you and your friends:

$ python3
>>> import toolshed
>>> toolshed.createuser("Username", "Password", True) # True if mod, False if not
>>> exit()

Now you can start MyShed like this:

$ python3 myshed.py

The only problem is that it strictly runs on, port 1090. You will need to set up Apache 2 to reverse proxy it to the internet. Of course, you can use Nginx for this too, if you know what you're doing, but this is how I did it on Debian.

$ sudo apt install apache2
$ sudo a2enmod proxy
$ sudo (editor) /etc/apache2/sites-enabled/000-default.conf

You should make the file look like this:

<VirtualHost *:80>
        ServerName [domain name you want myshed to run on]

        ServerAdmin webmaster@localhost

        ProxyPass /
        ProxyPassReverse /
        ErrorDocument 503 "<pre>MyShed is unavailable at this time.</pre>"

        ErrorLog ${APACHE_LOG_DIR}/shed-error.log
        CustomLog ${APACHE_LOG_DIR}/shed-access.log combined

After this, restart Apache 2:

$ sudo systemctl restart apache2

and you should be able to log into your MyShed account on the domain you specified in your Apache 2 configuration file.