Full stack angular app using pouchDB/couchDB to store data and handle security. The app is a boilerplate to quickly start an angular web-app with a backend which tries to be as independent of a server as possible.
The core of the app is an angular app served by a minimal express app. To deploy the app, clone the repository:
git clone https://github.com/arnoutaertgeerts/ng-pouch/ myApp
Navigate to the client
directory and install the client dependencies:
cd myApp/client
bower install
npm install
Navigate to the server
directory and install the server dependencies:
cd ../server
npm install
Serve the app using node
or nodemon
nodemon server.js
The angular app is served by a minimal express server and tries to be as independent of the express app as possible. Almost all requests are send directly to a CouchDB instance using PouchDB. Requests are handled by the angular-sofa
module. This module contains two main factories:
- The
Sync
factory: Used to sync a local PouchDB database with a remote CouchDB database. This factory allows live updating. - The
Model
factory: Used to interact with a remote CouchDB database as with a REST api.
The app tries to leverage the extra features of CouchDB as much as possible. This includes
- Views
- Security through validation documents
- Filters for filtered syncing to the local database
We make use of the following technologies:
- AngularJS
- angular-ui: Bootstrap UI elements and routing
- angular-form-for: Easily produce forms and add validation
- angular-loading-bar: Automatically create a loading bar
- angularjs-toaster: Notification system
- PouchDB: Couchdb client
- [angular-sofa] Angular bindings
- pouchdb-authentication: Easy authentication using pouchdb
- CouchDB: NoSQL database
- Express to serve the app
- Build process
This project is heavily inspired by