Minimalistic social network written using Django and React.
-
Accounts and adding friends. Each user has the opportunity to maintain their own blog, subscribe to other people and see their blogs.
-
Dark theme.
-
You can create a conversation and chat with friends.
-
Lazy loading of pages, posts and messages.
-
Browser caching lists of user rooms and first N messages in each room.
Have fun and if you want please leave feedback!
-
Django REST framework
https://www.django-rest-framework.org/ -
django-channels
https://channels.readthedocs.io/en/stable/index.html -
Redis
https://redis.io/docs/ -
Postgres
https://www.postgresql.org/ -
React
https://react.dev/learn -
Docker
https://www.docker.com/
docker-compose up -d
docker-compose run server python manage.py createsuperuser
Postgres.
brew install postgresql@15
brew link postgresql@15
brew services run postgresql@15
createuser -s postgres
createdb postgres --owner=postgres --username=postgres
psql postgres --username=postgres
Redis.
brew install redis
Run redis server in the new terminal window (to use the chat).
redis-server
Install micromamba
brew install micromamba
Run setup.sh
script to create venv, DB migrations, superuser and collect static files.
bash setup.sh
Activate micromamba enviroment.
micromamba activate phils_network
Phils_network supports gunicorn
(with uvicorn
async workers).
bash settings/gunicorn.sh
See phils_network/Services/django/gunicorn.conf.py
for more information about gunicorn configuration.
Then go to the frontend directory phils_network/Front/react/
. Install npm packages.
npm install
By default, django server runs on the 0.0.0.0 host and 8000 port (see phils_network/Services/django/gunicorn.sh
file). So make sure that SERVER_HOST and SERVER_PORT variables in the phils_network/Front/react/src/data/constants.js
file are similar to your backend.
Create production frontend app.
npm run build
Run the frontend app.
npm install -g serve
serve -s build