social networks in their essence.
Crie redes sociais em sua essência. Participe de comunidades "rolls" para consumir e compartilhar fotos. Interaja com outros usuários curtindo suas postagens.
roll social network é um projeto de código livre sob a licença MIT desenvolvido com os frameworks Django e Vue.
in English:
Create social networks in their essence. Join communities "rolls" to consume and share photos. Interact with other users by liking their posts.
roll social network is an open source project under the MIT license developed with the Django and Vue frameworks.
In our social network, a community unit is called roll. Users can join a roll by creating a profile on it. Once associated, the user has access to the timeline and can interact by liking other users' posts, as well as collaborating by publishing their own content.
Entity-relationship model:
Access to our social network rolls requires authentication. To simplify and solve some problems, authentication linked to the customer's phone number was chosen.
UML Diagram:
Advantages of the chosen authentication model:
- Simplicity. The user does not need to set or remember a password or have a recovery email.
- Security. Access can only be done with the verification code sent at each login or by granting it to a third party.
- Real people. We guarantee, in most cases, that the clients is a real person and not a robot. With this we can also have legal applications, since the data uploaded to the social network can be linked to a real person.
Users, after validating the time-based OTP code, can authenticate using just the code generated by the 2FA application.
UML Diagram:
Watcher is a WebSocket solution for real-time state update.
When the MEDIA_PATH_AS_NGINX_ACCEL flag is enabled, the /media/ endpoint responds, for authenticated users, with the status code 201 and with the X-Accel-Redirect header. With this you can protect media files against unauthenticated users.
Read more about X-Accel in the NGINX documentation.
See the concept applied in the NGINX media conf file.
Requirements:
- Python 3.12
- pipenv
- Node.js 20.11
Init ui submodule:
$ git submodule init ui
$ git submodule update --init --recursiveInstall dependencies:
$ pipenv install --dev
$ cd ui/ && npm install --include=devThe default app settings are setted to run locally in development and watch mode.
Init database tables:
$ pipenv run dbmigrateRun Django app web server in watch mode:
$ pipenv run devBuild the Vue app and static style files running the ui package in watch mode:
$ cd ui/ && npm run watchRun pylint:
$ pipenv run lintRun mypy to check typing:
$ pipenv run check-typingRun unit tests:
$ pipenv run testsRun unit tests with code coverage:
$ pipenv run coverage
# print code coverage report
$ pipenv run coverage-reportUsing dockerization and the Docker Compose definition, you can up all containers and services required by roll social network as if it were in production mode.
$ docker compose up --buildServices diagram:
This project follow The Twelve-Factor App methodology so all settings can be defined through environment variables.
All settings were centralized in the settings.py file and can be defined by environment variables due to the python-decople config object.




