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.
- Node.js (v18 or later)
- npm or Yarn or pnpm
- JetBrains IDE (for the JetBrains plugin)
- Visual Studio Code (for the VS Code extension)
-
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 project
Join the Nx community:
- The project uses PartyKit for real-time functionality. See
partykit.json
andserver.ts
in the spells app for configuration. - The
spells
application uses Next.js and includes API routes for spell casting, ingredients, incantations, and recipes. - The project includes ESLint configurations for code linting.
- Jest and Vitest are set up for testing.
- The
libs/shared/util-interface
contains shared TypeScript interfaces and types used across the project. - The
libs/spellcasting-sdk
provides a convenient SDK for interacting with the spellcasting API.