/spare

Connecting those in need with people who have extra stuff

Primary LanguagePython

👕 Spare App Build Status

A project that connects people in need of clothing and other essentials with people in the community who have things to spare. It's kind of like one on one Goodwill. The main objective is to foster interactions between the housed and unhoused. The donation is the mechanism for building these connections throughout our community. \o/

Table of Contents

Project Status

We are currently aiming to launch Spare sometime in late 2019.

Milestones

  1. Complete core functionality required for launch (In Progress)
  2. Prepare demo of app to be presented to partner organizations (TBD)
  3. Launch app and begin accepting requests (TBD)

Ways to Contribute

Also, ping us on the Hack for LA Slack on the #spare channel if you can help. We'd love to have you!

Setup Instructions

1. Clone project repo

git clone https://github.com/hackforla/spare
cd spare

2. Create local env variable file

Copy .env to .env.dev, then edit dev file to change SECRET_KEY value.

(Note the SECRET_KEY value, used by django, can be any string you choose)

cp .env .env.dev

3. Install Docker and Docker Compose

Docker

https://docs.docker.com/install/

Docker-Compose

http://docs.docker.com/compose/install/

Create the docker group and add your user

https://docs.docker.com/install/linux/linux-postinstall/

Add the docker group

sudo groupadd docker

Add your user to the docker group

sudo usermod -aG docker $USER

4. Build Docker images

docker-compose build

5. Run Docker containers

docker-compose up

At any point, Ctrl-C stops the containers.

Note: On first setup, the server may sometimes start before the database, causing an error. In this case, Ctrl-C to stop all containers and re-run Docker Compose.

6. Access container bash shell

Next, open a second terminal and execute the following command to list all docker containers currently running:

docker ps

Find the the server container image (probably spare_server), and copy the container ID.

Next, execute the following command to access the container's bash shell, replacing CONTAINER_ID with the container's ID hash.

docker exec -t -i CONTAINER_ID bash

7. Run initial migrations

Once running bash inside of the server container (above), execute the following to run the initial database migrations:

python3 manage.py migrate

8. Create a superuser

Execute the following command to create a superuser for the project:

python3 manage.py createsuperuser

This will be the main superuser admin for your app.

Shortcut SetUp Management Command

To run initial migrations, create a superuser, and populate demo data, run this command:

docker-compose run server python manage.py get_started

9. Login to Django Admin

You can now login to the Django Admin for your user at:

http://localhost:8000/admin/

10. Initial database setup

In order for the app to be usable, an admin must create entries in both the donations/location and donations/dropofftime tables.

Important URLs

Deployment

Staging

https://hackforla-spare-staging.herokuapp.com/

Changes to staging branch are automatically deployed to above staging server.

Production

https://www.whatcanyouspare.org/

Changes to master branch are automatically deployed to above production server.

Product and Design Contributors

Our project brief is on Google Drive. We are using Github issues to track work that needs to be done. Ping Lex Roman on Slack if you are interested in contributing on the product or design side.

Spare Team

Join our #spare Slack channel - http://hackforla-slack.herokuapp.com/

Spare Team is