ExTABER is a platform where independent investigative journalists can publish their work, create a readership, and potentially monetise their work. The ethos underlying ExTABER is hidden in form of an anagram in its name. The anagram is based on the epistemological viewpoint that free thought must exist Ex Tradition, Aauthority, Eestablished Belief, and Revelation.
The repo can be found on GitHub whilst the deployed APP is hosted on AWS Amplify
The repo can be found on GitHub whilst the deployed back-end is hosted on Render
- Clone this repo into your preferred local directory
- Ensure pip, pipenv, and pyenv are installed locally (install pyenv with brew, pipenv with pip,
and pip with
python -m ensurepip --upgrade
)
Use the following links for more detail on how to install these packages:
- Run
pipenv install
in the project root directory - Install the Doppler CLI and authenticate according to these instructions
- Run the Doppler setup process in the root directory with
doppler setup
- Start the Postgres docker container with
doppler run -- docker-compose up -d
- Verify the postgres container is running by logging in with
psql -h localhost -U admin -d extaber
(use the password stored in the Doppler config) - Run
pipenv shell
to initiate the environment - Ensure the extaber database has all the tables setup by running
doppler run -- python manage.py migrate
- Check that there are no outstanding migrations (there shouldn't be) with
doppler run -- python manage.py showmigrations
- Start the Django dev server with
doppler run - python manage runserver
The API gets deployed automatically if a new commit is pushed to the remote main branch. The render.yaml specifies the build and deployment infrastructure on Render.
This back-end is entirely based on django, django rest framework, and PostgreSQL. It features many-to-many relationships, 5 models, and 19 views.
Verb | URI | Body | Headers | Status Response | Response Body |
---|---|---|---|---|---|
POST | sign-up/ | Credentials | n/a | 201, Created | user details |
POST | /sign-in/ | credentials | token | 201, Created | token |
PATCH | /change-pw/ | credentials | token | 204, No Content | n/a |
DELETE | /sign-out/ | n/a | token | 204, No Content | n/a |
PATCH | /update-user-details/ | username / user image url | token | 200, OK | user fields |
Verb | URI | Body | Headers | Status Response | Response Body |
---|---|---|---|---|---|
GET | articles/ | n/a | n/a | 200, OK | articles |
POST | articles/ | article content | token | 201 | n/a |
GET | articles/search/:search_string/ | n/a | token | 200 | articles |
GET | my-articles/ | n/a | token | 200 | articles |
DELETE | articles/:pk/ | n/a | token | 204 | n/a |
PATCH | articles/:pk | article content | token | 204 | n/a |
GET | article/:pk | n/a | n/a | 200 | article |
Verb | URI | Body | Headers | Status Response | Response Body |
---|---|---|---|---|---|
GET | article-votes/ | n/a | n/a | 200 | votes data |
POST | article-votes/ | vote data | token | 201 | n/a |
GET | article-votes/:pk/ | n/a | token | 200 | net votes |
DELETE | article-votes/:pk/ | n/a | token | 204 | n/a |
Verb | URI | Body | Headers | Status Response | Response Body |
---|---|---|---|---|---|
GET | comments/:pk/ | n/a | n/a | 201 | comments for article pk |
POST | comments/ | comment data | token | 204 | n/a |
GET | my-comments/ | n/a | token | 200 | comments made by user |
PATCH | my-comments/:pk/ | comment update | token | 204 | n/a |
DELETE | my-comments/:pk/ | n/a | token | 204 | n/a |
Verb | URI | Body | Headers | Status Response | Response Body |
---|---|---|---|---|---|
GET | comment-votes/ | n/a | n/a | 200 | comment vote data |
POST | comment-votes/ | comment vote data | token | 201 | n/a |
GET | comment-votes/:pk | n/a | token | 200 | net votes |
- django
- django rest framework
- PostgreSQL
- Heroku
-[ ] server-side filtering needs more features, including boolean search, search for authors, time-period filters, etc
The Kanban for this project can be reviewed on GitHub Projects