From 42493cf28143f8da01bb51006f4d6994cae73667 Mon Sep 17 00:00:00 2001 From: Scott Trinh Date: Wed, 19 Feb 2025 10:28:44 -0500 Subject: [PATCH 1/4] wip Move Next.js Quickstart into an env-switcher --- docs/intro/quickstart/connecting/index.rst | 11 ++++ .../{connecting.rst => connecting/nextjs.rst} | 0 docs/intro/quickstart/index.rst | 57 +---------------- docs/intro/quickstart/inheritance/index.rst | 12 ++++ .../nextjs.rst} | 0 docs/intro/quickstart/modeling/index.rst | 13 ++++ .../{modeling.rst => modeling/nextjs.rst} | 0 docs/intro/quickstart/nextjs.rst | 62 +++++++++++++++++++ docs/intro/quickstart/setup/index.rst | 11 ++++ .../{setup.rst => setup/nextjs.rst} | 0 docs/intro/quickstart/working/index.rst | 14 +++++ .../{working.rst => working/nextjs.rst} | 0 12 files changed, 126 insertions(+), 54 deletions(-) create mode 100644 docs/intro/quickstart/connecting/index.rst rename docs/intro/quickstart/{connecting.rst => connecting/nextjs.rst} (100%) create mode 100644 docs/intro/quickstart/inheritance/index.rst rename docs/intro/quickstart/{inheritance.rst => inheritance/nextjs.rst} (100%) create mode 100644 docs/intro/quickstart/modeling/index.rst rename docs/intro/quickstart/{modeling.rst => modeling/nextjs.rst} (100%) create mode 100644 docs/intro/quickstart/nextjs.rst create mode 100644 docs/intro/quickstart/setup/index.rst rename docs/intro/quickstart/{setup.rst => setup/nextjs.rst} (100%) create mode 100644 docs/intro/quickstart/working/index.rst rename docs/intro/quickstart/{working.rst => working/nextjs.rst} (100%) diff --git a/docs/intro/quickstart/connecting/index.rst b/docs/intro/quickstart/connecting/index.rst new file mode 100644 index 00000000000..18bee065359 --- /dev/null +++ b/docs/intro/quickstart/connecting/index.rst @@ -0,0 +1,11 @@ +.. edb:env-switcher:: + +========== +Connecting +========== + +.. toctree:: + :maxdepth: 3 + :hidden: + + nextjs diff --git a/docs/intro/quickstart/connecting.rst b/docs/intro/quickstart/connecting/nextjs.rst similarity index 100% rename from docs/intro/quickstart/connecting.rst rename to docs/intro/quickstart/connecting/nextjs.rst diff --git a/docs/intro/quickstart/index.rst b/docs/intro/quickstart/index.rst index a9dd7543131..90c423da0d0 100644 --- a/docs/intro/quickstart/index.rst +++ b/docs/intro/quickstart/index.rst @@ -1,62 +1,11 @@ -.. _ref_quickstart: +.. edb:env-switcher:: ========== Quickstart ========== .. toctree:: - :maxdepth: 1 + :maxdepth: 3 :hidden: - setup - modeling - connecting - working - inheritance - - -Welcome to the quickstart tutorial! In this tutorial, you will update a simple Next.js application to use |Gel| as your data layer. The application will let users build and manage their own study decks, with each flashcard featuring customizable text on both sides - making it perfect for studying, memorization practice, or creating educational games. - -Don't worry if you're new to |Gel| - you will be up and running with a working Next.js application and a local |Gel| database in just about **5 minutes**. From there, you will replace the static mock data with a |Gel| powered data layer in roughly 30-45 minutes. - -By the end of this tutorial, you will be comfortable with: - -* Creating and updating a database schema -* Running migrations to evolve your data -* Writing EdgeQL queries in text and via a TypeScript query builder -* Building an app backed by |Gel| - -Features of the flashcards app ------------------------------- - -* Create, edit, and delete decks -* Add/remove cards with front/back content -* Simple Next.js + Tailwind UI -* Clean, type-safe schema with |Gel| - -Requirements ------------- - -Before you start, you need: - -* Basic familiarity with TypeScript, Next.js, and React -* Node.js 20+ on a Unix-like OS (Linux, macOS, or WSL) -* A code editor you love - -Why |Gel| for Next.js? ----------------------- - -* **Type Safety**: Catch data errors before runtime -* **Rich Modeling**: Use object types and links to model relations -* **Modern Tooling**: TypeScript-friendly schemas and migrations -* **Performance**: Efficient queries for complex data -* **Developer Experience**: An intuitive query language (EdgeQL) - -Need Help? ----------- - -If you run into issues while following this tutorial: - -* Check the `Gel documentation `_ -* Visit our `community Discord `_ -* File an issue on `GitHub `_ + nextjs \ No newline at end of file diff --git a/docs/intro/quickstart/inheritance/index.rst b/docs/intro/quickstart/inheritance/index.rst new file mode 100644 index 00000000000..fa24cf5b8dd --- /dev/null +++ b/docs/intro/quickstart/inheritance/index.rst @@ -0,0 +1,12 @@ +.. edb:env-switcher:: + +=========== +Inheritance +=========== + +.. toctree:: + :maxdepth: 3 + :hidden: + + nextjs + diff --git a/docs/intro/quickstart/inheritance.rst b/docs/intro/quickstart/inheritance/nextjs.rst similarity index 100% rename from docs/intro/quickstart/inheritance.rst rename to docs/intro/quickstart/inheritance/nextjs.rst diff --git a/docs/intro/quickstart/modeling/index.rst b/docs/intro/quickstart/modeling/index.rst new file mode 100644 index 00000000000..e1fed28cb1d --- /dev/null +++ b/docs/intro/quickstart/modeling/index.rst @@ -0,0 +1,13 @@ +.. edb:env-switcher:: + +======== +Modeling +======== + +.. toctree:: + :maxdepth: 3 + :hidden: + + nextjs + + diff --git a/docs/intro/quickstart/modeling.rst b/docs/intro/quickstart/modeling/nextjs.rst similarity index 100% rename from docs/intro/quickstart/modeling.rst rename to docs/intro/quickstart/modeling/nextjs.rst diff --git a/docs/intro/quickstart/nextjs.rst b/docs/intro/quickstart/nextjs.rst new file mode 100644 index 00000000000..7a0e0ef3a24 --- /dev/null +++ b/docs/intro/quickstart/nextjs.rst @@ -0,0 +1,62 @@ +.. _ref_quickstart: + +========== +Quickstart +========== + +.. toctree:: + :maxdepth: 1 + :hidden: + + setup/index + modeling/index + connecting/index + working/index + inheritance/index + + +Welcome to the quickstart tutorial! In this tutorial, you will update a simple Next.js application to use |Gel| as your data layer. The application will let users build and manage their own study decks, with each flashcard featuring customizable text on both sides - making it perfect for studying, memorization practice, or creating educational games. + +Don't worry if you're new to |Gel| - you will be up and running with a working Next.js application and a local |Gel| database in just about **5 minutes**. From there, you will replace the static mock data with a |Gel| powered data layer in roughly 30-45 minutes. + +By the end of this tutorial, you will be comfortable with: + +* Creating and updating a database schema +* Running migrations to evolve your data +* Writing EdgeQL queries in text and via a TypeScript query builder +* Building an app backed by |Gel| + +Features of the flashcards app +------------------------------ + +* Create, edit, and delete decks +* Add/remove cards with front/back content +* Simple Next.js + Tailwind UI +* Clean, type-safe schema with |Gel| + +Requirements +------------ + +Before you start, you need: + +* Basic familiarity with TypeScript, Next.js, and React +* Node.js 20+ on a Unix-like OS (Linux, macOS, or WSL) +* A code editor you love + +Why |Gel| for Next.js? +---------------------- + +* **Type Safety**: Catch data errors before runtime +* **Rich Modeling**: Use object types and links to model relations +* **Modern Tooling**: TypeScript-friendly schemas and migrations +* **Performance**: Efficient queries for complex data +* **Developer Experience**: An intuitive query language (EdgeQL) + +Need Help? +---------- + +If you run into issues while following this tutorial: + +* Check the `Gel documentation `_ +* Visit our `community Discord `_ +* File an issue on `GitHub `_ diff --git a/docs/intro/quickstart/setup/index.rst b/docs/intro/quickstart/setup/index.rst new file mode 100644 index 00000000000..41f28c1b6d6 --- /dev/null +++ b/docs/intro/quickstart/setup/index.rst @@ -0,0 +1,11 @@ +.. edb:env-switcher:: + +===== +Setup +===== + +.. toctree:: + :maxdepth: 3 + :hidden: + + nextjs diff --git a/docs/intro/quickstart/setup.rst b/docs/intro/quickstart/setup/nextjs.rst similarity index 100% rename from docs/intro/quickstart/setup.rst rename to docs/intro/quickstart/setup/nextjs.rst diff --git a/docs/intro/quickstart/working/index.rst b/docs/intro/quickstart/working/index.rst new file mode 100644 index 00000000000..8ab5d52a37a --- /dev/null +++ b/docs/intro/quickstart/working/index.rst @@ -0,0 +1,14 @@ +.. edb:env-switcher:: + +======= +Working +======= + +.. toctree:: + :maxdepth: 3 + :hidden: + + nextjs + + + diff --git a/docs/intro/quickstart/working.rst b/docs/intro/quickstart/working/nextjs.rst similarity index 100% rename from docs/intro/quickstart/working.rst rename to docs/intro/quickstart/working/nextjs.rst From 0ca1340aa73d9e1146e3b2821ba4e18e9c1eda04 Mon Sep 17 00:00:00 2001 From: James Clarke Date: Wed, 19 Feb 2025 16:26:58 +0000 Subject: [PATCH 2/4] Move index / overview pages --- docs/intro/quickstart/index.rst | 11 +++++++---- docs/intro/quickstart/overview/index.rst | 11 +++++++++++ docs/intro/quickstart/{ => overview}/nextjs.rst | 11 ----------- 3 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 docs/intro/quickstart/overview/index.rst rename docs/intro/quickstart/{ => overview}/nextjs.rst (93%) diff --git a/docs/intro/quickstart/index.rst b/docs/intro/quickstart/index.rst index 90c423da0d0..0bc81d3b904 100644 --- a/docs/intro/quickstart/index.rst +++ b/docs/intro/quickstart/index.rst @@ -1,11 +1,14 @@ -.. edb:env-switcher:: - ========== Quickstart ========== .. toctree:: - :maxdepth: 3 + :maxdepth: 1 :hidden: - nextjs \ No newline at end of file + overview/index + setup/index + modeling/index + connecting/index + working/index + inheritance/index \ No newline at end of file diff --git a/docs/intro/quickstart/overview/index.rst b/docs/intro/quickstart/overview/index.rst new file mode 100644 index 00000000000..bdf8f1e098b --- /dev/null +++ b/docs/intro/quickstart/overview/index.rst @@ -0,0 +1,11 @@ +.. edb:env-switcher:: + +======== +Overview +======== + +.. toctree:: + :maxdepth: 3 + :hidden: + + nextjs \ No newline at end of file diff --git a/docs/intro/quickstart/nextjs.rst b/docs/intro/quickstart/overview/nextjs.rst similarity index 93% rename from docs/intro/quickstart/nextjs.rst rename to docs/intro/quickstart/overview/nextjs.rst index 7a0e0ef3a24..ee5550b9481 100644 --- a/docs/intro/quickstart/nextjs.rst +++ b/docs/intro/quickstart/overview/nextjs.rst @@ -4,17 +4,6 @@ Quickstart ========== -.. toctree:: - :maxdepth: 1 - :hidden: - - setup/index - modeling/index - connecting/index - working/index - inheritance/index - - Welcome to the quickstart tutorial! In this tutorial, you will update a simple Next.js application to use |Gel| as your data layer. The application will let users build and manage their own study decks, with each flashcard featuring customizable text on both sides - making it perfect for studying, memorization practice, or creating educational games. Don't worry if you're new to |Gel| - you will be up and running with a working Next.js application and a local |Gel| database in just about **5 minutes**. From there, you will replace the static mock data with a |Gel| powered data layer in roughly 30-45 minutes. From 20683f2af9bca91a73d75927cec57ae6d04d595f Mon Sep 17 00:00:00 2001 From: Scott Trinh Date: Wed, 19 Feb 2025 12:55:04 -0500 Subject: [PATCH 3/4] Move images --- .../{ => inheritance}/images/timestamped.png | Bin .../quickstart/{ => modeling}/images/schema-ui.png | Bin .../{ => working}/images/flashcards-import.png | Bin 3 files changed, 0 insertions(+), 0 deletions(-) rename docs/intro/quickstart/{ => inheritance}/images/timestamped.png (100%) rename docs/intro/quickstart/{ => modeling}/images/schema-ui.png (100%) rename docs/intro/quickstart/{ => working}/images/flashcards-import.png (100%) diff --git a/docs/intro/quickstart/images/timestamped.png b/docs/intro/quickstart/inheritance/images/timestamped.png similarity index 100% rename from docs/intro/quickstart/images/timestamped.png rename to docs/intro/quickstart/inheritance/images/timestamped.png diff --git a/docs/intro/quickstart/images/schema-ui.png b/docs/intro/quickstart/modeling/images/schema-ui.png similarity index 100% rename from docs/intro/quickstart/images/schema-ui.png rename to docs/intro/quickstart/modeling/images/schema-ui.png diff --git a/docs/intro/quickstart/images/flashcards-import.png b/docs/intro/quickstart/working/images/flashcards-import.png similarity index 100% rename from docs/intro/quickstart/images/flashcards-import.png rename to docs/intro/quickstart/working/images/flashcards-import.png From 9e55323fe1de03c14795fedc4534f42ef30aaaca Mon Sep 17 00:00:00 2001 From: Scott Trinh Date: Wed, 19 Feb 2025 15:42:51 -0500 Subject: [PATCH 4/4] Empty