Coder Social home page Coder Social logo

forks-store / googledrive-based-dms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from polypodes/googledrive-based-dms

0.0 2.0 0.0 3.06 MB

A proof of concept for a private, Google Drive-based, document management system (DMS)

License: MIT License

Makefile 2.50% RAML 1.30% ApacheConf 1.22% PHP 40.24% HTML 17.24% JavaScript 15.75% CSS 21.75%

googledrive-based-dms's Introduction

Google Drive based DMS (atop Symfony2)

A proof of concept for a Google Drive based document management system (DMS)

Inspired from genj/GenjGoogleDriveBundle

snapshot

snapshot

Requirements

1/3 Setup Google API Client App credentials

To consume the Google Drive API, you need to follow this steps in Google Developers Console (GDC):

  • Create a Google Drive API Project on Google Developers Console (GDC)
  • Activate Google Drive API (status: ON) in GDC > API & auth > APIs
  • Generate a Service Account application type OAuth Client ID in GDC > API & auth > Credentials
  • Download a .p12 key file, via the same API Credentials form in GDC, to be then renamed as ServiceAccountAPIKey.p12

2/3 Symfony2 App configuration

You need to configure your app using this informations you just obtained from Google API Console:

  • Service account API key file: the ServiceAccountAPIKey.p12, generated above, pasted in the app/config/ folder
  • Service account e-mail address: a long [email protected] e-mail address, generated above by Google API Console while creating your OAuth Credentials Client ID.

Add these to your parameters.yml:

dms.service_account_key_file:
dms.service_account_email:

3/3 Installation:

$~: git clone https://github.com/polypodes/GoogleDrive-based-DMS.git
$~: cd GoogleDrive-based-DMS
$~: make
$~: make install

API documentation generation (with RAML & NPM)

npm install -g raml2html
raml2html api.raml > build/API.html
[open/xdg-open] build/API.html

Usage:

  • Use / Create a Google Drive User Account
  • In the Google Drive web interface, (right-click)share a file or an entire folder with the same email address used to fill dms.service_account_email above.

Then open the /files route URL in a browser to see, view & download filesize, filetype & thubmnail of each file & folder.

VPS deployement

ssh login@production
cd current_release
make deploy

Hackin' & Slashin'

You may want to temporary avoid the OAuth login/authorize process while you're developing new features: Just comment these lines at the very end of app/config/security.yml

#     Commenting these lines below = DISABLING login process & security controls
#        - { path: ^/api, roles: ROLE_USER }
#        - { path: ^/files, roles: ROLE_USER }

Front-end

Set up front-end 'stuff'

cd integration
bower install
npm install
gulp

Heroku deployment

One-click way:

Deploy

Manual way:

see https://devcenter.heroku.com/articles/getting-started-with-symfony2 and http://symfony.com/doc/current/cookbook/deployment/heroku.html

heroku config:set SYMFONY_ENV=prod
git push heroku master

To push a branch other than master, use this syntax:

git push heroku yourbranch:master

Set up Heroku parameters

Method: a Composer script hadling your ignored parameter file

ServiceAccounAPIKey.p12 file:

Log in using heroku run bash and use curl to deploy manually the ServiceAccountAPIKey.p12 from a remote server

Alternative solution

Heroku debug

Heroku allows you to run commands in a one-off dyno with heroku run. Use this for scripts and applications that only need to be executed when needed, or to launch an interactive PHP shell attached to your local terminal for experimenting in you app’s environment:

$ heroku run "php -a"
Running `php -a` attached to terminal... up, run.8081
Interactive shell
php > echo PHP_VERSION;
5.5.11

For debugging purposes, e.g. to examine the state of your application after a deploy, you can use heroku run bash for a full shell into a one-off dyno. But remember that this will not connect you to one of the web dynos that may be running at the same time!

(source)

ex: vast-temple-3501

TODO

There is a lot to do ! See TODO.md

License & Copyright

(c) 2015 Les Polypodes

Licence: MIT

Made in Nantes, France by Les Polypodes

googledrive-based-dms's People

Contributors

ronanguilloux avatar nielk avatar alexoger avatar olivboo avatar

Watchers

James Cloos avatar Reess Kennedy avatar

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.