Hacker News clone featuring all you would expect: Accounts, posts, likes, profiles with avatar, bio, post history & statistics. Built in Laravel with blade for most of the site with the exception of Vue for live comment functionality on the posts.
README.md is a WIP... good thing Fake News is live at least..
If you find any errors/suggestions, please do open an issue!
New to Laravel? Here is a good starting point
Prerequisites
- PHP 8
- Composer
- npm
Setting up project
git clone https://github.com/felixgren/hacker-news.git
cd hacker-news
composer install
npm install
cp .env.example .env
php artisan key:generate
php artisan serve
Setting up avatars
The avatars are currently only stored in the S3 cloud, to use this feature you will have to create a bucket and add the keys to your .env file. You can then run `php artisan queue:work` to process and upload the images, any error message can be located in your database. Send me a message and I'll generate some keys for you to use.Installing PHP, Composer, npm
PHP
Windows (WSL)
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt-get install --yes php8.0 php-sqlite3 php-mysql php-xml php-cli php-mbstring curl git unzip
macOS
brew install php
Composer
Windows (WSL)
sudo apt install php-cli unzip
curl -sS https://getcomposer.org/installer -o composer-setup.php
HASH=`curl -sS https://composer.github.io/installer.sig`
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
macOS
brew install composer
Node.js and npm
Windows (WSL)
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
sudo apt-get install -y nodejs
macOS
brew install node