Sid and I worked on a mini metaverse that functions a video calling site. This can be used as a virtual hangout and get together for distant friends and family.
View it live here.
- Used Aframe.js and Networked Aframe
- JS based
- Lightweight enough for Raspberry Pi
- Clone the project by running:
git clone https://github.com/Piflyer/Hackathon-2023.git
- Install the necessary dependencies for the backend:
cd Hackathon-2023 && npm install
- Run the backend on your local network:
npm run start &
- Configure to use your database and node server
cp conf.ex.php conf.php && nano conf.php
- Run the frontend by pointing your server of choice to the
public
directory, for example with NGINX
server {
root /directory/to/winterwonderland/public;
index index.php index.html index.htm;
server_name winterwonderland.mydomain.com;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# Make sure you use your correct PHP version
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
}
listen 80;
}
-
Create tables by running
db.sql
-
(Optional) Automatically discard older rooms by running a webcron:
curl https://interwonderland.mydomain.com/internals/purge_rooms.json.php?pass=PURGE_PASS
Name | Description |
---|---|
DATABASE_SERVER | Server of the database |
DATABASE_USER | User of the database which has write access to DATABASE_NAME |
DATABASE_PASS | Password of DATABASE_USER |
DATABASE_NAME | Name of database you have created tables for |
NODE_SERVER | Server running NPM command |
PURGE_PASS | Password used to remove older rooms |