Welcome to Jayden's Stack 👋, a modern, efficient, and feature-packed monorepo boilerplate focused on SvelteKit. This project is all about enhanced developer experience, massive scalability, and high performance.
Give me a follow on Twitter for updates. And if you dig this repo, don't forget to give it a star ⭐️
Note
This is quite an opinionated monorepo
But, it's the exact structure I've used to build several production apps. And for me (and team members) it totally rocks. Over time, I might add additional utitilies and other libraries, but I'm trying to keep things "simple" (for my own sake).
When building this monorepo template, I tried to make it so that if you don't need something, it's relatively easy to eject. There might be some manual work involved if you want to get rid of something (sorry, no fancy CLI's yet), but the main goal here is to save myself time and hopefully yours! 🎉
tRPC
Integrate Prisma + Planetscale
Incorporate AuthJS.
Spin tRPC off into its own package.
Edge routes are currently not supported because of SvelteKitAuth
in hooks.server.ts (it loads Prisma).
Have solved this in other projects by copying over these functions and changing /auth/
to /api/auth/
. But for this template it's probably better to wait until this hardcoded path is fixed upstream and these functions allow for custom base paths so that our "handle" can sit in /src/routes/api/auth/[...authjs]
next to the trpc
entrypoint.
Clone this repository using git:
git clone https://github.com/multiplehats/jaydens-stack myapp
Navigate into your newly created project directory:
cd myapp
Replace instances of acme
.
Install the dependencies:
pnpm install
Copy .env.example in the root of the project. Generate a new AUTH_SECRET
. And set the DATABASE_URL
. The schema is setup for Planetscale, but you can easily modify it to a different need.
openssl rand -base64 32 # generate secret
Start the party:
pnpm dev
Voila! You now have a local running instance of Jayden's Stack!
Adding new components is pretty simple, you can either manually over components to the packages/ui
directory. Or, cd
into apps/web
and run the shadcn CLI command, e.g. npx shadcn-svelte add accordion
. This will put the new component in the packages/ui
directory.
Don't forget to update imports ✌️
apps/web
as well as packages/database
, because of this issue, alternatively see this Slack thread.Contributions, issues, and feature requests are welcome! See our Contributing Guide for more details.
Show your support If this project helped you, give it a ⭐️!
Feel free to provide feedback, report bugs, or make feature requests. You're welcome to create Pull Requests, too.
Happy coding!