{"id":21624105,"url":"https://github.com/xkonti/learning-surreal","last_synced_at":"2025-11-07T05:01:49.260Z","repository":{"id":248949428,"uuid":"830268458","full_name":"Xkonti/learning-surreal","owner":"Xkonti","description":"Schema and queries from the series of livestreams about SurrealDB","archived":false,"fork":false,"pushed_at":"2024-09-13T05:39:38.000Z","size":204,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-06T13:43:59.565Z","etag":null,"topics":["astrojs","database","livestream","surrealdb","tutorial"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/playlist?list=PL5AVzKSngnt_xPGNuYdrbB7NZtJbQ046a","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xkonti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-18T00:19:01.000Z","updated_at":"2025-03-01T02:37:01.000Z","dependencies_parsed_at":"2024-07-18T03:46:33.886Z","dependency_job_id":"c921ed0c-efca-4590-82f8-14c45e3f3972","html_url":"https://github.com/Xkonti/learning-surreal","commit_stats":null,"previous_names":["xkonti/learning-surreal"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Xkonti/learning-surreal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xkonti%2Flearning-surreal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xkonti%2Flearning-surreal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xkonti%2Flearning-surreal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xkonti%2Flearning-surreal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xkonti","download_url":"https://codeload.github.com/Xkonti/learning-surreal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xkonti%2Flearning-surreal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279136475,"owners_count":26111546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astrojs","database","livestream","surrealdb","tutorial"],"created_at":"2024-11-25T00:22:54.129Z","updated_at":"2025-10-16T01:31:57.710Z","avatar_url":"https://github.com/Xkonti.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learning SurrealDB\n\nA repository for holding the surreal queries used in the learning process of SurrealDB. You can watch the livestreams [on my YouTube playlist](https://www.youtube.com/playlist?list=PL5AVzKSngnt_xPGNuYdrbB7NZtJbQ046ai).\n\nEach stream has its own folder with the queries used in the livestream.\n\n## Stream 1 - Learning the basics\n\nIn the first stream, we learn the basics of defining tables and fields, went over various data types and learned to query them.\n\n[Watch the livestream](https://youtube.com/live/R6XUS8aLLhQ?feature=share)\n\n## Stream 2 - Learning relations\n\nIn the seconds stream, we learn about the graph relations.\n\n[Watch the livestream](https://youtube.com/live/RLFR6Bl2I2M?feature=share)\n\n## Stream 3 - Designing schema\n\nIn the third stream, we designed a schema for [my blog](https://xkonti.tech).\n\n[Watch the livestream](https://youtube.com/live/Jb18brBK660?feature=share)\n\nThe finished schema diagram:\n![Finished schema diagram](/stream_3/surrealdb_stream_3_diagram.png)\n\n## Stream 4 - Authentication via JWTs from Clerk\n\nIn the fourth stream, we learn how to authenticate users using third-party authentication providers like Clerk. We also learn how to automatically create user record when the user is authenticated for the first time and keep it up to date afterwards.\n\n[Watch the livestream](https://youtube.com/live/L6J5v5ypZRg?feature=share)\n\n## Stream 5 - Permissions deep dive\n\nThe fifth stream focuses on the permissions system in SurrealDB. We learn how to use the `PERMISSIONS` clause and discover it's limitations. We also discover how events allow us to perform actions with elevated privileges. This led us to implementing automatic counting of likes and comments and ensuring complex requirements of comment approvals.\n\n[Watch the livestream](https://youtube.com/live/Nyx2PXOGQmU?feature=share)\n\n## Stream 6 - Permissions - continued\n\nDuring this stream, we continue to explore the permissions system. We implement a view table that allows us to expose only partial post data to the users while increasing the performance of various queries.\n\n[Watch the livestream](https://youtube.com/live/3yO4iSBApvI?feature=share)\n\n## Stream 7 - Update to 2.0.0-beta.1 and test data generation\n\nThis stream covers the updates introduced in the 2.0.0-beta.1 release of SurrealDB. We explore some of the new features by updating and completing the existing schema. Then we move on to writing queries that generate tons of test data and connect it all together. We finish the stream by completing the \"permissions\" adventures.\n\n[Watch the livestream](https://youtube.com/live/WB6CgWI4OOg?feature=share)\n\n## Stream 8 - Sending content to the Database from Astro\n\n⚠️ This is an upcoming livestream.\n\nWe will learn how design a set of functions that allow us to send content from the Astro build process to the database. Database will then automatically update the necessary content and remove the outdated parts.\n\n[Watch the livestream](https://youtube.com/live/46iKEYmRB50?feature=share)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxkonti%2Flearning-surreal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxkonti%2Flearning-surreal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxkonti%2Flearning-surreal/lists"}