Home

Awesome

What's this?

ClientManager is a sample CRUD application build with Backbone, RequireJS (2.0) and Twitter Bootstrap on the frontend. The backend part of the application uses Express.js and Mongoose (amongst other libraries).

<img src="https://github.com/alessioalex/ClientManager/raw/master/files/add_client.png" border="0" /> <img src="https://github.com/alessioalex/ClientManager/raw/master/files/client_list.png" border="0" />

Quick start

App structure

The application has a structure similar to Rails:

Frontend:

Dev gotchas with Jake (in the terminal)

Empty the database:

jake db:empty

Populate database with data:

jake db:populate[20]

That will empty db and insert 20 new records).

Compress & concatenate assets (one file for JS & one file for CSS):

jake app:assets

Testing

I've chosen Mocha for all tests in this project. To run test suite in the command line use the following command in the application root (make sure things are setup properly -> the app can connect to MongoDB, can bind to the specified port):

npm test

If you're testing on Windows, run the following commands in the terminal:

npm install mocha@1.1.0 -g
mocha --ui bdd --recursive --reporter spec --timeout 10000 --slow 300

The first command installs mocha globally and the second one runs the test suite.

For client side tests, open the browser

http://<server>:<port>/test

Small JS styleguide for the project

Browser compatibility

I haven't had time to properly test the app, but it should work fine in modern browsers.

TODO / Improvements:

Client-side:

Server-side:

Useful links that helped me while developing this app

License

(The MIT License)

Copyright (c) 2012 Alexandru Vladutu alexandru.vladutu@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 in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 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.