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
- Ways to Contribute
- Setup Instructions
- Important URLs
- Product and Design Contributors
- Spare Team
Currently, we’re working on building this prototype. The first objective is to provide a way to request items, share those requests with potential donors and then connect them through an outreach coalition or a nonprofit. While, we’re building this app, we’re also working on a lightweight solution (using Google Forms and email) to gather requests and ask for donations in just a few neighborhoods. You can see that at whatcanyouspare.org
We’re looking for a nonprofit partner right now that can provide a consistent time and location to do the donation handoffs. We’re also considering facilitating “meetup style” events to trade donations.
- Send out a survey to answer the questions in “What we want to learn” (Complete)
- Launch a survey to take requests manually and build a mailing list of potential donors (In progress)
- Launch a web app that can take requests, show donations and provide options for dropoff time/location (In progress)
- Get feedback from donors and requesters on the initial web app
- Iterate on the website
Ways to Contribute
- Pick up an engineering task from Github
- Pick up a design task from Github
- Help us with product direction or strategy
- Help us find nonprofit or government partners to help with donation handoff
- Help us find potential users
- Help us define the service design
Also, ping us on the Hack for LA Slack on the #spare channel if you can help. We'd love to have you!
1. Clone project repo
git clone https://github.com/hackforla/spare cd spare
2. Create local env variable file
.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
Create the docker group and add your user
Add the docker group
sudo groupadd docker
Add your user to the docker group
sudo usermod -aG docker $USER
4. Build Docker images
5. Run Docker containers
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:
Find the the server container image (probably
copy the container ID.
Next, execute the following command to access the container's bash shell,
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 and create a superuser, 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:
- Admin - http://localhost:8000/admin/
- Browsable API - http://localhost:8000/api/
- API Login - http://localhost:8000/api-auth/login/
- API Docs - http://localhost:8000/docs/
- Client App - http://localhost:3000/
Note: Deployment requires access to associated Heroku apps.
1. Install the Heroku CLI
2. Log in to Heroku via CLI
3. Build containers
Follow setup instructions to build and run all necessary containers.
4. Access client bash shell
Run the following to get ID of client container:
Run the following to access client bash shell:
docker exec -t -i CONTAINER_ID bash
5. Run client build script
From inside the client bash shell, run the following:
npm run build
This will create a production build of the client and copy all necessary files to the server container.
6. Exit client bash shell
Run the following the exist the client bash shell:
7. Log in to Heroku container registry
Run the following to log in to Heroku container registry:
Note: This is specific to the container registry and is required in addition to the Heroku login above.
8. Push container to Heroku registry
Navigate to the project root, and run the following to push the server container to the Heroku container registry:
heroku container:push web --recursive -a spare-production
9. Release server container
heroku container:release web -a spare-production
Product and Design Contributors
Join our #spare Slack channel - http://hackforla-slack.herokuapp.com/
Spare Team is