A TypeScript SDK for interacting with magical spells and recipes
Welcome to The Coven's SpellCasting Companion, an Nx-powered monorepo for managing and casting magical spells!
This project is created for the purpose of the Squiggle Conf 2024 workshop Build Editor Extensions with the Makers of Nx Console.
You can see it live at the-coven.vercel.app.
This Nx workspace is organized into the following apps and libraries:
.
apps
codex-arcana-jetbrains # JetBrains IDE plugin
codex-arcana-vscode # Visual Studio Code extension
spells # Next.js application for spellcasting
libs
shared
util-interface # Shared TypeScript interfaces and types
spellcasting-sdk # SDK for interacting with the API
API and SDK documentation can be found in the respective project directories.
Clone the repository:
git clone [email protected]:MaxKless/the-coven.git
cd the-coven
Install dependencies:
npm install
Start the spells application:
npx nx serve spells
In a new terminal window, go to the spells directory and run partykit:
cd apps/spells
npx partykit dev
Open your browser and navigate to http://localhost:3000
to view the application.
To build the JetBrains plugin:
npx nx build codex-arcana-jetbrains
To build the VS Code extension:
npx nx build codex-arcana-vscode
To create a production build of a project:
npx nx build <project-name>
For example:
npx nx build spells
To run tests for all projects:
npx nx run-many --target=test --all
To run tests for a specific project:
npx nx test <project-name>
To lint all projects:
npx nx run-many --target=lint --all
To lint a specific project:
npx nx lint <project-name>
npx nx graph
: Visually explore the project graphnpx nx affected:graph
: See what's been affected by your changesnpx nx show project <project-name>
: See available targets for a projectJoin the Nx community:
partykit.json
and server.ts
in the spells app for configuration.spells
application uses Next.js and includes API routes for spell casting, ingredients, incantations, and recipes.libs/shared/util-interface
contains shared TypeScript interfaces and types used across the project.libs/spellcasting-sdk
provides a convenient SDK for interacting with the spellcasting API.