ajaegle / aam-ndb-core

Easy-to-use case management web app for NGOs anywhere in the world.

Home Page:http://www.aam-digital.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Release Version Build Status Code Climate Test Coverage Guides Doc CoverageDocs

Aam Digital

Empowering NGOs' social workers with simple to use (database) software.

For more information about the software and a free demo system visit www.aam-digital.com.

For more information about the code including guides see the separate Developer Documentation


Installation, Use & Deployment

You can directly run the system using Docker. More information in our Aam-Digital/ndb-setup repository. In that case you do not have to clone this repository and install all the dependencies as everything is packaged into the docker image already.

Configuration

The custom configuration for your service instance is set in the assets/config.json file. You can copy the assets/config.default.json as a starting point.

Nextcloud (webdav) Integration

You can integrate Aam Digital with an existing Nextcloud server to allow users to update photos on their own. To avoid CORS issues the webdav URL in your config.json should be a relative URL in combination with a reverse-proxy that is forwarding to the actual Nextcloud server address:

assets/config.json:

  "webdav": {
    "remote_url": "nextcloud/"
  }

proxy.conf.json (for local development):

  "/nextcloud": {
    "target": "https://<your-nextcloud-server>/remote.php/webdav",
    "secure": true,
    "changeOrigin": true,
    "pathRewrite": {
      "^/nextcloud": ""
    }
  }

docker/nginx_default.conf (for production server):

    location /nextcloud {
        rewrite /nextcloud/(.*) remote.php/webdav/$1 break;
        proxy_pass https://<your-nextcloud-server>/;
        proxy_redirect off;
        proxy_buffering off;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Ssl on;
    }

Development

Setup

  1. This project depends on npm (NodeJS) to setup its dependencies. Please make sure you have npm installed.
  2. git clone this repository to get all the code with its configuration and requirements.
  3. npm install the dependencies (external libraries and packages)
  4. create a config file assets/config.json by copying the default config assets/config.default.json that is part of the repository.
  5. npm run start to run your local dev server and get started.

Documentation

Our detailed Developer Documentation provides tutorials, guides, concepts and an API reference.

Code Style

We use prettier to enforce a consistent formatting of code to make the project easier to read. The project is set up with a git pre-commit hook to automatically format your commits according to these rules.

Using Angular CLI

This project is built upon Angular. If you are unfamiliar with the framework and Angular CLI go check out the Angular CLI README or use use ng help. The following sections give you a brief overview.

Development server

Run npm run start for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding (Generate new modules and components)

You can use Angular CLI to add new code to the project. Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|module.

Build

Run ng build -prod to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor. Before running the tests make sure you are serving the app via ng serve.

Build a docker image locally

Deployment on a server can be done through a docker image, our ndb-setup project provides tools and a starting point to run the system using docker. For more information about Docker, please refer to their official documentation.

To build a new docker image from the built project files run:

npx ng build --output-path docker/dist --prod
cd docker
docker build -t aamdigital/ndb-server:latest .

Contribute

Our project is completely run by volunteers. Contributions welcome!

We are trying hard to make it easy for you to join in. As a starting point, please refer to our CONTRIBUTING page.

About

Easy-to-use case management web app for NGOs anywhere in the world.

http://www.aam-digital.com

License:GNU General Public License v3.0


Languages

Language:TypeScript 83.9%Language:HTML 13.2%Language:SCSS 2.5%Language:JavaScript 0.4%Language:Shell 0.0%Language:Dockerfile 0.0%