Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

adopteitor/adopteitor-api

Repository files navigation

adopteitor-api

Backend for adopteitor using FeathersJS.

Idea:

Adopteitor is an Open Source, complete solution for Animal Shelters all around the world. It is separated in 3 different projects:

  • adopteitor-api is the backend, where the data structure is defined, the data gets processed and persisted. All the business logic is in this project, and works as the "brain" of Adopteitor.
  • adopteitor-admin is the backend's front-end! A simple web application that lets the ADMINS interact with the adopteitor-api with WRITE PRIVILEGES. That means this is where users with Administrator role can add, edit and delete the resources, like Animals, Humans and Contracts.
  • adopteitor-client is the public front-end of the adopteitor system. It provides a homepage, a filtered featured list of animals, a detailed view for each animal. It also has a way to register in the system as a Human, being able to sign an adoption contract which links that Human to an Animal. Finally, it provides a way that registered and anonymous Humans to donate money for the shelter.

Tech:

Installation:

Dependencies:

You need to have the following tools installed in your local machine:

  • Docker
  • docker-compose

Install and run

With make commands

You'll need to have Make installed.

After cloning the repo, run the following from the root folder:

$ npm install
$ make build
$ make run

By hand

$ cp .env.dist .env
$ npm install
$ docker-compose up -d

Logs

To view the output of the main application do:

$ docker logs -f adopteitor_api

You can view the output of the mongo container using adopteitor_mongo instead.

You'll find the API in http://localhost:3030

Features

Documentation

We are using Swagger for documenting the API, and we are using mongoose-to-swagger to use our model schema to feed Swagger. Documentation can be found at http://localhost:3030/docs/

Roles:

  • USER: Can only READ the resources.
  • ADMIN: Can READ and WRITE the resources.

Resources:

  • Animals:
  • Humans:
  • Contracts:
  • Donations: