/csqa_previous_repo

An open source Q&A website for CS learners

Primary LanguageCSS

Edit Dojo

A web app to improve writing skills in any language.

Screenshots

Screenshot 1 Screenshot 2

Inspiration

The inspiration for this came from the lack of these kind of resources. You can find a ton of resources to master reading, listening or speaking a language. But when it comes to writing, there simply aren't much.

How it works

The app will function in these steps:

  1. A user A will sign up with 2 languages, one in which they are proficient(say, English) and the other which they want to learn(say, Japanese).
  2. Then they will write anything they need in, say, Japanese.
  3. A user B, who is proficient in Japanese, will then verify and propose corrections.
  4. Similarly if someone wants to learn English, user A can verify their messages.
  5. Everyone is happy.

Initially the app will be based on twitter, that is, users will be editing tweets. Eventually, you will able to use this app without using Twitter at all!

Waiting list

If you'd like to get an email when this website/app is ready, please sign up to our waitlist here: https://www.csdojo.io/wait

Pre-requisites

We would need following installed in our system before we start with setting up the project in local machine.

  1. Git - This is needed as a version control system. If you don't have this preinstalled in local machine, visit https://git-scm.com/downloads and setup git on local.
  2. Python 3 - We are using Python as a programming language in this project. Mac and Ubuntu have it pre-installed. NOTE: you might have Python 2 on your Mac or Ubuntu. If so, make sure to download Python 3.

Local Setup

  1. Clone this repository into local system and change the directory.
git clone https://github.com/ykdojo/editdojoprivate.git
cd editdojoprivate/
  1. Install pip3 and pipenv.
pip3 install pipenv
  1. Go into the virtual environment:
pipenv install
pipenv shell
  1. Apply migrations
python manage.py makemigrations
python manage.py migrate
python manage.py loaddata languages.yaml
# NOTE: you can produce the same data in languages.yaml with
# python manage.py dumpdata users.Language --format=yaml > languages.yaml
  1. Set up Twitter

For this, first, set up your environment variables.

You can take a look at .bash_profile_sample on how to set them up.

Then, run:

python manage.py shell < setup_twitter.py

On Heroku:

heroku run python manage.py shell

exec(open("./setup_twitter.py").read())
  1. Run the server:
python manage.py runserver <PORT>
OR
python manage.py runserver
  1. Start the application opening the link shown in your terminal on a browser.

  2. To run tests, run the following (in your pipenv environment):

python manage.py test

If it doesn't work right away, you might want to check out this StackOverflow thread.

  1. (Optional) If you do any sort of React development, run the following command:
npm install
npm run watch

More about it here: https://bit.ly/2AIT7MK

Setup Redis-Queue and Background Tasks

  1. Install Dependencies. Run pipenv update if pipfile.lock is out of date.
  2. Make sure your Heroku is set to Hobby Dynos. You can do this in the web console.
  3. Add the redis addon in heroku heroku addons:create redistogo
  4. start up an rqworker python manage.py rqworker in_twitter_queue (in this case, our queue is named in_twitter_queue)
  5. start up worker monitoring python manage.py rqstats
  6. run heroku run python job_scheduler.py --help to schedule / add jobs to the queue. The command line argument is currently WIP.

Resources

This is a part of the series of YouTube videos demonstrating how to build a real startup using Python and Javascript. Useful resources for this project:

Created by

The project was started by: YK Sugi. He's the guy who's running CS Dojo, a programming education YouTube channel.

If you have any questions related to this project, please contact him on our Slack group.