Skip to content

Commit

Permalink
Start
Browse files Browse the repository at this point in the history
  • Loading branch information
freescout-help-desk committed Jul 23, 2018
0 parents commit 528acae
Show file tree
Hide file tree
Showing 121 changed files with 20,527 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/node_modules
/public/hot
/public/storage
/storage/*.key
# Althoug committing vendor directory would make installation process much easier
# we still need to ignore /vandor as there are require-dev dependencies
# https://www.codeenigma.com/build/blog/do-you-really-need-composer-production
# https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md
/vendor
/.idea
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env

/bootstrap/compiled.php
composer.phar
composer.lock
.DS_Store
Thumbs.db
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# FreeScout — Free Self-Hosted HelpScout Alternative

![FreeScout](https://raw.githubusercontent.com/freescout-helpdesk/freescout/master/public/img/banner.png)

**FreeScout** is a free open source help desk and shared inbox written in PHP (Laravel 5.5 framework), full analog of HelpScout. FreeScout is currently under active development. As you may know Help Scout on November 29, 2018 will force all free accounts to upgrade to the paid plan, so developing a free open source alternative is kind of urgent. If you would like to join efforts, just fork this repo and we will contact you.

[![HitCount](http://hits.dwyl.io/freescout-helpdesk/freescout.svg)](http://hits.dwyl.io/freescout-helpdesk/freescout)

## Features

**FreeScout** will provide the same set of features as a HelpScout: help desk tools, email management and analytics. Also **FreeScout** will provide several extra features in addition to the standard HelpScout features:

* Sending message to multiple customers at once.
* Starred conversations.
* Trash section.
* Quick changing of customer.
* Option allowing to decide what to do after sending a reply: open next conversation or stay in the current.

You can suggest features or vote for features [here](https://feedback.userreport.com/de1fc910-a7f3-41b1-ada5-466ac6316fe2/)

## Project Homepage

[https://freescout.net](https://freescout.net)

## Requirements

* PHP >= 7.0.0
* MySQL/MariaDB >= 5.0

## Installation Guide

Coming as soon as the first stable version will be released.

## Plugins

List of available FreeScout plugins: https://packalyst.com/s/freescout

## Development Guide

FreeScout development rules and guidelines:

* Feel free to impelement and push any HelpScout functionality which is not implemented yet.
* Please stick to the HelpScout design and functionality, no need to reinvent the wheel. FreeScout provides all the HelpScout features out of the box plus several [most needed extra features](https://feedback.userreport.com/de1fc910-a7f3-41b1-ada5-466ac6316fe2/). Additional features are added by developing plugins for FreeScout as standard Laravel packages.
* FreeScout API must be completely equal to [HelpScout's API](https://developer.helpscout.com/help-desk-api/)
* All strings must be translatable.
* Design must be mobile friendly.
* In copmoser.json make sure to specify only exact versions of packages (Example: 1.0.2)

## Plugins Development

1. Develop your plugin as standard Laravel package: [Laravel package development guide](https://laravel.com/docs/5.5/packages). Make sure to give your plugin name starting with **"freescout-"**.
2. Add your plugin to the [Laravel packages repository](https://packalyst.com/).

## Screenshots

Coming soon
79 changes: 79 additions & 0 deletions app/Console/Commands/CreateUser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\User;

class CreateUser extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'freescout:create-user';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Creates a new user';

/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}

/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$class = config(
'auth.providers.' . config(
'auth.guards.' . config(
'auth.defaults.guard'
) . '.provider'
) . '.model'
);
$user = new $class;
$fillables = $user->getFillable();
foreach($fillables as $key => $fillable) {
if ($fillable == 'password') {
$user->password = \Hash::make($this->secret(($key+1) . "/" . count($fillables) . " User $fillable"));
} elseif ($fillable == 'role') {
$user->$fillable = $this->ask(($key+1) . "/" . count($fillables) . " User $fillable (admin/user)", 'admin');
while (!in_array($user->$fillable, User::$roles)) {
$this->error("Incorrect role");
$user->$fillable = $this->ask("Please enter valid role");
}
} else {
$user->$fillable = $this->ask(($key+1) . "/" . count($fillables) . " User $fillable");

if ($fillable == 'email') {
while (!filter_var($user->$fillable, FILTER_VALIDATE_EMAIL)) {
$this->error("Incorrect email address");
$user->$fillable = $this->ask("Please enter valid email address");
}
}
}
}
if ($this->confirm("Do you want to create the user?", true)) {
if ($user->isAdmin()) {
$user->invite_state = User::INVITE_STATE_ACTIVATED;
}
$user->save();
$this->info("User created (id: {$user->id})");
}
return true;
}
}
42 changes: 42 additions & 0 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
\App\Console\Commands\CreateUser::class,
];

/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
}

/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');

require base_path('routes/console.php');
}
}
53 changes: 53 additions & 0 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php

namespace App\Exceptions;

use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;

class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];

/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected $dontFlash = [
'password',
'password_confirmation',
];

/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
{
parent::report($exception);
}

/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
return parent::render($request, $exception);
}
}
32 changes: 32 additions & 0 deletions app/Http/Controllers/Auth/ForgotPasswordController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;

class ForgotPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset emails and
| includes a trait which assists in sending these notifications from
| your application to your users. Feel free to explore this trait.
|
*/

use SendsPasswordResetEmails;

/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
39 changes: 39 additions & 0 deletions app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;

class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/

use AuthenticatesUsers;

/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/';

/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest')->except('logout');
}
}
Loading

0 comments on commit 528acae

Please sign in to comment.