# project-reports

> project reports | reports at a glance

Latest version **1.8.2** (published 2016-10-14) · 0 weekly downloads

## Install

```sh
npm install project-reports
pnpm add project-reports
yarn add project-reports
bun add project-reports
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.8.2 |
| Published | 2016-10-14 |
| First published | 2016-10-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4.2.3 |
| Dependencies | 22 |
| Known vulnerabilities | 0 (+35 in 7 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Frederik Reifschneider |
| Maintainers | fredcool |
| Keywords | Node.js, application |

## Links

- npm: https://www.npmjs.com/package/project-reports
- Repository: https://github.com/karazy/preports
- Homepage: https://github.com/karazy/preports#readme
- Issues: https://github.com/karazy/preports/issues
- npm.io page: https://npm.io/package/project-reports

## Dependencies (22)

- [mv](https://npm.io/package/mv.md) 1.0.0
- [ejs](https://npm.io/package/ejs.md) ^2.3.4
- [clone](https://npm.io/package/clone.md) ^1.0.2
- [lodash](https://npm.io/package/lodash.md) ^3.10.1
- [multer](https://npm.io/package/multer.md) ^1.1.0
- [pdfkit](https://npm.io/package/pdfkit.md) ~0.2.7
- [express](https://npm.io/package/express.md) ^4.13.4
- [mongodb](https://npm.io/package/mongodb.md) ^2.1.4
- [winston](https://npm.io/package/winston.md) ^1.1.2
- [fs-extra](https://npm.io/package/fs-extra.md) ~0.8.1
- [passport](https://npm.io/package/passport.md) ^0.2.2
- [node-uuid](https://npm.io/package/node-uuid.md) ^1.4.7
- [nodemailer](https://npm.io/package/nodemailer.md) ^2.0.0
- [body-parser](https://npm.io/package/body-parser.md) ^1.14.2
- [passport-cas](https://npm.io/package/passport-cas.md) 0.0.3
- [connect-mongo](https://npm.io/package/connect-mongo.md) ^1.1.0
- [cookie-parser](https://npm.io/package/cookie-parser.md) ^1.3.5
- [node-json2html](https://npm.io/package/node-json2html.md) ~0.4.1
- [express-session](https://npm.io/package/express-session.md) ^1.11.3
- [method-override](https://npm.io/package/method-override.md) ^2.3.5
- [string-template](https://npm.io/package/string-template.md) ^0.2.1
- [escape-string-regexp](https://npm.io/package/escape-string-regexp.md) ^1.0.5

## Recent versions

- 1.8.2 (latest) — 2016-10-14

## README

PReports
========

project reports - create and manage weekly IT project reports

[Official homepage](http://p-reports.com)

[![Build Status](https://travis-ci.org/karazy/preports.svg?branch=development)](https://travis-ci.org/karazy/preports)

[Try it!](https://preports.herokuapp.com) (development branch)


PReports project is based on MEAN stack: MongoDB, ExpressJS, AngularJS, NodeJS

##About

PReports (short for project reports) lets you write project reports (tailored for IT) in your browser on the fly. More information on the [official homepage](http://p-reports.com).

##Setup

###Dev
####Prerequisites
Install
- [NodeJS > 4.2.3](https://nodejs.org/en/)
- `npm install -g bower grunt-cli`
- [Compass](http://compass-style.org/install/) for SASS, needs Ruby
- [MongoDB](https://www.mongodb.org/)

Optional
- `npm install -g supervisor`

####Run it
1. Check out development (or master for last stable) branch.
2. Make sure a mongo daemon is running on your local machine (or a remote machine)
3. CD into project root folder
4. Set up environment variables (see below)
5. RUN `npm install`
6. RUN `supervisor app.js` (or node if you didn't install supervisor). This will fire up the backend
and you should see something like this.

    ```
    Starting child process with 'node app.js'
    Watching directory '/Users/fred/Dev/preports/service' for changes.
    connect.multipart() will be removed in connect 3.0
    visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
    connect.limit() will be removed in connect 3.0
    Initialize passport
    Authentication disabled
    Using MONGODB_DB_CONNECTION
    Connecting to mongo db: mongodb://localhost:27017/preports
    directory for upload: undefined
    Wed Jan 13 2016 20:36:00 GMT+0100 (CET): Node server started on undefined:3000 ...
    Connected to 'project report' database
    createIndexes: created index searchIndex_1
    ```
7. CD into client folder
8. RUN `npm install && bower install` (this will install the frontend dependencies)
9. RUN `grunt serve` (This will fire up a webserver on port 9000 an show the UI.)

    ```
    ...
    Running "connect:livereload" (connect) task
    Started connect web server on 0.0.0.0:9000.
    
    Running "watch" task
    Waiting...
    
    ```
10. Go and code... All changes should be picked up immediately.
11. visit http://localhost:9000

####Test it
*Backend*

To run tests RUN `npm test` in root folder. Make sure mongo is running. ATTENTION Will wipe your database!!!

*Frontend*

Protractor end to end tests.
1. MongoDB and node backend must be up and running.
2. Install webdriver-manager and protractor.
3. RUN webdriver-manager start
4. RUN grunt e2e-test 

####Build it
To have a production build CD into client folder and execute `grunt build --force`.
This creates a new minified UI build in /dist folder that gets served by the backend.
You can access the dist build via http://localhost:3000
Commit and push the "build" to your repository. Thats it.


###Production

####Standalone
Install
- NodeJS > 4.2.3
- `npm install -g forever` (To run your script continously)
- [MongoDB](https://www.mongodb.org/) preferably on another server

####Docker
Install
- Docker obviously and docker-compose
- Tune env variables in docker-compose.yml to suite your needs

####Run it...
1. Checkout the source with the latest UI dist build on your prod host
2. CD into src root
3. Adjust config and env variables
4. RUN `npm install`
5. RUN `forever app.js`
  1. or RUN `docker-compose up -d` when using docker

This may not be the best approach. One might want to check out
[Strongloop](https://strongloop.com) as a tool for node app building and deployment.
Check out their [post](/strongblog/node-js-deploy-production-best-practice/) regarding best practices.


###Environment variables
List of env variables needed to configure PReports.

| Variable      | Values      | Default | Required |
| ------------- | :-------------: | :-------------: | -------------: |
| NODE_ENV     | e.g. development, production | development | no |
| CONFIG_PATH    | /path/to/external/config      | none | no |
| UPLOAD_DIR | /path/to/file/upload    | USER_HOME/.preports | no |

###Configuration
Config files reside under ./config/environment. Depending on the value of NODE_ENV
the corresponding config is loaded.

###Directories

/auth - Authorization logic

/backup - Scripts for backups (experimental)

/client - UI src code

/components - Misc stuff

/config - configurations

/database - DB helper

/dist - Minified UI build

/preports-icon - icons

/routes - Backend core logic. 

/specs - Backend tests

/views - Views rendered by express.js (not used currently)


##Release Notes
[> Release Notes](RELEASE_NOTES.md)

###License

MIT License (MIT)

Copyright (c) 2016 Frederik Reifschneider

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.

---
_Source: https://npm.io/package/project-reports · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
