Skip to content

PHILIPP111007/phils_network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phils_network

Minimalistic social network written using Django and React.

What supports this app

  1. Accounts and adding friends. Each user has the opportunity to maintain their own blog, subscribe to other people and see their blogs.

  2. Dark theme.

  3. You can create a conversation and chat with friends.

  4. Lazy loading of pages, posts and messages.

  5. Browser caching lists of user rooms and first N messages in each room.


Have fun and if you want please leave feedback!

Technologies used

Production installation

docker-compose up -d

docker-compose run server python manage.py createsuperuser

Development installation

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