-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 782ad76
Showing
135 changed files
with
562,869 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://github.com/heroku/heroku-buildpack-php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
APP_NAME=360Dashboard | ||
APP_ENV=local | ||
APP_KEY= | ||
APP_DEBUG=true | ||
APP_URL=http://localhost:8000 | ||
|
||
LOG_CHANNEL=stack | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=FILL_THIS | ||
DB_PORT=FILL_THIS | ||
DB_DATABASE=FILL_THIS | ||
DB_USERNAME=FILL_THIS | ||
DB_PASSWORD=FILL_THIS | ||
|
||
JASMIN_APPLICATION_ID=FILL_THIS | ||
JASMIN_APPLICATION_SECRET=FILL_THIS | ||
|
||
BROADCAST_DRIVER=log | ||
CACHE_DRIVER=file | ||
QUEUE_CONNECTION=sync | ||
SESSION_DRIVER=file | ||
SESSION_LIFETIME=120 | ||
|
||
REDIS_HOST=127.0.0.1 | ||
REDIS_PASSWORD=null | ||
REDIS_PORT=6379 | ||
|
||
MAIL_DRIVER=smtp | ||
MAIL_HOST=smtp.mailtrap.io | ||
MAIL_PORT=2525 | ||
MAIL_USERNAME=null | ||
MAIL_PASSWORD=null | ||
MAIL_ENCRYPTION=null | ||
|
||
AWS_ACCESS_KEY_ID= | ||
AWS_SECRET_ACCESS_KEY= | ||
AWS_DEFAULT_REGION=us-east-1 | ||
AWS_BUCKET= | ||
|
||
PUSHER_APP_ID= | ||
PUSHER_APP_KEY= | ||
PUSHER_APP_SECRET= | ||
PUSHER_APP_CLUSTER=mt1 | ||
|
||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" | ||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/node_modules | ||
/public/hot | ||
/public/storage | ||
/public/images | ||
/storage/*.key | ||
/vendor | ||
#.env Wowowowowow this ain't good practice so keep this to yourself and don't tell anyone. | ||
.env.backup | ||
.phpunit.result.cache | ||
Homestead.json | ||
Homestead.yaml | ||
npm-debug.log | ||
yarn-error.log | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
php: | ||
preset: laravel | ||
enabled: | ||
- alpha_ordered_imports | ||
disabled: | ||
- length_ordered_imports | ||
- unused_use | ||
finder: | ||
not-name: | ||
- index.php | ||
- server.php | ||
js: | ||
finder: | ||
not-name: | ||
- webpack.mix.js | ||
css: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
web: vendor/bin/heroku-php-apache2 public/ | ||
release: php artisan migrate:refresh --seed --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
![logo](https://i.imgur.com/SUGbX1s.png) | ||
|
||
> **This is a web app aimed to provide a complete overview of the company status**, regarding the information that is contained on the [SAF-T](https://en.wikipedia.org/wiki/SAF-T) file (standard audit file for tax purposes) and information regarding sales orders, purchases, inventory, and accounts payable, using a dashboard to provide high level/graphical information with drill down functionalities to products/ supplier/ purchases. | ||
> | ||
> Integrates with the [Jasmin accounting software](https://www.jasminsoftware.pt/). | ||
> | ||
> This project was developed as a course assignment of the [Information Systems subject](https://sigarra.up.pt/feup/en/UCURR_GERAL.FICHA_UC_VIEW?pv_ocorrencia_id=436456) at [Faculdade de Engenharia da Universidade do Porto](https://sigarra.up.pt/feup/en). | ||
> | ||
> For a complete list of features see the [project report](). | ||
## Screenshots | ||
|
||
* [Login page](https://i.imgur.com/YJ2lQs1.png) | ||
* [Overview](https://i.imgur.com/GCp1mol.png) | ||
* [Finances](https://i.imgur.com/UrxGsjz.png) | ||
* [Sales](https://i.imgur.com/qxOJEBK.png) | ||
* [Purchases](https://i.imgur.com/xNjN02s.png) | ||
* [Inventory](https://i.imgur.com/kCO1Ymx.png) | ||
* [View Consumer](https://i.imgur.com/893W2Pp.png) | ||
* [View Supplier](https://i.imgur.com/wTtSVt2.png) | ||
* [View Product](https://i.imgur.com/C2vDb4z.jpg) | ||
* [Inventory Search](https://i.imgur.com/Cc3sFz7.png) | ||
* [Orders Search](https://i.imgur.com/Fx1Z8E5.png) | ||
* [Purchases Search](https://i.imgur.com/UM1tggv.png) | ||
* [About the Company](https://i.imgur.com/0zZFfPZ.png) | ||
* [Profit and Loss Statement](https://i.imgur.com/9whaI8t.png) | ||
* [Trial Balance Sheet](https://i.imgur.com/hHopJjY.png) | ||
* [Balance Sheet](https://i.imgur.com/WdjNgVY.png) | ||
|
||
## Setup | ||
|
||
Requirements | ||
> * PHP 7.1+ | ||
> * Composer | ||
> ### 1. Install dependencies. | ||
> ``` | ||
> composer install | ||
> ``` | ||
> | ||
> ### 2. Rename .env.example to .env and fill the following fields: | ||
> ``` | ||
> # Database related | ||
> DB_CONNECTION= | ||
> DB_DATABASE=FILL_THIS | ||
> DB_USERNAME=FILL_THIS | ||
> DB_PASSWORD=FILL_THIS | ||
> | ||
> # Jasmin software API user | ||
> JASMIN_APPLICATION_ID= | ||
> JASMIN_APPLICATION_SECRET= | ||
> ``` | ||
> | ||
> ### 3. Generate a new Laravel app key. | ||
> ``` | ||
> php artisan key:generate | ||
> ``` | ||
> | ||
> ### 4. Run database migrations and seed tables. | ||
> ``` | ||
> php artisan migrate:refresh --seed | ||
> ``` | ||
> | ||
> ### 4. Start development server. | ||
> ``` | ||
> php artisan serve | ||
> ``` | ||
> ### 5. Access project at localhost:8000 | ||
> ### 6. Login with the following credentials: | ||
> ``` | ||
> User: [email protected] | ||
> Password: admin | ||
> ``` | ||
### Libraries/Frameworks used | ||
* [Laravel](https://laravel.com/) | ||
* [Tabler](https://tabler.io/) | ||
* [Chart.js](https://www.chartjs.org/) | ||
* [Datatables](https://datatables.net/) | ||
### Developed by | ||
* Ana Sá Silva ([email protected]) | ||
* Fábio Oliveira ([email protected]) | ||
* Hugo Fernandes ([email protected]) | ||
* Pedro Pinho ([email protected]) | ||
* Ricardo Moura ([email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = [ | ||
// | ||
]; | ||
|
||
/** | ||
* 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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?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. | ||
* | ||
* @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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use App\Http\Controllers\Controller; | ||
use App\Services\SaftService; | ||
|
||
class AboutController extends Controller | ||
{ | ||
// Serves the About page. | ||
public function index(SaftService $service) | ||
{ | ||
$about = $service->get('company_information'); | ||
return view('pages.about', compact('about')); | ||
} | ||
|
||
// Serves the View Trial Balance Sheet page. | ||
public function trialBalanceSheet(SaftService $service) | ||
{ | ||
$trial_balance_sheet = $service->get('trial_balance_sheet')['all_year']; | ||
|
||
return view('pages.trial_balance_sheet', compact('trial_balance_sheet')); | ||
} | ||
|
||
// Serves the View Profit&Loss Statement page. | ||
public function profitLossStatement(SaftService $service) | ||
{ | ||
$profit_loss_statement = $service->get('profit_loss_statement')['all_year']; | ||
|
||
return view('pages.profit_loss_statement', compact('profit_loss_statement')); | ||
} | ||
|
||
// Serves the View Balance Sheet page. | ||
public function balanceSheet(SaftService $service) | ||
{ | ||
$balance_sheet = $service->get('balance_sheet')['all_year']; | ||
|
||
return view('pages.balance_sheet', compact('balance_sheet')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use Illuminate\Http\Request; | ||
|
||
class AuthController extends Controller | ||
{ | ||
/** | ||
* Serves the login page. | ||
*/ | ||
public function login() | ||
{ | ||
return view('pages.login'); | ||
} | ||
|
||
/** | ||
* Handles authentication attempts. | ||
*/ | ||
public function authenticate(Request $request) | ||
{ | ||
$credentials = $request->validate([ | ||
'email' => 'required|email', | ||
'password' => 'required', | ||
'remember_me' => 'sometimes|accepted' | ||
]); | ||
|
||
if (\Auth::attempt($request->only('email', 'password'), array_key_exists('remember_me', $credentials))) { | ||
return redirect()->intended(route('overview')); | ||
} else { | ||
return redirect()->back()->withErrors(['auth' => 'Wrong credentials.']); | ||
} | ||
} | ||
|
||
/** | ||
* Terminates the auth session for the user. | ||
*/ | ||
public function logout() | ||
{ | ||
\Auth::logout(); | ||
return redirect()->route('login'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; | ||
use Illuminate\Foundation\Bus\DispatchesJobs; | ||
use Illuminate\Foundation\Validation\ValidatesRequests; | ||
use Illuminate\Routing\Controller as BaseController; | ||
|
||
class Controller extends BaseController | ||
{ | ||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests; | ||
} |
Oops, something went wrong.