Browser Extensions Development
Feedcrunch is an open-source alternative to content management and sharing platforms like: Pocket or Buffer.
The main features are:
- Sharing any web pages on the social networks in a second:
- Slack (Multi-Team and Multi-chanel)
- Saving your readings and easily finding them back with our search engine.
- Subscribe to as many RSS/Atom feeds you like in the platform
- Obtain recommendations based on your readings and shares. Only read the most revelant news every day.
- Obtain insights on the popularity of your posts and construct a social reputation.
- Create a profile which aggregate every social profile you have to be easily found.
Feel free to submit issues and enhancement requests.
Please have a look to the Contributing Guidelines first.
We follow the "fork-and-pull" Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request so that we can review your changes
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
The project is released under the GNU Affero General Public License v3.0, which gives you the following rights in summary:
Permissions | Limitations | Conditions |
---|---|---|
Commercial use | Liability | License and copyright notice |
Distribution | Warranty | Disclose source |
Modification | Network use is distribution | |
Patent use | Same license | |
Private use | State changes |
- Create a PostgreSQL database
- Create a RabbitMQ database
To my opinion, the Python distribution from Continuum Analytics Anaconda is an absolute go-to: https://www.continuum.io/downloads. You can download this version and install it.
mv .env.dist .env
- DATABASE_URL: Format the PostgreSQL credentials as followed: postgres://user:password@server:port/dbname
- RABBITMQ_URL: Format the RabbitMQ credentials as followed: amqp://username:password@server:port/instance_name
- SECRET_KEY: Django needs a secret key to operate securely, you can generate one here: Secret Key Generator
- DEBUG: True/False. Absolutely needs to be at False to put into production.
- AWS_USER: See documentation from AWS, it needs to have rights for SES (emails) and S3 (storage).
- AWS_SECRET_KEY: See documentation from AWS, it needs to have rights for SES (emails) and S3 (storage).
- EMAIL_DEFAULT_SENDER: The email used when the platform send emails to customers
- FIELD_ENCRYPTION_KEY The encryption key used to encrypt hashes and API Keys inside the database, can be generated with the command: python manage.py generate_encryption_key
pip install virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
pip install virtualenv
virtualenv venv
venv\Scripts\activate.bat
scripts\win\install_dependencies.bat
# Linux
source venv/bin/activate
# Windows
venv\Scripts\activate.bat
# Then
python manage.py makemigrations
python manage.py migrate
python manage.py createcachetable
python manage.py loaddata feedcrunch_dump.json # This operation loads fixtures in the database and can take a few minutes.
# Linux
source venv/bin/activate
# Windows
venv\Scripts\activate.bat
# Then
python manage.py createsuperuser # Fill in your information
Once installed, the application needs a few parameters to manage the behaviour of the platform.
Please access the following address and login with the superuser account created before: (http|https)://server-ip:port/admin/ Once logged-in, you need to open the Options setting under Feedcrunch.
If not created, the following settings need to be created. Else, you can just modify the value accordingly to your needs.
- display_user_count: (Default: False) Control if the application shows in the footer the number of post (False) or subscribed users (True).
- freemium_period: (Default: False) Control if the application run in freemium or normal (not implemented yet, only freemium supported).
- max_articles_on_interest_sub: (Default: 5) Maximum of old RSS Posts added when a user add an interest during onboarding.
- max_recommendations: (Default: 100) Maximum of recommendations made to user on the recommendation pane.
- max_rss_posts: (Default: 25) Maximum of old RSS Posts added when a user subscribe to a new RSS Feed.
- facebook_app_id: Can be obtained on the Facebook developer platform: https://developers.facebook.com/
- facebook_app_secret Can be obtained on the Facebook developer platform: https://developers.facebook.com/
- linkedin_client_id: Can be obtained on the LinkedIn developer platform: https://developer.linkedin.com/
- linkedin_client_secret: Can be obtained on the LinkedIn developer platform: https://developer.linkedin.com/
- mailchimp_client_id: Can be obtained on the Mailchimp developer platform: https://developer.mailchimp.com/
- mailchimp_client_secret: Can be obtained on the Mailchimp developer platform: https://developer.mailchimp.com/
- slack_client_id: Can be obtained on the Slack developer platform: https://slack.com/developers
- slack_client_secret: Can be obtained on the Slack developer platform: https://slack.com/developers
- twitter_consumer_key: Can be obtained on the Twitter developer platform: https://dev.twitter.com/
- twitter_consumer_secret: Can be obtained on the Twitter developer platform: https://dev.twitter.com/
# Linux
source venv/bin/activate
# Windows
venv\Scripts\activate.bat
# Then
python manage.py runserver 0.0.0.0:5000 # Launch the server accessible from the LAN on the port 5000 at the IP-Address of the server.
# Linux
source venv/bin/activate
# Windows
venv\Scripts\activate.bat
# Then
coverage run manage.py test
coverage report -m
coverage html
Since Celery 4.0, the workers only work on linux, to launch them use the following commands:
################## In Debug mode ##################
# launch Worker
celery worker -A application -l debug --events
# launch heartbeat
celery beat -A application --loglevel=debug --detach
# launch camera
celery events -A application --loglevel=debug --camera=django_celery_monitor.camera.Camera --frequency=2.0 --detach
################## In Production mode ##################
# launch Worker
celery worker -A application -l info --events
# launch heartbeat
celery beat -A application --loglevel=info --detach
# launch camera
celery events -A application --loglevel=info --camera=django_celery_monitor.camera.Camera --frequency=2.0 --detach
You will need to set environment variables as followed:
The travis deploy script is set to create a release on github whenever a new tag is pushed. Thus, you need to create a github token and set it in travis in an encrypted fashion.
When a build is successful, Travis push on production/development environment which runs on CloudFoundry hosted by IBM Bluemix. This is controlled by the branch being updated. Please confer to Bluemix documentation to gather the correct settings. They can also easily be changed for any cloudfoundry-based hosting service (e.g. Heroku).
Non encrypted environment vars that need to be set:
Key | Value |
---|---|
ARTIFACT_NAME | 'release_filename.zip' |
BLUEMIX_USERNAME | '[email protected]' |
BLUEMIX_API_GATEWAY | 'https://api.eu-gb.bluemix.net' |
BLUEMIX_API_ORGANISATION | 'MyFantasticOrganisation' |
BLUEMIX_API_SPACE | 'MyEnvironment' |
Encrypted environment vars that need to be set:
Key | Value |
---|---|
SECRET_KEY | '##############################################' |
AWS_USER | '##############################################' |
AWS_SECRET_KEY | '##############################################' |
FIELD_ENCRYPTION_KEY | '##############################################' |
BluemixPassword | '##############################################' |
GITHUB_OAUTH_TOKEN | '##############################################' |
There are also other environment variables, however they do not require to be changed:
Key | Value |
---|---|
RABBITMQ_URL | 'amqp://guest:guest@localhost:5672/' |
DATABASE_URL | 'postgres://postgres:@localhost:5432/travisci' |
DEBUG | 'True' |
TRAVIS | 'True' |
EMAIL_DEFAULT_SENDER | '[email protected]' |