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

osintalex/sudan-art

Repository files navigation

forthebadge-creative-commons forthebadge made-with-python forthebadge made-with-javascript React

Note This repository is now archived and has moved to a new home.

Sudan Art - A Revolutionary Web App

A website to help the anti-coup resistance movement in Sudan. See sudan-art.com.

Landing

Table of contents

Background

This site was inspired by the Burmese website Three Fingers, used to support the anti-coup resistance movement in Myanmar.

Technologies

  • Digital Ocean
  • Docker

Backend

  • Python
  • Django
  • Django Rest Framework
  • Django Storages
  • CORS Headers

Frontend

  • Javascript
  • React
  • React testing library
  • React Router
  • Chakra UI

Setup

  1. Clone the github repository
  2. Run pip install -r sudan-art/django-backend/requirements-dev.txt and then pre-commit install to set up the pre-commit hook.
  3. Hit cd sudan-art/react-frontend and npm install to set up the frontend dependencies.
  4. Check the frontend is ok by hitting cd sudan-art/react-frontend and then npm test and select a to run all the tests.
  5. Assuming that goes OK, create a file to contain all the environment variables for the app. Hit touch env to create the file in the root directory of the repository, the same directory you just ran git branch in.
  6. Populate this file. You need the following values:
DJANGO_SECRET_KEY=<make your own secret key>
DJANGO_SETTINGS_MODULE=django_backend.dev_settings
  1. To run python tests, hit python manage.py test sudan_art.tests --settings=django_backend.test_settings
  2. Now from the root directory of the repository, run docker-compose -f docker-compose-dev.yml --env-file env up --build -d. This will take some time, so check there are no basic errors then go have a break
  3. Run docker ps -a to get the id of the django container - it's also the id output by the command above
  4. Run docker exec -it <container id goes here> /bin/bash to get a shell on the Django container
  5. Run python manage.py migrate to run migrations
  6. Run python manage.py test sudan_art.tests to run the test suite
  7. Hit exit to quit your shell session on the Docker container
  8. Navigate to https://localhost:3000 to see the frontend of the site and https://localhost:8000 to see the backend. The frontend can take a while to load so hit docker logs <frontend container id> to check what's going on if you're out of patience

Contributing

Contributions of all kind are very welcome 😍 ! Please read the guide to get started.