Skip to content

Wyoc/learn-anything

Β 
Β 

Repository files navigation

img

This is the main code-base that powers learn-anything.xyz.

If you want to know more about what we're trying to solve, our plans for the future, how to improve the maps, and more you can check the wiki.

Getting Started

These instructions will allow you to set up your own instance of Learn Anything to develop with.

Dependencies

Elasticsearch is needed for fetching maps and suggestions on the website. On Linux you can download and run it with the following commands.

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.2.tar.gz
tar -zxf elasticsearch-5.5.2.tar.gz
./elasticsearch-5.5.2/bin/elasticsearch

Running

Once you have Elasticsearch up and running you can start your local instance of Learn Anything with the commands below.

git clone https://github.com/learn-anything/learn-anything
cd learn-anything
git checkout contrib
npm run setup
npm start

And then connect to localhost:3000.

The first time it may take a while, since all maps will be added to elasticsearch. After that only npm start will be needed.

Testing

To run automated tests you can use either npm test or npm run test:watch. For now the tests are covering only reducers, action creators, and components.

API

Our API is still work in progress, as there will be more endpoints coming in the future, but for now here's a list of all endpoints.

Note: the full url for any endpoint is [url]/api/[endpoint], for instance if you're developing locally to get a random map you'd use http://localhost:3000/api/maps.

Endpoint Method Parameters Description
/maps GET q get suggestions or a random map
/maps/[id] GET - get map by ID
/maps/path/to/map GET - get map by path

GET /maps

Return a list of suggestions to complete the string in the q parameter. Each suggestion is in the form of:

{
  "key": "markup languages",
  "id": "1507",
  "nodesCount": 3
}

key is the search tag for the map, id is the ID to retrieve it, and nodesCount is the number of nodes present on that map.

If q is not specified a list with one random suggestion will be returned, otherwise a maximum of 10 relevant suggestions are returned.

GET /maps/[id]

Get a specific map by ID. Maps have the following format:

{
  "title": "learn anything - programming - markup languages",
  "tag": "",
  "nodes": [],
  "connections": [],
  "key": "markup languages"
}
  • title is the path to a map
  • tag is a custom tag for searching the map
  • key is the same as tag if tag is specified, otherwise it's the last topic on title
  • nodes a list of the nodes contained on the map
  • connections a list of the connections between the nodes

GET /maps/path/to/map

Get a specific map from its path. The format is the same as the one above.

Contributing πŸ’›

If you want to help, you're stuck somewhere, or just want to have a chat with us, you can join our Slack channel.

Current Team


Angelo Gazzola

Lead Web Developer


Created a complete and working version of the Search Engine + our own mind map render system as React Component


Nikita Voloboev

Oversees curation of mind maps


Curated the entire index of all the mind maps up until this point + helps with making search the best it can be

About

πŸ”ŽπŸ—Ί Search Interactive Mind Maps to Learn Anything

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 82.8%
  • CSS 15.4%
  • HTML 1.7%
  • Shell 0.1%