Coder Social home page Coder Social logo

council's Introduction

Council Build Status

This is an open source forum that was built and maintained at Laracasts.com.

Installation

Prerequisites

  • To run this project, you must have PHP 7 installed.
  • You should setup a host on your web server for your local domain. For this you could also configure Laravel Homestead or Valet.
  • If you want use Redis as your cache driver you need to install the Redis Server. You can either use homebrew on a Mac or compile from source (https://redis.io/topics/quickstart).

Step 1

Begin by cloning this repository to your machine, and installing all Composer & NPM dependencies.

git clone [email protected]:JeffreyWay/council.git
cd council && composer install && npm install
php artisan council:install
npm run dev

Step 2

Next, boot up a server and visit your forum. If using a tool like Laravel Valet, of course the URL will default to http://council.test.

  1. Visit: http://council.test/register to register a new forum account.
  2. Edit config/council.php, and add any email address that should be marked as an administrator.
  3. Visit: http://council.test/admin/channels to seed your forum with one or more channels.

council's People

Contributors

adammatysiak avatar arifkhn46 avatar bambamboole avatar bsn4 avatar danktuary avatar darkaonline avatar douglasdc3 avatar exorus avatar ghimax avatar indemnity83 avatar jamesfreeman avatar jeffreyway avatar jonsugar avatar kbirmhrjn avatar laravel-shift avatar lassehaslev avatar m-hoogie avatar m1guelpf avatar mattmangoni avatar nathanw avatar nikolaynizruhin avatar peterlupu avatar phattarachai avatar phppirate avatar roberthamel avatar robrogers3 avatar rumansaleem avatar srmklive avatar toniperic avatar wilburpowery avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

council's Issues

Add a license.md file

Its good practice to add LICENSE.md file to the project.

Click the new file button in the repository and name the file LICENSE.md click the choice a license from template button. Choose a license guide

Theme Proposal

It would be good if entire authentication system scaffolding was via AJAX like Laracasts

composer.lock is out of date

composer.lock is not up to date and doesn't contain stevebauman/purify package, so you need to execute composer update instead just of composer install

Feature: add "reputation" support.

It would be nice if users accrue "reputation" points as they participate in the forum.

  1. Create a thread: 10 points
  2. Leave a reply: 2 points
  3. Reply is marked as "best reply" - 50 points
  4. Reply was liked: 4 points

Fix small type error in DatabaseSeeder class

After installing the project, when trying to seed the database I notice a small type error.

In DatabaseSeeder.php line 16:

Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR)

disableExceptionHandling change.

on TestCase disableExceptionHandling can be replace

// Hat tip, @adamwathan.
protected function disableExceptionHandling()
{
        $this->oldExceptionHandler = $this->app->make(ExceptionHandler::class);
        $this->app->instance(ExceptionHandler::class, new class extends Handler {
            public function __construct() {}
            public function report(\Exception $e) {}
            public function render($request, \Exception $e) {
                throw $e;
            }
       });
}

to

// Hat tip, @adamwathan.
protected function disableExceptionHandling()
{
        $this->oldExceptionHandler = $this->app->make(ExceptionHandler::class);
        $this->app->instance(ExceptionHandler::class, new \App\Exceptions\Handler($this->app));
}

for me it worked normally. please test, comments what you guys think?

New series?

I got my eye on you, @JeffreyWay haha

Thanks for all the great content you work on. I smell a new series coming up.

Add cache:clear to the install command

Sometimes when you install the forum you end up with some dirt on cache.
I think it will be cool if the command council:install clear the cache just to make sure everything is reseted.

Failing test (Tests\Console\InstallCommandTest::it_optionally_migrates_the_database)

Not quite sure what's going on here..

➜  council git:(master) phpunit
PHPUnit 6.5.5 by Sebastian Bergmann and contributors.

..E...................S........................................  63 / 103 ( 61%)
........S...............................                        103 / 103 (100%)

Time: 10.39 seconds, Memory: 34.00MB

There was 1 error:

1) Tests\Console\InstallCommandTest::it_optionally_migrates_the_database
Mockery\Exception\NoMatchingExpectationException: No matching handler found for Mockery_0_App_Console_Commands_InstallCommand::call("cache:clear"). Either the method was unexpected or its arguments matched no expected argument list for this method



