Fair projects for students from students ...
Fair Projects is a web app based on the MEAN stack. It's purpose is to help professors and students with managing their projects' assignments.
Make sure you have node installed (preferably 0.12.7, check the wiki for instructions on how to do that):
git clone https://github.com/mihaeu/fair-projects
cd fair-projects
# install dependencies (invokes both npm and bower)
npm install
# for convenience we'd recommend you to install grunt-cli
npm install --global grunt-cli
# start node server, watch for file changes and run tests automatically
# see Gruntfile.js for details
grunt
# or for production simple start using node
node server.js
If you're having difficulties finding out where to start editing or adding files for a new feature, refer to Project Structure
Client side unit tests and have been written with Jasmine and are executed via Karma:
# during development you might want to have the test runner running continuously
grunt
# if all you want is a single run
grunt test:client
To execute tests with Travis we're using PhantomJS instead of Chrome. Check out the grunt karma:travis
task if you're interested.
Server side unit tests have been written with Jasmine and are executed via jasmine-node:
grunt test:server
End-to-End tests have been written using Protractor and Jasmine. Grunt integration is not working 100%. Make sure you download and start the webdriver-manager
manually before running the tests:
# only once
webdriver-manager update
# assuming global installation
# (shouldn't be necessary, but Grunt plugin is broken)
webdriver-manager start
# start server (in separate window or with & in the background)
grunt nodemon:dev
# execute the tests
grunt test:e2e
We found that a lot of Javascript projects have a different project structures, so we decided to document ours here:
.
├── bower.json # front-end dependencies
├── config
│ └── db.js # db configuration
├── Gruntfile.js # our task runner of choice
├── node_modules # .gitignore
│ └── ...
├── package.json # project information, back-end dependencies and scripts
├── private # all back-end code
│ ├── controllers
│ │ ├── ProjectController.js
│ │ └── SubjectController.js
│ ├── models
│ │ └── Subject.js
│ ├── routers # split routes up where necessary
│ │ ├── ProjectRouter.js
│ │ └── SubjectRouter.js
│ └── routes.js
├── public # this is the root of the server
│ ├── bower_components # (Note: these should probably be outside and processed to dist)
│ │ └── ...
│ ├── dist # front-end dependencies after processing
│ │ ├── scripts.min.js
│ │ └── style.min.css
│ ├── images
│ │ ├── FairProjectsLogo.png
│ │ └── FairProjects.png
│ ├── index.html # front-end entry point
│ ├── js
│ │ ├── app.js # central Angular file
│ │ ├── controllers # Angular controllers
│ │ └── services # Angular services
│ ├── styles
│ │ └── style.css
│ └── views # Angular templates
│ ├── project
│ └── subject
├── README.md # this file
├── server.js # main bootstrap file, starts db, server, ...
└── tests
├── e2e # protractor tests
│ └── spec.js
├── karma.conf.js
├── protractor.conf.js
└── unit
├── client # jasmine front-end tests
└── server # jasmine back-end tests
- stick to the project structure (or tell us why it sucks)
- stick to our project and coding guidelines (we're using the brilliant AirBnB JavaScript Style Guide)
- send us a PR
- Markus Rodler
- Fabian Gerbig
- Marinus Noichl
- Michael Haeuslmann
Proudly developed @ University of Applied Sciences Rosenheim