sveltekit-example
jetstream
sveltekit-example | jetstream | |
---|---|---|
3 | 23 | |
155 | 3,895 | |
- | 0.7% | |
0.0 | 8.7 | |
over 1 year ago | 10 days ago | |
TypeScript | PHP | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
sveltekit-example
-
Ask HN: What would be your stack if you are building an MVP today?
The DB connection to Supabase can be made where ever you want it to be. It’s just JavaScript.
In Node, a “module” is generally scoped to a file. So you make a db.ts file and export the instance you create and it functions basically as a singleton. One DB connection per user per session. SvelteKit let’s you choose where to put that. The first place you import it is when it instantiates.
Auth in SvelteKit is trickier than it should be, but there’s a really good technique that I recommend you follow: https://www.captaincodeman.com/re-creating-the-sveltekit-ses...
I believe he uses firebase in his example. But don’t just copy paste, try to understand what is actually happening and why he had to do this workaround. Once you understand how SSR actually works, things get a lot easier.
Stores are a way of storing state on the client side, but to do SSR Svelte has to use stores on its “backend”. The key thing to understand is that stores that are used for SSR are server wide and persistent so you can’t store user specific data in them. There’s a special spot for that kind of state called events.locals.
It’s probably the trickiest area of SvelteKit IMO. I hope they make it better.
-
How to call mongodb without using endpoints?
I recommend checking out Firebase. Was super easy to get started with for me. And here’s a really easy-to-follow example of using firebase auth with svelte
-
Svelte and Firebase auth question
I just started using firebase too, recommend using this example for inspiration, got me going pretty quick.
jetstream
-
Is using the repository pattern best practise?
For writing models I would suggest using Action Closes. One example of them can be found in Jetstream's sourcecode. Actions are great to test in isolation and link to user stories.
-
Ask HN: What would be your stack if you are building an MVP today?
While I prefer python for everything else, I'd go with Laravel Jetstream[1] for an MVP, just like I did with the last one I had to build. It's laravel, you can use Vue (React or Svelte) for your views instead of the blade templating language that comes with the framework. Jetstream also comes with Auth, user login and subscription and other useful stuff.
And for the flavor, I'd just go with DaisyUI[2] again, since it's based on tailwindcss and it's what I've been using lately.
In my experience, I can build MVPs real fast with the stack described above.
[1] https://jetstream.laravel.com
-
How to call api internally and is that a good idea to call like that?
A well-implemented example of this would be in Laravel Jetstream, where an Actions namespace is defined for performing user-oriented tasks in Laravel Fortify — such as updating the user profile.
- What auth scaffolding should be used with sanctum tokens
- Admin panel with basic html css js
-
`npm run dev` not copying css or js files to public. Bug?
This legacy package is a very simple authentication scaffolding built on the Bootstrap CSS framework. While it continues to work with the latest version of Laravel, you should consider using Laravel Breeze for new projects. Or, for something more robust, consider Laravel Jetstream.
-
Preventing User Enumeration Attack in Laravel Apps
Laravel provide us with robust solutions and starter kits for authentication so let's start by creating a new Laravel 9 project and install Jetstram
- Jetstream - Tailwind scaffolding for the Laravel framework.
- Jetstream – Tailwind scaffolding for the Laravel framework
-
Moving an existing vanilla PHP website to Laravel/Vue, using packages for different components
In terms off bullet points you added, I've made something pretty similar using Laravel with : Laravel Jetstream(application starter kit with inertia + vue stack) https://jetstream.laravel.com/
What are some alternatives?
sveltekit-discord-oauth-starter - Starter template for SvelteKit projects bundled with Discord OAuth2 base logic.
breeze - Minimal Laravel authentication scaffolding with Blade, Vue, or React + Tailwind.
vite - Next generation frontend tooling. It's fast!
jwt-auth - 🔐 JSON Web Token Authentication for Laravel & Lumen
pothos - Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
django-unicorn - The magical reactive component framework for Django ✨
create-t3-app - The best way to start a full-stack, typesafe Next.js app
Tailwind CSS - A utility-first CSS framework for rapid UI development.
learn-elixir - :droplet: Learn the Elixir programming language to build functional, fast, scalable and maintainable web applications!
livewire - A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
wasp - The fastest way to develop full-stack web apps with React & Node.js.
sanctum - Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.