Skip to content

mihaeu/fair-projects

Repository files navigation

Fair Projects

Build Status Code Climate Test Coverage Join the chat at https://gitter.im/mihaeu/fair-projects

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.

Table of Contents

  1. Getting Started
  2. Tests
  3. Project Structure
  4. How to Contribute
  5. Contributors

Getting Started

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

Tests

Client-Side Unit Tests

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

Server side unit tests have been written with Jasmine and are executed via jasmine-node:

grunt test:server

E2E Tests

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

Project Structure

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

How to Contribute

  • 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

Contributors

  • Markus Rodler
  • Fabian Gerbig
  • Marinus Noichl
  • Michael Haeuslmann

Proudly developed @ FH Rosenheim Logo University of Applied Sciences Rosenheim

About

Fair projects for students from students ...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages