Giter Club home page Giter Club logo

donation-marketplace-server's Introduction

Donation Marketplace Server (Backend)

Donation Marketplace Server is a non-profit web application backend, built with Python (FastAPI).

Installation

To deploy the backend, you must have docker installed on your system.

Once you've installed docker, run the following command to setup all its dependencies.

MongoDB

docker run -d -p 27017:27017 --name mongodb --restart always -e MONGO_INITDB_ROOT_USERNAME='root' -e MONGO_INITDB_ROOT_PASSWORD='root' mongo:latest

Recaptcha

This application requires you to provide your own Recaptcha credentials to function correctly.

You can obtain your credentials here.

Deployment

Build the backend image on your local machine to deploy like such:

docker build -t marketplace-server .

After docker finishes building the image, run the following command to deploy:

docker run -d -p 3030:3030 --name marketplace-server -e SECRET_KEY='SECRET_KEY' -e RECAPTCHA_SECRET='YOUR_RECAPTCHA_SECRET' -e DB_CRED='root:root' -e DB_URL='host.docker.internal' --add-host=host.docker.internal:host-gateway marketplace-server
  • Note: Run openssl rand -hex 32 to obtain a secure secret key.

Testing

All the tests run automatically when you build the docker image for this backend.

If the tests fail, the build process will terminate with error messages.

Manual Testing

You first need to install all python3 requirements by running the command below:

pip3 install -r requirements.txt

Once you've installed the requirements, run the following command to setup Test MongoDB environment:

docker run -d -p 27018:27017 --name mongodb-test -e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_ROOT_PASSWORD=root mongo:latest

Once you've installed the all the requirements, simply run:

pytest

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

donation-marketplace-server's People

Contributors

tjbck avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.