Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ju-c/social-drf
Simple Social Media App with Django Rest Framework
https://github.com/ju-c/social-drf
api api-rest django djangorestframework djangorestframework-simplejwt drf-yasg swagger
Last synced: 9 days ago
JSON representation
Simple Social Media App with Django Rest Framework
- Host: GitHub
- URL: https://github.com/ju-c/social-drf
- Owner: ju-c
- License: mit
- Created: 2022-11-03T16:49:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-08T01:32:20.000Z (30 days ago)
- Last Synced: 2024-10-12T07:11:18.189Z (26 days ago)
- Topics: api, api-rest, django, djangorestframework, djangorestframework-simplejwt, drf-yasg, swagger
- Language: Python
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Simple Social Media App with Django Rest Framework
The final aim:
- User can register & login.
- User can create posts with photos and videos.
- Other users can comment (with photos and videos) on posts.
- User can follow and/or unfollow another users.
- User can like and/or unlike a post.
- Runs on PostgreSQL backend.
- Tested ([Code coverage](#code-coverage)).**It is not meant for production**,but just provides some starting points for building a real-world project.
## Running Social DRF on your local machine
You must have `Docker` and `Docker Compose`.
If it's not the case:
- [Install Docker](https://docs.docker.com/engine/install/)
- [Install Docker Compose](https://docs.docker.com/compose/install/)Run `docker-compose`:
```bash
docker-compose build
```
Then
```bash
docker-compose up -d
```
Execute management command inside docker-compose
```bash
docker-compose exec social-drf python manage.py makemigrations
docker-compose exec social-drf python manage.py migrate
docker-compose exec social-drf python manage.py createsuperuser
```
Then
```bash
docker-compose down
docker-compose up -d
```now you can open the browser to http://localhost:8000/api/v1/swagger/ to view the project documentation.
## Code Coverage
Social DRF has a code coverage of **91%**.
To run code coverage inside docker:
```bash
docker-compose exec social-drf coverage run --source='.' manage.py test
```
You can see the report by typing the following command:
```bash
docker-compose exec social-drf coverage report
```