Organize world's knowledge, explore connections and curate learning paths
- File structure - make sense of how code is laid out in the repo
- Setup - get started with development
- Run GraphQL server (Grafbase)
- Run website (Solid)
- Run desktop app (Tauri/Rust)
- Contribute - contribute to project effectively
- Docs
Current tasks to do are in docs/todo.md (sorted by priority).
Ask questions on Discord if interested in developing the project or you get issues with setup.
Tech stack is described in docs/tech-stack.md.
- app - desktop app in Tauri/Solid
- docs - all the docs
- edgedb - EdgeDB used as main server database
- dbschema
- default.esdl - EdgeDB schema definining all the models and relations
- migrations - migration files get generated after running
bun db:migrate
- client.ts - exports client to connect with EdgeDB
- topic.ts / user.ts - CRUD functions on models
- dbschema
- grafbase - Grafbase provides GraphQL API layer for all server functions like talking with DB
- resolvers - edge resolvers are server functions exposed with GraphQL
- grafbase.config.ts - Grafbase's config
- lib - shared utility functions
- test - test cases (useful for itereating quickly)
- website - learn-anything.xyz website code in Solid
- components - solid components
- routes - routes defined using file system
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.
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 edgedb 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
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:
bun grafbase
Will start Grafbase locally and give you GraphQL access.
Visit http://localhost:4000/ to see Grafbase pathfinder
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:dev
Warning instructions might break, will be reviewed before first LA public release
bun app:dev
Current tasks to do are in docs/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.
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.