Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
silverbux committed Apr 19, 2016
1 parent 8e70422 commit 072ad54
Show file tree
Hide file tree
Showing 201 changed files with 11,842 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
engines:
eslint:
enabled: true
ratings:
paths:
- angular/**
- "**.js"
languages:
Ruby: false
JavaScript: true
PHP: true
Python: false
exclude_paths:
- "public/js/vendor.js"
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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


[{package.json,bower.json,.jscs.json}]
indent_style = space
indent_size = 2


[*.yml]
indent_style = space
indent_size = 2
37 changes: 37 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomString

API_PREFIX=api

DB_HOST=127.0.0.1
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

GITHUB_CLIENT_ID = null
GITHUB_CLIENT_SECRET = null
GITHUB_REDIRECT = http://yourdomain.com/auth/github/callback

GOOGLE_CLIENT_ID = null
GOOGLE_CLIENT_SECRET = null
GOOGLE_REDIRECT = http://yourdomain.com/auth/google/callback

FACEBOOK_CLIENT_ID = null
FACEBOOK_CLIENT_SECRET = null
FACEBOOK_REDIRECT = http://yourdomain.com/auth/facebook/callback
20 changes: 20 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "eslint:recommended",
"plugins": ["angular"],
"rules": {
"angular/no-service-method": 0
},
"env": {
"es6": true,
"browser": true,
"jasmine": true
},
"ecmaFeatures": {
"modules": true
},
"globals": {
"angular": true,
"module": true,
"inject": true
}
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto
*.css linguist-vendored
*.less linguist-vendored
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Logs and databases
*.log
*.sql
*.sqlite

/vendor
/node_modules
Homestead.yaml
Homestead.json
.env
.idea/
/bower_components
npm-debug.log
public/storage
public/views
public/js
public/fonts
public/css
public/build
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: php

php:
- 5.5.9
- 5.5
- 5.6
- 7.0
- hhvm

sudo: false

services:
- mysql

before_install:
- nvm install 5.1

before_script:
- mysql -e 'create database laravel;'
- export DB_DATABASE=laravel
- export DB_USERNAME=travis
- export DB_PASSWORD=

script: npm install -g gulp bower && npm install && bower install && php artisan migrate --force && gulp && vendor/bin/phpunit
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### v0.0.1

+ Initial Commit
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Alex Quiambao
Copyright (c) 2016 Alex Quiambao <alexquiambao@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

85 changes: 84 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,85 @@
# laravel-angular-admin
# Laravel Angular Admin
Laravel + Angularjs + Bootstrap + AdminLTE binded by Gulp workflow Admin Dashboard Boilerplate.
Plus with social media and JWT authentication on the side.

## Screenshots
![Dashboard Screenshot](https://cloud.githubusercontent.com/assets/1888261/14597104/53b404b6-057d-11e6-876d-c83630686590.png)

![Login Screenshot](https://cloud.githubusercontent.com/assets/13616776/14597970/a366dc7c-0582-11e6-853b-776b1cf17aed.png
)

## Demo
[Click here for a live demo](http://laravel-admin.herokuapp.com)

## Installation
```
$ composer install
$ npm install -g gulp bower
$ npm install && bower install
$ gulp
```

Copy ```.env.example``` to ```.env``` and enter necessary config for DB and Oauth Providers Settings.

```
$ php artisan migrate
```

## Work Flow

**General Workflow**

```
$ gulp && gulp watch
$ php artisan serve
```

**Watching assets**

```
$ gulp && gulp watch
```

**Angular Generators**

```
$ artisan ng:page name #New page inside angular/app/pages/
$ artisan ng:dialog name #New custom dialog inside angular/dialogs/
$ artisan ng:component name #New component inside angular/app/components/
$ artisan ng:service name #New service inside angular/services/
$ artisan ng:filter name #New filter inside angular/filters/
$ artisan ng:config name #New config inside angular/config/
```
[Laravel Angular Generator] (https://github.com/jadjoubran/laravel-ng-artisan-generators)

#### More docs to come...

## Features
* [JWT-Auth] (https://github.com/tymondesigns/jwt-auth)
* [Socialite] (https://github.com/laravel/socialite)
* [Dingo/API] (https://github.com/dingo/api)
* [Restangular] (https://github.com/mgonto/restangular)
* [UI-Router] (https://github.com/angular-ui/ui-router/)

## Built With
* [Laravel] (http://laravel.com)
* [Angularjs] (https://angularjs.org)
* [Twitter Bootstrap] (https://getbootstrap.com)
* [Composer] (https://getcomposer.org/)
* [Gulp.JS] (http://gulpjs.com/)
* [BOWER] (http://bower.io/)
* [NPM] (https://www.npmjs.com/)

## Contributing

Please read [code_of_conduct.md](code_of_conduct.md) for details on our code of conduct, and the process for submitting pull requests to us.

## Acknowledgments / Credits
This project wont be possible without the following, We acknowledge and are grateful to these developers for their contributions to open source. **All necessary credits are given**.

* [Laravel-Angular (Material)] (https://laravel-angular.readme.io)
* [AdminLTE] (https://laravel-angular.readme.io)

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
Empty file added angular/app/components/.gitkeep
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<form ng-submit="vm.submit()">
<md-input-container>
<label>Name</label>
<input type="text" ng-model="vm.name">
</md-input-container>

<md-input-container>
<label>Topic</label>
<input type="text" ng-model="vm.topic">
</md-input-container>
<md-button type="submit" class="md-primary md-raised">Create post</md-button>
</form>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
class CreatePostFormController{
constructor(API, ToastService){
'ngInject';

this.API = API;
this.ToastService = ToastService;
}

submit(){
var data = {
name: this.name,
topic: this.topic,
};

this.API.all('posts').post(data).then((response) => {
this.ToastService.show('Post added successfully');
});
}
}

export const CreatePostFormComponent = {
templateUrl: './views/app/components/create_post_form/create_post_form.component.html',
controller: CreatePostFormController,
controllerAs: 'vm',
bindings: {}
}
Empty file.
39 changes: 39 additions & 0 deletions angular/app/components/login-form/login-form.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<form ng-submit="vm.login()" method="post">
<div class="callout callout-danger" ng-if="vm.loginfailed">
<h4>Login Failed</h4>
<p>Incorrect Email/Username or Password.</p>
</div>
<div class="callout callout-success" ng-if="vm.registerSuccess">
<h4>Registration Success!</h4>
<p>A verification link has been sent to your Email Account. Thank You!</p>
</div>
<div class="form-group has-feedback">
<input type="email" class="form-control" placeholder="Email" ng-model="vm.email">
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="password" class="form-control" placeholder="Password" ng-model="vm.password">
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
<div class="checkbox icheck">
<label>
<input type="checkbox"> Remember Me
</label>
</div>
</div>
<div class="col-xs-4">
<button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button>
</div>
</div>
</form>
<div class="social-auth-links text-center">
<p>- OR -</p>
<a href="/auth/github" class="btn btn-block btn-social btn-github btn-flat"><i class="fa fa-github"></i> Sign in using Github+</a>
<a href="/auth/google" class="btn btn-block btn-social btn-google btn-flat"><i class="fa fa-google"></i> Sign in using Google</a>
<a href="/auth/facebook" class="btn btn-block btn-social btn-facebook btn-flat"><i class="fa fa-facebook"></i> Sign in using Facebook</a>
</div>
<a href="#">I forgot my password</a>
<br>
<a ui-sref="app.register" class="text-center">Register a new membership</a>
39 changes: 39 additions & 0 deletions angular/app/components/login-form/login-form.component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
class LoginFormController {
constructor($auth, $state, $stateParams, API) {
'ngInject';

this.$auth = $auth;
this.$state = $state;
this.$stateParams = $stateParams;

this.registerSuccess = $stateParams.registerSuccess;
this.loginfailed = false;
this.email = '';
this.password = '';
}

login() {
var user = {
email: this.email,
password: this.password
};

this.$auth.login(user)
.then((response) => {
this.$auth.setToken(response.data);
this.$state.go('app.landing')
})
.catch(this.failedLogin.bind(this));
}

failedLogin(response) {
this.loginfailed = true;
}
}

export const LoginFormComponent = {
templateUrl: './views/app/components/login-form/login-form.component.html',
controller: LoginFormController,
controllerAs: 'vm',
bindings: {}
}
11 changes: 11 additions & 0 deletions angular/app/components/login-form/login-form.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.btn-github:hover {
color: #fff
}

.btn-facebook:hover {
color: #fff
}

.btn-google:hover {
color: #fff
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Logging in...
Loading

0 comments on commit 072ad54

Please sign in to comment.