/Users/dframe/Projects/Deframe/council/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php:93
/Users/dframe/Projects/Deframe/council/app/Console/Commands/InstallCommand.php:48
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Container/Container.php:549
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Console/Command.php:183
/Users/dframe/Projects/Deframe/council/vendor/symfony/console/Command/Command.php:252
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Console/Command.php:170
/Users/dframe/Projects/Deframe/council/vendor/symfony/console/Application.php:936
/Users/dframe/Projects/Deframe/council/vendor/symfony/console/Application.php:240
/Users/dframe/Projects/Deframe/council/vendor/symfony/console/Application.php:148
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Console/Application.php:88
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Console/Application.php:177
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:249
/Users/dframe/Projects/Deframe/council/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:18
/Users/dframe/Projects/Deframe/council/tests/Console/InstallCommandTest.php:56
/Users/dframe/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:195
/Users/dframe/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:148

ERRORS!
Tests: 103, Assertions: 187, Errors: 1, Skipped: 2.

.dev domain issue in chrome

Hi,
I know you usually use foo.dev for a local development project
Unfortunately chrome forces all .dev to redirect to https, As I understand the gTLD .dev is registered by google and for some reason they have codded this into chrome.
If you don't have https setup for your local development, you cannot use .dev

Install command not working as intended

There seems to be an issue with running migrations when prompted by the install command. This is the error I get when trying to do a fresh install:

SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'forge' (SQL: select * from information_schema.tables where table_schema = forge and table_name = mi
grations)

Steps to reproduce
Clone the repo and follow installation instructions from README.
When prompted with the question whether you want to migrate the database, enter yes.

Summary

  1. In the fresh installation process you get to run php artisan council:install.
  2. At that point there's no .env file.
  3. As the install command gets triggered, you get prompted for database credentials.
    Regardless of what you type in, at that point the application was already bootstrapped, so the database credentials got stored to .env file but never picked up by the application instance.

If you re-run install command after seeing that error (and even provide invalid data this time), the migrations will work because .env file exists at the boot time.
That means the application instance will load up with correct environment variables, the migrations will be ran successfully, and the .env file will get populated with invalid data.

Error while subscribing to thread.

When i subscribe to thread, it gives me console error.

Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "active"

Maybe we should think of a better way to handle administrators

Having their emails listed in a config file is ok to bootstrap things, but not good enough to stay there much longer :)

Tbh, I think a forum will need - at some point - a real roles system, but at first maybe we could add the isAdmin column directly to the users and make the user create him during the installation process.

Recaptcha Test Keys causes failing test

The a_thread_requires_recaptcha_verification test is failing since the reCaptcha test keys have been used - they always return a positive response:

With the following test keys, you will always get No CAPTCHA and all verification requests will pass.

Our tests expect verification to fail.

We could happy path the test, and assert that the thread was created?

Default seeders instead of tinkering

We think that much easier is just execute php artisan db:seed instead of tinkering and generating fake channels and threads every time we need clean slate.

Spam detected for code

When creating a new thread spam detection is triggered when posting code

Example code that triggers spam

public function index() { return view('home'); }

Posting this code when editing a thread does not trigger spam detection

Theme Proposal

I've done a few projects recently and utilized Vuetify. It's quite flexible and looks nice too. I would like to open a pull request to begin incorporating that theme into this project if others also agree this would be a good approach to take.

Reverse instead of Reduce

In Lesson 8 Jeffrey uses the term reduce a user deletes a thread or a reply to lower the users reputation.

I would refer to these as transactions. Thus when a user deleted a thread or reply we should 'reverse' the reputation transaction related to the thread or reply

Adding some issue/PR templates

GitHub supports adding issue and/or PR templates to pre-populate some things. This can ve very useful when you want to get extra info in issues, or ensure PRs have the quality the project has, or add tests, etc. As an example of an open-source project, we should add this templates.

Roadmap (Suggestion)

Since this is both open source project and video series on Laracast it could be opportune to include a roadmap either in the readme or in a new file.

This roadmap could include ideas you have or things you like to work on down the road and also mentioned if you want to do them yourself as a video on Laracast or have the community involved. This would also focus feature request PR's towards what you have in mind as the progression of Council.

If you prefer to use github issues maybe label issues with milestones and assign features you want to include as part of a video to yourself. While features you want the community to make, can be labeled with Help wanted.

Use `squash` merge instead of normal merge

When you are merging PR and have more than one commit (merge commit is also a separated commit), then history of repo will be a lot more cleaner than now, when every PR is duplicated in Git's history.

Error "key was too long" while migrating

On MySQL database server older than 5.7.7 php artisan migrate generates error "key was too long".

To solve this you need to add line: \Schema::defaultStringLength(191); to AppServiceProvider@boot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.