Giter Club home page Giter Club logo

zed's Introduction

ZED

A minimal clone of X (Twitter) with most of the features of the original service.

Screenshots

Click here for viewing the application screenshots!

Installation

  • First of all clone the project:
git clone https://github.com/EngRobot33/ZED.git
  • Then, we need a virtual environment you can create like this:
virtualenv venv
  • Activate it with the command below:
source venv/bin/activate
  • After that, you must install all the packages in requirements.txt file in project directory:
pip install -r requirements.txt
  • You should install PostgreSQL and its dependecies:

    sudo apt update
    sudo apt install python3-pip python3-dev libpq-dev postgresql postgresql-contrib
  • Now setup your database in PostgreSQL shell:

    • Open PostgreSQL shell:

      sudo -u postgres psql
    • Create database:

      CREATE DATABASE <database_name>;
    • Create user:

      CREATE USER <database_user> WITH PASSWORD '<database_password>';
    • Grant all privileges to zed database user:

      GRANT ALL PRIVILEGES ON DATABASE <database_name> TO <database_user>;
  • Create a .env file in root directory and add your created config like .env.sample:

SECRET_KEY = 'Your secret key generated by https://djecrety.ir'
DEBUG = 'Project debug status'
ALLOWED_HOSTS = 'Host/Domain names list that this site can serve for e.g ['*'] allows all hosts'

DB_NAME = '<database_name>'
DB_USER = '<database_user>'
DB_PASS = '<database_password>'
DB_HOST = '<database_host>'
DB_PORT = '<database_port>'
  • After that, migration:
python3 manage.py migrate
  • Then make sure that Redis is actually running on your machine:
redis-server
  • Now you should install all the packages in package.json file. Just make sure npm is installed:
npm install
  • That's finished! Now you can run the project:
python3 manage.py runserver

Run with docker

git clone https://github.com/EngRobot33/ZED.git
  • Create a .env file in root directory and add your created config like .env.sample:
SECRET_KEY = 'Your secret key generated by https://djecrety.ir'
DEBUG = 'Project debug status'
ALLOWED_HOSTS = 'Host/Domain names list that this site can serve for e.g ['*'] allows all hosts'

DB_NAME = '<database_name>'
DB_USER = '<database_user>'
DB_PASS = '<database_password>'
DB_HOST = db
DB_PORT = <database_port>
  • Make sure to match the database environment variables in docker-compose.yml too and create the database as mentioned before.
environment:
  - POSTGRES_USER=zed_user
  - POSTGRES_PASSWORD=zed_password
  - POSTGRES_DB=zed_database
#
#
ports:
  - "5432:5432"
  • That's finished! Now you can run the project:
docker compose up -d 

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

zed's People

Contributors

engrobot33 avatar saeedpoureshghi avatar mrn-19 avatar reihanyaghoobzade avatar erfan-rfmhr avatar chashtager avatar armantaherighaletaki avatar errfunm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.