Giter Site home page Giter Site logo

learn-anything / learn-anything Goto Github PK

View Code? Open in Web Editor NEW
15.5K 429.0 954.0 950 KB

Organize world's knowledge, explore connections and curate learning paths

Home Page: https://learn-anything.xyz

License: MIT License

TypeScript 77.86% CSS 0.30% JavaScript 7.86% EdgeQL 12.96% HTML 0.49% Rust 0.53%
edgedb grafbase graphql solid rust tauri

learn-anything's Introduction

Learn-Anything.xyz

Organize world's knowledge, explore connections and curate learning paths

End goal of Learn Anything is to become the best place and tool for keeping track of what you know. What ideas you have. What you want to learn next. What you don't know yet. And how you can learn that in most optimal way possible given what you know already.

Try website yourself first to get feel for it.

It is fully open source project with active community on Discord. There is great focus on both DX of developing everything LA and even more, end user UX.

Contents

Files

  • api - Grafbase GraphQL API layer + EdgeDB
  • app - desktop app built with Tauri/Solid
  • cli - clis for internal/external use
  • shared - shared TS functions (can be used by any part of monorepo)
  • website - learn-anything.xyz website code in Solid

Setup

PNPM is used to manage dependencies. Bun is used to run things.

pnpm i
bun setup

bun setup runs bun cmd.ts setup (see cmd.ts code for what it does). In short it will setup the project ready for development with all the deps, .env files necessary. Together with working EdgeDB database. Just follow instructions in the setup script.

All next actions assume bun setup was done correctly, you will receive Setup completed after bun setup completes succesfully.

All commands you can run are seen here. Below goes over important ones.

Warning

If you get any problems with setup, reach out on Discord

Run GraphQL server (Grafbase)

bun grafbase

Then open http://localhost:4000 either in browser or Pathfinder.

Run website (Solid)

bun web

Then open http://localhost:3000 in browser.

Contribute

Always open to useful ideas or fixes in form of issues or PRs.

Current issues are organised with labels. Issues currently in focus are labeled with Current Month label.

If issue is not already present (do search first), open new issue, start discussion or ask about it on Discord.

It's okay to submit draft PR as you can get help along the way to make it merge ready.

Any issues with setup or making your first feature or trying to fix a bug will be resolved asap. Same goes for discussing ideas on how to make the tool even better than it is now.

Docs

All docs can be seen in docs.learn-anything.xyz.

It is advisable you read them, before you start developing anything as they provide a lot of context and general knowledge.

There is big focus on documentation and clarity in the project. All code should be clear and understandable and well documented.

Check Dev Tips for some advice on development together with tech stack explanation.

Design

All design is done in Figma and FigJam.

If you're designer and want to help out or have ideas, mention it on Discord's #design channel.

Tasks / Explore

There is separate repo of tasks with goal to take the tasks used in LA and generalise it for use by community.

Together with explore for prototyping of various kind.

Commands

bun setup

bun cmd.ts setup

Fully sets up LA for development (website, desktop, mobile, api, ..).

bun web

cd website && bun dev

Run website.

bun app

cd app && bun tauri:dev

Run desktop app built with Tauri.

bun cli

cd api/edgedb && bun --watch ../../cli/cli.ts

Run CLI to quickly execute TS code (run queries and more..).

bun db:ui

cd grafbase/edgedb && edgedb ui

Open EdgeDB UI to run queries and more.

bun grafbase

bun cmd.ts grafbase

Run Grafbase in development mode.

bun graphql

bun cmd.ts graphql

Generate queries for GQL client.

bun cmd

bun --watch cmd.ts

Run command in cmd.ts

bun ios

cd mobile && pnpm run ios

Run mobile app with Expo.

🖤

Discord X

learn-anything's People

Contributors

nikitavoloboev avatar thetarnav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learn-anything's Issues

[LA-15] Make topic connector visual tool

  • graphical tool similar to https://tldraw.dev

    • that will show user topics they have in their wiki
      • showing all topics (as nodes) in one large canvas
    • then let you make connections by drawing arrows between nodes (topics)
    • those arrow connections are stored in front matter of markdown files of the topic
      • or can be stored in .la folder in the vault as metadata
        • can then be synced to server where LA takes the topic connections and uses it to make the global graph of topics and connections from all the user submitted topics + connections

    Useful

  • tldraw docs: https://tldraw.dev

  • https://github.com/uber/react-digraph

  • react-flow-diagram - Batteries included React Component for rendering, creating and editing Diagrams.

  • react-diagrams - Super simple, no-nonsense diagramming library written in react that just works.

  • React Flow - Library for Rendering Interactive Graphs. (HN) (Article)

  • React Flow Chart - Flexible, stateless, declarative flow chart library for react.

