This is a repository for a fully-fledged modern forum app, including private messaging, built with Laravel 5.3 and Vue 2.
- @mention functionality, alerting
Users by email when they are mentioned in a post. Including auto link generation, when a
Useruses the @mention functionality. I.e
@ashmenhennettwill be converted to
- Internal user messaging system, in realtime, using
- User role system, including Administrators (
admin), Moderators (
moderator) and standard Users (
- Ability for Administrators to invite new users, with a specific role, as well as the ability to modify current
- Ability for users to subscribe to
- Ability for users to 'report'
- Avatar image uploading to Amazon S3 storage.
- Markdown support for creating posts. All posts are stored in database as Markdown and are converted to HTML, when needed
Users can register and create
Users may subscribe to any
Topics and may report any
- Users can @mention other users in
- Users can send and receive messages from other users in realtime, via the internal messaging system.
- Owners of
Posts or eleveated
Users may modify or delete
moderatoraccounts may delete
- Users can manage their own profile changing to their password and avatar image.
- All subscribed
Users recieve emails, via a triggered event when a
Topicthat they are subscribed to has a
Postadded to it.
- Moderators are alerted via email when content is reported. Moderators can easily manage these reports in the Moderator Dashboard.
- Other expected events are raised, check out
App\Listenersfor further insight. See
$listenproperty for the association of
Installation & Configuration
If you would like to install this project, treat it as you would any other Laravel application:
- Clone the repo.
- Install dependencies:
npm install, if you need).
- Configure environment variables-
- Generate application key:
php artisan key:generate.
- Run Laravel migrations:
php artisan migrate.
Make sure you configure these environment variables:
APP_URL: the url of the application. This variable is used for linking to the application in emails.
APP_NAME: the human readable name of the application. This variable is used for refering to the application via emails. It is also used in the navbar as the application branding.
MAIL_FROM_NAME: the 'from' email address and name. This is used for sending out emails.
S3_IMG_BUCKET_URL: the conncetion to Amazon S3 variables. These values are used for the avatar uploading facility built in to the application.
PUSHER_SECRET: the connection configuration for the
- Set the
QUEUE_DRIVERenvironment variable to
- Set the
BROADCAST_DRIVERenvironment variable to the broadcast driver to be used. Set this to
pusherif you wish to use the pusher API with
- Set the
APP_ENVenvironment variable to
productionwhen the app is on a live sever, to force HTTPS connections on all routes.
- Configure your Amazon S3 bucket with a policy that will allow the application to upload avatars to it.
- Configure the
Laravel Echoinstance in
resources/assets/js/bootstrap.js, starting line 41.
php artisan queue:workto allow jobs, queued mail and event broadcasting to function.
There are a couple of commands for use with this application:
- When the 'to-be' Administrator registers for an account, it is necessary to execute the
alter:rolecommand via command line, after they have registered, passing in the id of the
Userand the role (i.e.
php artisan alter:role 1 admin. This is currently the only logical way of elevating a specific user, when no other
- The local storage of avatars will have to be cleaned every now and then. To do so, execute the following command
php artisan clear:avatars. They exist in the application storage, as they are uploaded to the applications storage, before being uploaded to Amazon's S3. They are currently not being automatically deleted from local storage after uploading to S3.
Creating a Topic
User profile view
Editing a profile
Thanks to Pretty Routes