The Wayback Machine - http://web.archive.org/web/20200713034331/https://github.com/learn-awesome/learn
Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
Jul 13, 2020
bin
Nov 15, 2019
db
Jul 13, 2020
Jul 9, 2020
Mar 23, 2019
Mar 23, 2019

README.md

Gitpod Ready-to-Code

LearnAwesome

Chat for users Chat for developers Twitter

Awesome learning resources organized by topics, formats and difficulty. Optimal learning paths for any topic.

This is the code that powers https://learnawesome.org

This is built using Rails 6.0, PostgreSQL, Bootstrap 4 and Stream Dashboard UI Kit.

For development, please come to Gitter. There's also a community chat room.

Development Setup with Vagrant

vagrant up
vagrant provision

# connect to vm
vagrant ssh

# Start the app in vm. Make sure to specify Auth0 creds. Ask us if you don't have your own.
SECRET_KEY_BASE=462487da70bd5a66aa230b387f61737d642b52c7d3b576e93413eddfc25fc8144eb52d19ae42d4bd8c4521f97e53956e0b3d8b4dba587f9edc7e8dbcc5238e8f AUTH0_DOMAIN= AUTH0_PUBKEY= AUTH0_PRIVKEY= rails s -b 0.0.0.0

# To destroy the vm
vagrant destroy

Local install

bundle install
rake db:drop db:create db:migrate db:seed

To import data from the JSON files:

rake import:import['public/data1.json']
rake import:import['public/data2.json']

Set-up caching in dev: rails dev:cache

Start the app with some secrets:

# These two lines are not needed in local development unless you're testing ActivityPub flows
export ACTIVITYPUB_PRIVKEY=`cat private.pem`
export ACTIVITYPUB_PUBKEY=`cat public.pem`

SECRET_KEY_BASE=462487da70bd5a66aa230b387f61737d642b52c7d3b576e93413eddfc25fc8144eb52d19ae42d4bd8c4521f97e53956e0b3d8b4dba587f9edc7e8dbcc5238e8f AUTH0_DOMAIN= AUTH0_PUBKEY= AUTH0_PRIVKEY= rails s

Either use your own Auth0 tenant (which needs some configuration) or contact us to get the values of the above environment variables.

For the admin interface, login at http://localhost:3000/admin/ panel using admin@example.com and password. ★★★☆☆

For graphQL clients, first send the user to https://learnawesome.eu.auth0.com/login?client=h5wMQw9p9MsN53nkY4YeN08mv3Ao1mnB&protocol=oauth2&response_type=token%20id_token&redirect_uri=http://localhost:3000/callback&scope=openid%20profile

After successful login/signup, user.authinfo will have a field called id_token. The value of that token can be used as the Authorization header with Bearer prefix. This ensures that user can only perform permitted operations via graphQL api.

You can’t perform that action at this time.