User Authentecatin Service.
-
service is responsible for authenticate and login users.
-
service is responsible for validating whether logged user is permitted to do specific action or not.
-
service is resbonsible for loggin users out from the system
-
Backend : Nodejs
-
Datastore is Mongodb.
-
Framework Arabicajs built top of express.js as mentioned below in readme
-
Authentecation by JWT.
-
Support (Docker, Docker-compose) As Container
-
API DOC for API Documentation
With docker installed compose:
# clone the latest stable release
$ git clone https://github.com/HusseinOsman/fatura_backend_challenge.git
# enter to clonned folder
$ cd fatura_backend_challenge
# copy default .env.dev to .env and set your Environment variables
$ cp .env.dev .env
# build docker-compose image and run container for api for backend & db for mongo
$ docker-compose up --build
# to run unit testing by docker-compose:
$ docker-compose run api npm run test
API Link https://0.0.0.0:3000/
API Docs http://0.0.0.0:3001/
# clone the latest stable release
$ git clone https://github.com/HusseinOsman/fatura_backend_challenge.git
# enter to clonned folder
$ cd fatura_backend_challenge
# install node packges
$ npm install
# for development mode and watch changing files by nodemon
$ npm run watch
# for production mode
$ npm run prod
# to run unit testing:
$ npm run test
With apidoc :
# install apidoc Command Line Interface generally
$ npm install apidoc -g
# generate your documentation in apidoc folder by this command
# i will docarized this apidocs by default
$ apidoc -i src/ -o apidoc/
API Link https://0.0.0.0:3000/
API Docs http://0.0.0.0:3001/
Arabica.js is a web framework that makes it easy to build custom, enterprise-grade Node.js apps. It is designed to resemble the MVC architecture from frameworks like Ruby on Rails, but with support for the more modern, data-oriented style of web app & API development.
Arabica is built on Node.js, Express with ES6 support
The ORM,
Waterline is a next-generation storage and retrieval engine, and the default ORM used in the Sails framework.
It provides a uniform API for accessing stuff from different kinds of databases and protocols. That means you write the same code to get and store things like users, whether they live in MySQL, MongoDB, neDB, or Postgres.
Waterline strives to inherit the best parts of ORMs like ActiveRecord, Hibernate, and Mongoose, but with a fresh perspective and emphasis on modularity, testability, and consistency across adapters.
Starting with v0.13, Waterline takes full advantage of ECMAScript & Node 8's await
keyword.
In other words, no more callbacks.
var newOrg = await Organization.create({
slug: 'foo'
})
.fetch();
check following list of available adapters
Database type | Package name | Maintainer | Build status / coverage |
---|---|---|---|
MongoDB | sails-mongo | Mike McNeil |
Hussein Osman | ||||
MIT License Copyright © 2019-present