Quick Start
- Clone repo and run
npm install
- To run locally, install MongoDB. In production we are using a Heroku + MongoDB Cloud backend. We have a a functioning example of this API on Heroku, to which we can add devs/access as necessary.
- You will need to add
process.env
environmental variables for use withapp.js
(forMONGODB_URI
specifically, maybe you know a way to improve this for a local dev environment). Create anodemon.json
file in the root directory and add variables as key value pairs (seenodemon_example.json
for template). npm start
and navigate to appropriate route (e.g.,http://localhost:3000/api/v0/evaluators
or other route).- Postman is a useful app for working with APIs (sending GET/POST requests, etc.).
About
This API intends to promote the principles of effective altruism by (initially) storing information about well-established nonprofit organizations as selected by certain charity evaluators. The initial purpose of this API is to feed data into a decentralized application that enables users to donate ERC20-based cryptocurrency evenly across a selection of these identified nonprofits.
Docs
API docs are here. This API is under active development, and so the docs are a work in progress as the data structures and schema continue to develop. Ultimately the docs will be written in accordance with the OpenAPI specification using a platform like Swagger or similar.
The basic API concept is to call an evaluator
object and its corresponding nonprofit
objects for integration into a dapp. There is also a newly developed nft
route for integration into Open Sea (currently on Rinkeby).
Contributing to the project
This is an open source project. Contributions are welcomed & encouraged!
Resources
- Node.js + Express
- MongoDB + Mongoose
- Heroku
- OpenAPI Specification
- Code is inspired from studying the Academind Building a RESTful API with Node.js series