Skip to content

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

Notifications You must be signed in to change notification settings

jamesgpearce/learn-anything.xyz

 
 

Repository files navigation

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

Contents

Current tasks to do are in todo.md (sorted by priority).

Ask questions on Discord if interested in developing the project or you get issues with setup.

File structure

Tech stack is described in docs/tech-stack.md.

Setup

Everything is driven using bun commands as part of monorepo setup using bun workspaces.

First run:

bun i
bun dev-setup

bun dev-setup will git clone seed repo. It's needed for some commands below to work.

Setup EdgeDB

Warning Instructions might break, will be reviewed before first LA public release

Install EdgeDB by running curl .. command from EdgeDB website. It is used as main server database.

Then run:

bun db:init

Follow instructions, name EdgeDB instance learn-anything.

Run bun db:ui. This will open EdgeDB graphical interface where you can run queries or explore the schema.

Run below command to apply the schema defined in default.esdl on your local DB:

bun db:watch

Then, generate EdgeDB-TS bindings with:

bun db:ts-generate

Run GraphQL server (Grafbase)

Warning Instructions might break, will be reviewed before first LA public release

Before running Grafbase server, create file at grafbase/.env with this content:

EDGEDB_INSTANCE=learn-anything
EDGEDB_SECRET_KEY=edbt_ey

EDGEDB_SECRET_KEY can be gotten by running bun db:ui which will open the EdgeDB UI.

In terminal after running above command you will see url like http://localhost:10700/ui?authToken=edbt_ey. EDGEDB_SECRET_KEY is the authToken content.

Then run:

npx grafbase@latest dev

Note Ideally bunx is used but bun api fails to run

Will start Grafbase locally and give you GraphQL access.

Visit http://localhost:4000/ to see Grafbase pathfinder

Run website (Solid)

Warning Instructions might break, will be reviewed before first LA public release

Create .env file inside website with this content:

VITE_HANKO_API=https://e879ccc9-285e-49d3-b37e-b569f0db4035.hanko.io
API_OF_GRAFBASE=http://127.0.0.1:4000/graphql

Hanko is used as auth provider. You can swap Hanko API variable content with one from a project you create yourself.

Run:

bun web

Open http://localhost:3000

Run desktop app (Tauri/Rust)

Warning Instructions might break, will be reviewed before first LA public release

bun app

Contribute

Current tasks to do are in todo.md (sorted by priority).

If task/bug is not mentioned there, open a GitHub issue or start a discussion.

Join Discord to get any help you need to make your contribution.

All PRs with improvements to docs/code or contributions to existing discussions/issues are welcome.

Docs

All docs can be seen in docs.

It is advisable you read them, before you start developing anything as they try give 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 docs/dev-tips.md for some advice on development.

Commands

Ran with bun <Name>

Name Command
seed-clone git clone https://github.com/learn-anything/seed
seed-update cd seed && git pull
dev-setup bun seed-clone
app cd app && bun tauri:dev
web cd website && bun dev
web:build cd website && solid-start build
web:start cd website && solid-start start
db cd edgedb && tput reset && bun --watch cli/cli.ts
db:init cd edgedb && edgedb project init
db:ui cd edgedb && edgedb ui
db:watch cd edgedb && edgedb watch
db:migrate cd edgedb && edgedb migration create && edgedb migrate && bunx @edgedb/generate edgeql-js --target ts
db:ts-generate cd edgedb && bunx @edgedb/generate edgeql-js --target ts
api bunx grafbase@latest dev
api:codegen graphql-codegen
ts tput reset && bun --watch run.ts
test-rust-wiki cd app/src-tauri/crates/wiki/ && cargo watch -q -- sh -c "tput reset && cargo test -q --lib"

♥️

MIT Twitter

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.4%
  • Rust 1.4%
  • Other 0.2%