A fully-fledged modern forum app, including @mention and private messaging, built with Laravel 5.3 and Vue 2.
PHP HTML Vue Other
Switch branches/tags
Nothing to show
Clone or download
Latest commit abdc84e Mar 20, 2017

readme.md

Elite Forum

This is a repository for a fully-fledged modern forum app, including private messaging, built with Laravel 5.3 and Vue 2.

Highlights

  • @mention functionality, alerting Users by email when they are mentioned in a post. Including auto link generation, when a User uses the @mention functionality. I.e @ashmenhennett will be converted to [@ashmenhennett](http://example.com/user/profile/@ashmenhennett).
  • Internal user messaging system, in realtime, using pusher-js and Laravl-Echo.
  • User role system, including Administrators (admin), Moderators (moderator) and standard Users (user).
  • Ability for Administrators to invite new users, with a specific role, as well as the ability to modify current User's roles.
  • Ability for users to subscribe to Topics.
  • Ability for users to 'report' Posts and Topics.
  • 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

Functionality

  • Users can register and create Topics and Posts.
  • Users may subscribe to any Topics and may report any Topic or Post for moderation.
  • Users can @mention other users in Posts.
  • 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 Posts.
  • Only admin and moderator accounts may delete Topics.
  • Users can manage their own profile changing to their password and avatar image.
  • All subscribed Users recieve emails, via a triggered event when a Topic that they are subscribed to has a Post added 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\Events and App\Listeners for further insight. See App\Providers\EventServiceProvider's $listen property for the association of Events and Listeners.

Installation & Configuration

If you would like to install this project, treat it as you would any other Laravel application:

  • Clone the repo.
  • Install dependencies: composer install (also, npm install, if you need).
  • Configure environment variables- .env (see below).
  • 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_EMAIL and MAIL_FROM_NAME: the 'from' email address and name. This is used for sending out emails.
  • S3_KEY, S3_SECRET, S3_REGION, S3_BUCKET_NAME and 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_APP_ID, PUSHER_KEY and PUSHER_SECRET: the connection configuration for the pusher broadcast driver.

Further steps:

  • Set the QUEUE_DRIVER environment variable to database.
  • Set the BROADCAST_DRIVER environment variable to the broadcast driver to be used. Set this to pusher if you wish to use the pusher API with Laravel Echo.
  • Set the APP_ENV environment variable to production when 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 Echo instance in resources/assets/js/bootstrap.js, starting line 41.
  • Run php artisan queue:work to allow jobs, queued mail and event broadcasting to function.

Commands

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:role command via command line, after they have registered, passing in the id of the User and the role (i.e. admin). Eg. php artisan alter:role 1 admin. This is currently the only logical way of elevating a specific user, when no other admins exist.
  • 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.

Screenshots

Admin Dashboard

Administrator dashboard- top Administrator dashboard- bottom

Topics

Creating a Topic Creating a Topic

My Topics My Topics

All Topics All Topics

Single Topic Topic- top Topic- bottom

Moderator Dashboard

Moderator Dashboard

User Profile

User profile view User Profile

Editing a profile Edit Profile

User Messaging

Threads Conversations or Threads

Messaging Messaging System

Routes

Routes Thanks to Pretty Routes

Additional Packages

Additional Modules

License

MIT