Skip to content

Aam-Digital/ndb-core

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Repository files navigation

Release Version Build Status Code Climate Test Coverage Docs

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.

You can find the Developer Documentation at http://aam-digital.github.io/ndb-core/


Use / Deploy

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.

Development

Our detailed documentation and API reference is hosted on GitHub Pages: aam-digital.github.io/ndb-core.

Additionally you can find guides and recipes to implement common functionalities there in the Developer Documentation.

The application code is split within the src/app/ directory into modules providing general features and abstract components (core) and concrete feature modules for users' use cases (child-dev-project).

Setup

The project depends on a couple of tools which are required for development. Please make sure you have the following installed:

You can simply git clone this repository to get all the code with its configuration and requirements. Then install the dependencies with

npm install

Configuration

Create a config file at assets/config.json by copying the default config assets/config.default.json. The default config file is used as a fallback. Adapt the settings, especially regarding the CouchDB server that should be used for server-side synchronisation.

Using Angular CLI

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 .

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

Contribute

Our project is run completely by volunteers. Contributions welcome!

Please read the Contribution Guidelines in the Developer Documentation.