UMBC SGA -- iTracker
Credits
Original Works: Matthew Landen and Josh Massey
Rewrite and Rearchitected: Christopher Sidell
Resources
Code Resources
Prerequisites
For this application to work you will need to have the following:
- Basecamp API Access from (integrate.37signals.com)
- Google Cloud API Access
Getting Basecamp API access
- Login with the root basecamp account into https://integrate.37signals.com.
- Register an application and fill out all fields.
- Give the application
Basecamp 3
integration - The Redirect URI field should be the root domain of the application appened with auth/basecamp, for local this is
http://itracker.dev/auth/basecamp
. - Take the client_id and secret and put them into the .env file present in the root application directory
- The User agent is the name of your application followed by the domain in parenthesis.
Getting Google Social API access
- Create a google cloud account at https://console.cloud.google.com
- Create a new project
- Enable Google+ Api on your project
- Create an OAuth client ID in credentials
- Give it a descriptive name
- The Javascript origins should be the root application URL
- The Authorized redirect url is similar to the basecamp one, the root app url with auth/callback instead. (
itracker.dev/auth/callback
) - Take the ID and Secret and put them into your .env file
Database
- Install a database somewhere, or use someone elses
- Get the
username
,password
, anddatabase
and put them into the .env file
Starting the Project
These steps will take you from a completely clean installation to working
- Set the superadmin account email in the .env file
- Super admin editing only applies to people in departments, you cannot directly edit profiles
- You can only edit accounts that are made.
- Assuming you have the prerequisites finished and your .env file is filled out you can continue on.
- Firstly run
php artisan migrate --seed
from the root project directory to setup all databases for the project - Run
php artisan storage:link
to link picture storage to the public directory - Go to the web url and enable access to your basecamp
- If you enabled access to the wrong account you can destroy credentials with
php artisan basecamp:dropAuth
- If you enabled access to the wrong account you can destroy credentials with
- Log into the application by clicking in the top right Login
- If you're found in basecamp it will ask you to fill out your profile, this isn't required for now.
- When finished setting up correct accounts for departments
Contributing
Getting Local Development Running
- Install virtualbox
- Also install Vagrant
- Add hostsupdater extension to vagrant
- Copy
.env.example
to.env
, adjust for production and development environments. - Start the VM from the root app diretory and run
vagrant up
.
This will start the VM and you can connect to it after it's done by running vagrant ssh
. This web directory will
be found in /srv/web
. Run php artisan key:generate
and try to access your application from itracker.dev.
As of right now it should be a page that doesn't look quite right, but it shouldn't fail outright. (Other than missing assets)
Getting everything built
This environment heavily uses npm and node to build our dependencies.
- Connect to the VM with
vagrant ssh
and navigate to/srv/web
. - From this directory you can run
npm install
and it will install all of our dependencies. - After we have installed that we need to install gulp globally to run the command
gulp
.- Run
sudo npm install -g gulp
if you want to have it be a command run anywhere
- Run
- Gulp should now be installed and you can run
gulp build
to build a development copy of the assets orgulp
to have it continually watch the directory for changes and rebuild. (Alternative:npm dev
) - Production builds will be minified and optimized and can be generated by
gulp prod
or the aliasnpm prod
Now you can visit itracker.dev and see the websites' current state.
Notes about building
With the way it is setup we can leverage most of the ES2015(ES6) features with babel
Any *.js
files in the resources/assets/angular/
folder will be compiled after core.js
is loaded.
Any *.scss
files mentioned or imported in resources/assets/sass/core.scss
will be compiled, everything else is ignored