From SyncLinear.com | LA-15

[LA-69] Personal user guides

  • currently there is only GlobalGuides available
  • add button to each topic for Create Guide
    • it will then let users create their own guides with sections and links inside
    • they can publish the guides or keep them private
      • perhaps better is give ability to create both a private guide and a public guide separately for each topic

CleanShot 2023-11-06 at 16.14.16@2x.png

  • in settings per topic, it can be specified that a personal guide is preferred to be shown over global guide (remember preference)
  • show currently doing links in the main topic pages
    • so its easy to see progress on topic by just going to topic page

From SyncLinear.com | LA-69

[LA-61] Add journal support to wikis

  • users can come to Journal tab and start writing their thoughts
    • they can mark what part of the journal they want public, by default it is private
  • users can add integrations such as X or Instagram
    • it will then grab posts made on these platforms and inline these posts as part of journal entry for that day for the user
    • native LA user posts are included too
    • give users full control over what they want included

Inspiration

From SyncLinear.com | LA-61

Profile page

  • profile page should
    • show links users have in some table or similar UI
      • status: bookmark / in progress / completed
      • liked
    • allow for filtering of table
      • show links of certain status only
      • only links that are liked
      • links of a certain main topic
    • allow search for links
      • search for all links by default
      • be able to search for links of certain status or main topic
        • perhaps the search adapts to what is shown in Links table UI
      • search should allow to quickly
        • open the URL in new tab
        • open a modal or something with the link to be able to edit details of it (description, notes, year, title, url)
        • copy the URL to clipboard to share it (not as necessary)
      • show history of past searches (not super necessary), maybe have a button on side of search input to achieve this
    • the links that are shown in the list/table should show always
      • title / url / description / note (personal notes of user for the link, maybe show?) / year
      • when clicked on the link, it should expand and show all details
      • the details should be editable
        • currently links have these details: title/url/description/main-topic/year/
          • also verified (means link is officially verified as part of LA) (can skip for now)
          • also related links (not implemented yet, can be skipped) (related links means for example a link may have a twitter link attached discussing it or reddit/hn discussion)
      • the way LA stores links is that there is GlobalLink that is mapped to unique URL, when user starts tracking a link in any way, it's a PersonalLink. PersonalLink wraps around unique GlobalLink and allows users to add custom title/url/description/year but it is done on top of GlobalLink details
        • when users add a link through Add Link modal in profile, PersonalLink gets created and if the URL already exists in GlobalLink, then it will be connected to PersonalLink, if not, a new GlobalLink is created with verified: false
    • show topics users are tracking
      • topics that are set to to learn, learning, learned (show in order of learning, to learn, learned if showing all in one scrollable view)
      • clicking on topic should expand to show links inside the topic, ordered ideally by status
        • so first links that are learning, then to learn, then learned
        • in similar table UI view that show all links works in
    • add link button that shows modal of adding new link (unless there is better way to add new links)
      • adding new links involves
        • url is required (when URL is entered, we automatically fill the title that we get back) (should we block Title when we are fetching the Title?)
        • title of the url (required)
        • description (not required)
        • main topic (each url optionally can have a main topic attached) (when entering main topic, we can provide search suggestions for existing topics we have in LA)
        • year (not required)
        • status (by default it's bookmark, but can choose in progress or completed
        • liked or not liked (perhaps it should be favorite)
    • all above should be considered to be designed as if it is done on a public profile page
      • i.e. learn-anything.xyz/@nikita
      • have profile photo somewhere? similar to twitter.com/username
      • by default all activity is public on LA (in future we will allow to hide certain activity, i.e. allow adding private bookmarks) (for now all is public)
  • other (to organise)
    • allow adding of links
      • progress state by default is bookmark
      • show which fields are required
      • add personal link to database
    • fix search for all links (include everything)
    • allow expanding of topic to see the links tracked inside
      • order from doing to bookmark to completed
    • allow assigning comments to links
    • add using, similar to liked, put it to right of it and allow adding a note
    • global keybinds to add links
    • when you submit new link and there is error, focus is dropped from input after toast is shown, should not happen
    • cmd+return should submit new link
    • add optional year to links
    • add notes to personal links
    • add info thing on some entries in new link like what main topic is
    • bring back search
    • all links tracked are PersonalLinks
    • main topic on adding is not necessary, will be added to inbox without topics
    • blocked by https://discord.com/channels/841451783728529451/1190946538122379285. resolve
  • deploy existing changes to prod
    • have PersonalLink and GlobalLink components, make clicking on status of each work
    • should render /topic pages

[LA-38] Read/write of markdown files with Rust/Tauri/Solid

  • check how to read/write to files with rust on tauri side
  • load in file content into editor (monaco or codemirror)
  • allow edits of editor, on changes, update the file content in file system
  • potentially makes sense to have local SQLite db that stores all local content
    • have that SQLite db be fully reactive
      • if change is made to SQLite, it will send appropriate file system actions to update file system state
  • the local SQLite state is responsible of mapping the .md files into Topics of users
    • Topic is mapped to a file
    • there should be a way to use LA app without attaching to a file system if users want in theory

From SyncLinear.com | LA-38

[LA-41] CLI users can use to do various things

  • example use cases
    • grab current open URL in Safari/Chrome/.. and add it as personal link bookmark
    • grab current open URL in Safari/Chrome/.. and get the summary of the link (either fetch existing summary from DB, or create summary live, show to user and attach generated summary to link in db)
  • ideally have the CLI be written in Rust for faster responses and no need of bundling Bun runtime etc.
    • we will be using a lot of Rust already in Tauri so should allow us to move fast too in case we need to add features to CLI fast

Inspiration

From SyncLinear.com | LA-41

[LA-102] Add `Inbox` and `Top Inbox` for links (maybe notes too) (with API)

  • the goal is that this is a stack of links users can add links to either via API or in some other way
    • that they can later organise appropriately
  • either as part of the desktop app or as part of CLI, users can trigger CLI or desktop global hotkey
    • and it will take the current open URL in browser (safari/chrome/..) and it will push the link into Inbox or Top Inbox depending on the hotkey
      • LA can run some AI/processing to make sense of the link and automatically suggest a topic etc. + summary

From SyncLinear.com | LA-102

Focus

  • New website design: LA-130
  • iOS mobile app release (TestFlight): LA-135
  • Desktop app release: LA-37
  • Questions / Answers (with AI): LA-114

Other Issues

All issues can be seen here. Below are list of smaller issues that might not need a whole issue opened for them.

Code

Website

Other

[LA-30] Look into using wasmCloud for more persistent backend services

  • currently all API is served with Grafbase that runs on top of Cloudflare workers
    • Grafbase only accepts TS currently (in future it should allow Rust too)
  • we need a way to run various services in a managed environment like Kubernetes but without all the complexity of Kubernetes
    • wasmCloud is that but you need to compile your code into WASM
    • wasmCloud has ability to run Python code too in theory
  • setup a wasmCloud cluster that we can use to run all kinds of code that we don't need to expose directly to use in Grafbase
    • examples:
      • process data from prod EdgeDB, clean it up, update EdgeDB with cleaned data
      • stream live data from prod EdgeDB and use it to feed a training run or fine tuning of large LLMs to setup AI interfaces we can use

Useful

From SyncLinear.com | LA-30

[LA-71] Add Google OAuth

  • make sure that it works without any issues with existing email passkey sign in
  • make sure it gets you the same hanko id
    • google oauth is potentially extra useful for mobile sign up, so users don't have to go to email client, get the code etc which is bit annoying to do

Implementation

From SyncLinear.com | LA-71

[LA-54] One `bun setup` command to setup everything. To be able to start writing/changing code immediately

  • There is bun setup command available but currently it requires user to install bun on their computer
    • and also it only sets up cloning seed folder and adding .env files
    • it does not install EdgeDB for users nor does it setup the database
    • nor does it fill EdgeDB with content necessary
      • filling of EdgeDB content can be done by writing .ts script that using the content inside seed repo cloned, will connect to local edgedb created, then fills it with content like topics, connections, default user etc.
      • everything should be abstracted fully so it's literally just bun setup, then bun run api bun run website and open localhost:3000 to start hacking away. same goes for app/mobile/ai etc.
  • can setup devenv to make one command install work by providing users with bun and edgedb CLIs installed and working in their env. but Nix does not work on Windows I think, perhaps we fallback to something else for Windows case

From SyncLinear.com | LA-54

[LA-64] Image uploader/organiser

  • similar to Cosmos or Pixave allow users to upload images/photos they have
    • each image gets automatic shareable URL if they want image to be public
  • images can be sorted into collections
    • collections can be public/private
    • collections can be marked as paid and have a price for unlock
  • images uploaded can be used easily inside wikis simply by referencing the image name using some syntax like {{ or similar

Implementation

From SyncLinear.com | LA-64

[LA-42] Add localisation

  • need a localisation solution that does not slow us down on feature development
    • localisation tooling should be seamless
  • Inlang provides such solution, integrate it, check that implementation is smooth
    • support both Solid and React Native
  • support most common languages needed (check analytics for what users LA has from which countries and go through the list)
  • English is main version and large focus is on making it default work great
  • any non English language (in case users want to use non English versions should be provided as opt in, don't predict to use non English version based of location of user accessing the website, just ask user for first time if they want the website localised to their language, if they say no, don't ask again and use English)

From SyncLinear.com | LA-42

[LA-46] Improve monorepo setup (code sharing, better DX)

Useful tools

  • https://turbo.build
  • https://nx.dev
  • allow sharing code from packages folder at root everywhere else, with ability to deploy code seamlessly too
  • vercel/turbo#620
    • for potentially aliasing paths but maybe not needed
  • VSCode sometimes does not automatically suggest imports from shared packages folder
    • also imports use relative imports like ../../packages/. should be ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/packages maybe instead (perhaps, not sure)

From SyncLinear.com | LA-46

[LA-105] Allow rendering of components inside pages

  • essentially mdx

  • you can do this inside markdown:

    <Gallery url="" />
    
    <Tweet id="" />
    
    <SpotifySong id="" />
    
  • and on publishing of the page, it will render out the solid component

  • there will be an official repo where community can add/contribute components

  • security should be taken care of too, for example if we allow <Gallery url="" , there might be issues trying to fetch arbitrary URL from some server

    • perhaps iframe has to be used?
      • if iframe is used, make sure viewers of published content, don't know its an iframe at all, it seamlessly works with other elements on the wiki page
    • potentially one other security fix can be to proxy requests through LA servers (to make sure they are safe)

From SyncLinear.com | LA-105

[LA-99] Publish notes into a wiki from desktop app

  • members can choose a username
    • then each of the topics inside the app, they can press Publish button on and it will publish their topic to learn-anything.xyz/@username/topic
  • profile page for the user wiki should be updated too
  • wiki style is very similar to wiki.nikiv.dev
  • in profile page of website, allow users to set their preferred username once they become a member
  • also in the profile page, have a button saying Download desktop app

From SyncLinear.com | LA-99

Questions / Answers (with AI)

Goal

image.png

image.png

Old (most likely not fully applicable)

  • use edgedb vector store
  • allow users to bring in own API to use (for various models) (include in metadata for Q/A pair)
    • link to GitHub code and ensure safety of the API key, nothing is stored on LA backend in regards to the key

How

Consider

New website design

  • dev.LA deploy branch
    • grafbase can't deploy to cloud
    • connect
  • make all designs work (pricing/auth/landing/global-topic)
    • / route works fully. data in, mutations work

[LA-58] VSCode extension + Snippets support

  • once LA supports adding snippets of code to wikis
    • can then have VSCode extension that will allow inserting the snippets fast
    • + have API to retrieve/add snippets
  • with LA app having a section inside that allows edits of the snippets fast
  • in future, maybe create LLM that is trained on large code corpus but also user snippets that users have submitted to LA (if they allow their snippets to be used for training/fine-tuning the LLM)

From SyncLinear.com | LA-58

Write scraper for hn/lobsters/..

Consider

Ref

[LA-70] Allow managing of contacts

  • serve the use case of Contacts app
    • be able to create a contact for a person
    • be able to import and sync from contacts in Apple Contacts
  • allow searching of contacts via Raycast extension by tag/name/details
  • allow specifying that you met the person and when
  • allow easily adding notes for the person met
  • allow LA inferring their location by scraping their social media

From SyncLinear.com | LA-70

[LA-100] AI summaries on links

  • have a ✨ button on each of the links that will show high quality summary for any given GlobalLink
    • generate summary in some way, perhaps using GPT4-Turbo or something else. AI summaries should be of high quality

How

  • Chain of Density is amazing for this
    • Remi from outlines said he is working on example that does this with outlines

From SyncLinear.com | LA-100

[LA-27] ChatGPT interface to user wikis

  • take user wiki content, vectorise it
  • then provide chat ui with different privacy levels (public/friends/..)
  • as users ask questions, have the author of wiki choose answers that are great
    • these answers can be shown as examples for queries that can be asked that are good
  • cache all Q/A so for same questions, deliver results instantly
  • perhaps fine tuning a model is useful for this case? research the best way to do indexing and delivering of great results
  • example query: what is nikita's favorite TS library to do CLIs
    • it will respond with something like nikita uses bun cli arg parser (``[https://bun.sh/guides/process/argv](https://bun.sh/guides/process/argv)``) to write his CLIs
  • allow adding/indexing external content such as all X posts or likes

Implementation

From SyncLinear.com | LA-27

From SyncLinear.com | LA-27

Link collections with shareable URLs

Why

  • i.e. you are doing some research into something and have many tabs open, can run command, get all open tabs, save into collection, get a URL, put it in readme then close the tabs
    • next time you want to go back to problem, have ability to restore the session (open all URLs and continue what you were doing)
  • there are more other use cases for link collections such as simply sharing bunch of links with other people
    • Arc Browser does link collections/folders already, check them out

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.