Minimalistic social network written using Django, FastAPI 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.
-
Markdown posts and messages support.
-
You can send and download files.
-
You can see your Ethereum wallet (you need to pass
ethereum addressandinfura api keyin user settings). -
You can send ETH to your friends.
-
Message image preview in the chat.
-
You can add a photo to your account.
-
You can reply to messages.
-
You can take part in video conferences.
User Agreement (by using the Service, the User confirms that he/she has read and accepts the terms of this Agreement)
Have fun and if you want please leave feedback!
-
FastAPI
https://fastapi.tiangolo.com/
-
Django REST framework
https://www.django-rest-framework.org/
-
Postgres
https://www.postgresql.org/
-
React
https://react.dev/learn
-
Docker
https://www.docker.com/
-
Minio
https://min.io/
docker-compose up
docker compose up --build
docker-compose run django python manage.py createsuperuserThen go to http://0.0.0.0/
Go to http://0.0.0.0/admin_page/ to see django admin page
Go to http://0.0.0.0:8080/docs to see Swagger documentation
If you are hosting this site, then go to Front/react/src/data/constants.js and replace SERVER_HOST with your server IP
To run tests, use:
docker compose run -e TEST=1 --build fastapi pytest
# or
export TEST=1
cd Services/fastapi
pytest
# or
make testmake create_env
make test
make django
make fastapi
make reactThen go to http://localhost:3000/
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=postgresRedis.
brew install redisRun redis server in the new terminal window (to use the chat).
redis-serverInstall micromamba
brew install micromambaRun setup.sh script to create venv, DB migrations, superuser and collect static files.
bash setup.shActivate micromamba enviroment.
micromamba activate phils_networkPhils_network supports gunicorn (with uvicorn async workers).
export DEVELOPMENT=1
cd Services/django
python manage.py migrate
bash gunicorn.shFastAPI:
export DEVELOPMENT=1
cd Services/fastapi
uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 1
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 8080 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/app/data/constants.js file are similar to your backend.
Create production frontend app.
VITE_DEVELOPMENT=1 npm run devHome page:
Chat page:
Video:


