Skip to content

Instantly share code, notes, and snippets.

@leviwheatcroft
Created July 19, 2014 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leviwheatcroft/c5f386e0671a876849e0 to your computer and use it in GitHub Desktop.
Save leviwheatcroft/c5f386e0671a876849e0 to your computer and use it in GitHub Desktop.
whtacctgPortalClientFolders
# file management service for laravel (whtacctgPortalClientFolders)
## overview
We require a file management system for a professional office. Our client files are maintained on a debian file server, and we would like to perform maintenance functions on that repository via a web interface. I'd like to use laravel, because planned future enhancements will require a robust framework.
the full brief [can be viewed here][1]
## details
* Currently, client data is stored in a folder structure created by convention. That convention needs to be changed, so client folders will need to be renamed according to the new convention.
* Client data is available via an xml file.
**folder naming conventions**
example data [can be seen here][2]
* possible contact types are individual, partnership, company, smsf, trust
* type=individual will provide Surname and GivenNames fields (as in JOHN0002)
* all other types will provide only Name (as in JOHN0004)
* our old contact management software generated client codes in the form "JOHN0004", but our new software generates client codes in the form of a simple consecutive integer. Old codes were imported into the new contact manager. Presently, approx 90% of contacts have codes in the form "JOHN0004", but the remainder have the simple integer codes.
_old convention_
/clients/j/JOHN0004 ER & FY Johnston/
/clients/j/JOHN0002 E Johnston/
_new convention_
/clients/e/ER & FY Johnston (JOHN0004)/
/clients/j/Johnston E (JOHN0002)/
* to match existing folders to clients according to the old convention, you can just match the first 8 characters of the folder name against the "code" field from the user table, which will have been generated from the "code" field of the xml data.
_moving / renaming client folders_
* There will be folders in the existing client folders which do not match the old naming convention an therefore can not be matched with a client.
* The best approach is to simply move matched client folders to a new root folder (for example, move folders to /clientsNew/ instead of /clients/ - In this way you will be left with a /clients/ folder containing only those client folders which do not match the convention and therefore need to be manually renamed.
**configuration**
must be configurable from text file.
* all paths
* admin user credentials
* logging verbosity
**logging**
all actions should be logged. If laravel doesn't include logging functionality then use some composer package. Include a verbosity setting,.
**web ui**
no web ui is required. The ui will be created in a future enhancement. For this project, actions can simply be called by requesting a laravel end point in the browser. Logging output should be written to the http response.
**development environment**
I have a strong preference to use a linode for this. That is negotiable, but the deliverable will be a working instance on a linode.
**versioning**
* use a git repository on bitbucket
* for the love of everything holy commit regularly
**laravel structure**
* most of the logic from this project should be in two seperate services with their own facades, one for scraping data from xml and posting to user table, and another for managing the filesystem.
**unit testing**
* client facade and filesystem facade must be unit testable
**future enhancements**
after completion of this project, future projects will integrate this laravel instance with a pydio instance, eventually creating a web accessible client portal. Obviously, if your work on this project is good, you will be considered for the future enhancement projects.
**bugs**
you will be responsible for resolving any bugs in the provided functionality discovered within 7 days of the completion milestone. Please include the word "bananas" in your proposal so I can be sure you have bothered to read my brief.
## required functionality
_user management_
* update mysql user table from xml data
* determine client path according to old convention
* determine client path according to new convention
_client folders_
* delete all folders containing only subfolders (with no files)
* move existing client folders to a new path, based on the new convention
* create new client folders where none exists
## provided resources
* existing client folders
* linode
* xml client data
## deliverables
* laravel instance
* mysql database (containing only usertable)
* updated client folders
## application / proposal
**trust**
given that you will be working with sensitive data, I will need to do a basic background check. Don't send the following up front, once I'm fairly sure you're right for the project I'll discuss these requirements.
* I will need a copy of your id or passport
* Some sort of relevant third party testimonial. Ideally I'd like to contact someone you've completed a project for before, but this is negotiable.
**skills**
I'd like to see some of your php code. An exerpt is fine. Preferably laravel.
## pricing & payment
**time estimate**
Your quote should be in reference to the following time estimate. If you feel more time is required for any aspect, please say so.
| task | time (hrs) |
| --- | ---: |
| environment | 2.0 |
| create facades | 1.0 |
| scrape xml | 1.0 |
| user table | 0.5 |
| match client folders to users | 1.0 |
| generate new convention folder names | 1.0 |
| unit testing | 2.0 |
| endpoints & output | 0.5 |
| logging | 1.0 |
| function to migrate client folders | 1.0 |
| provision | 1.0 |
| **total** | **11.0** |
**milestones**
| milestone | description | award |
| --- | --- | ---: |
| up front | | 0% |
| commencement | linode, git repo, laravel, facades | 33% |
| completion | required functionality provided, demonstrated on linode | 33% |
| close | after bugs resolved (see bug clause) | 33% |
**payment**
payments will be via odesk. odesk fees are your responsibility. all prices discussed will be inclusive of odesk fees.
[1]: https://stackedit.io/viewer#!provider=gist&gistId=c5f386e0671a876849e0&filename=whtacctgPortalClientFolders
[2]: http://pastebin.com/C1fx8P0J
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment