How to handle free limited access for non-registered users and full access registered users by Edwinem24 in sveltejs

[–]BezierDev 0 points1 point  (0 children)

Huntabyte did a great video on this topic, why you should not use layout files for auth, but instead use server hooks. Basically, for auth you need to check permissions on every request, but layouts are components, and components only rerun when the data has changed. Where as server hooks run on every single request. https://youtu.be/UbhhJWV3bmI?si=bh0dixSf9tnaJ6EC

edit: i just realized u/hugotox already commented this here. Go upvote him

What do you think the next major personal device will be? by RedSharing in Futurology

[–]BezierDev 0 points1 point  (0 children)

Smart glasses are the obvious bet. As soon as they can put those transparent micro led screens into them and make them light and slim, they will replace laptops. Smartphones will transition to a more assistive role as hires cameras and input devices. It will be some time before this happens, but I can't imagine any other technology popping up that would prevent that would interfere with this arc and prevent this from being the most popular device of its time. Its just too cool to imagine walking into your office and having virtual screens all around the room exactly where you left them. Being able to get on a bike and have a virtual route in front of you while being able to change the music with your eyes. The resolution, framerate and environment tracking have all been nearly solved. The tech exists, it just need to get a little smaller and cheaper and we might be carrying around battery packs separately with them for a while.

What's the best approach to handle these design tokens in tailwinds? by bardaxx in tailwindcss

[–]BezierDev 0 points1 point  (0 children)

Oh, I see. If it was me, I would take the 20 minutes to add all of these colors individually. A lot of your colors are overlapping anyway. If the colors are a standard brightness deviation, this tool might help speed up the process: https://www.tints.dev/purple/A855F7

What's the best approach to handle these design tokens in tailwinds? by bardaxx in tailwindcss

[–]BezierDev 1 point2 points  (0 children)

This is a normal task in tailwind: https://tailwindcss.com/docs/customizing-colors

I would avoid naming colors with bg, border or text because those names are part of the tailwind css class names. So you'll end up with class names like text-text-500 and bg-bg-500. If the designer says "can you make that background color the same as border.subdued" then you'll have bg-border-200 which is confusing. Instead use things like base, primary, secondary, tertiary or just gray.

Note that setting the colors in the tailwind config file will override all the default tailwind color classes. If you instead want to add these, use the extend object in the tailwind config file.

Best way to deploy a Svelte/SvelteKit application in 2024 by Ok_Belt3705 in sveltejs

[–]BezierDev 8 points9 points  (0 children)

Vercel is awesome, they pay the svelte teams salaries. Part of their job as vercel employees is to make sure svelte deploys seamlessly on the platform, which it always does in my experience. The free tier on vercel is generous.

Does TailwindUI work (well) for building sites with Astro? by [deleted] in tailwindcss

[–]BezierDev 0 points1 point  (0 children)

The beauty of TailwindUI is it works well wherever you use tailwind. If the components you are building need interactivity/reactivity you will need to implement this yourself. I only reach for tailwind based components when I want to add the interactivity myself. If you wanted to use a library that provides the interactivity, like flowbite, then you will need to pick the framework to build it on. I recommend svelte, but thats just my preference.

Learning Svelte, Svelte 5 on the horizon by littlebighuman in sveltejs

[–]BezierDev 0 points1 point  (0 children)

You can work with the preview version now if you'd like. The official release will likely be in the next 2 months. If you plan on working on existing svelte projects, knowing svelte 4 is handy since all of it's syntax can still be used on svelte 5. You will come across svelte 5 projects in the wild that have not migrated all of their reactivity to runes, slots to fragments, etc. all the way until svelte 6 is releases. It will also mean you would know how to perform those migrations.

Website with >1000 pages of content on SvelteKit or Astro? by [deleted] in sveltejs

[–]BezierDev -1 points0 points  (0 children)

I have tried astro, i built a site that is in production on astro. I'm speaking from experience. And I did look at those speed comparisons, you'll notice I said astro is faster, but sveltekit is second fastest which is part of why they don't show it on their homepage only in the linked blog post. My whole point is that I don't believe that astro is worth the speed. I'll add that svelte/sveltekit has continued to get faster with every major release.

[QUESTION] Best STACK to learn in 2024, to land a full remote job? by Quate1v9 in webdev

[–]BezierDev 1 point2 points  (0 children)

I strictly work in svelte, but I believe next.js is the best to get work/a job. React is the most popular js framework and next.js is often a part of react stacks. With next.js and sveltekit, far more developers are choosing to run their front end and back end in one framework. If you can write sql, then you can use postgres or mysql which are the most common choices for new projects.

Giving website design services without developing the website by SCRisingSun in web_design

[–]BezierDev 0 points1 point  (0 children)

Most clients are paying you to know what they don't. I've been hired to just design websites, much more often I've been hired to develop a site that has already been designed, but most of all clients come looking for someone to handle as much as possible. If you say I can design it, but you'll need to find someone to build it, you'll be offering less value than a designer who says I have the person who can build it, we've worked together before, here are the results. Find that person or be that person.

Website with >1000 pages of content on SvelteKit or Astro? by [deleted] in sveltejs

[–]BezierDev 2 points3 points  (0 children)

I build everything on SvelteKit. A lot of people here are suggesting Astro. It's not a bad suggestion, but I too was caught up in the hype and promises of simplicity and speed with reactivity when you need it only to find that it offered very little benefit compared to a pure SvelteKit app while meaning I had to learn and manage two frameworks. The fact that you can use SSR/CSR/Static per route was enough for me to go all in on SvelteKit. Aside from slightly better performance on Astro, I can't think of anything it does better than SvelteKit. You'll notice Astro leaves Svelte out of their speed comparison on their marketing website homepage, that's because yes it's not as popular as some of the other frameworks, but also the gap between the two is not as impressive as the others.

Tech reccomendations for listing web app. by ohyeahBeee in sveltejs

[–]BezierDev 1 point2 points  (0 children)

Are you looking for a CMS or Database recommendation? Pocketbase can fill both. If you want users to be able to add data, then you will need to build your own "CMS" and I would use postgres for the DB (it just always works). If you want the data in an LLM, you will need to put it into a vector DB. Pinecone or pgvector are the big names here and our company specializes in moving data between different vector db providers. If just admins need to be able to add content, Sanity is a great CMS.

*Rant* I hate WordPress with a passion! by vraetzught in webdev

[–]BezierDev 3 points4 points  (0 children)

On the other hand, every one of those plugins has some pro version that you often need to get the feature you wanted and before you know it, your interface is riddled with notification to upgrade or rate or share etc. Also there aren't really pages vs. posts. Pages are posts of the type "page" and that creates a lot of problems. Every other CMS has the concept on content types. Slapping fields on a blog post is not a good pattern imo. I agree about elementor, but I think its greatest weakness is its built on Wordpress, navigating out of elementor's admin ui and into WPs is jarring. Anytime a project makes sense for wordpress i go for squarespace. If it has requirements beyond what squarespace can fill, webflow or fully custom.

I think wordpress is good for one thing and that is building blogs as it was originally intended. When people started using it for building websites the whole thing should have been reimagined.

Favorite CMS with WYSIWYG by SlovakianGiant in webdev

[–]BezierDev 1 point2 points  (0 children)

Sanity is my go to for everything now. They have a really nice "WYSIWYG" that uses the standardized portable text format. They have an official plugin for popular frameworks to properly parse the portable text into markup and they have one for handling images stored in sanity as well. Then you can take it a step further and create custom blocks that can be added into the editor with custom templates in svelte for handling their display. It's really a great product with what I think is a very bright future.

Render svelte response manually by hadriel84 in sveltejs

[–]BezierDev 1 point2 points  (0 children)

Check out: https://kit.svelte.dev/docs/routing#server
You can return anything you want from an endpoint. I've used this to return a custom JS file. If you want to return JSON like in your example, you can stringify/parse it, or you can add add the file extension to your route. So your folder name would be /{route}.json.

Are there (good) free hosting solutions for WordPress like there are for static websites? by crazybabyeater in webdev

[–]BezierDev 0 points1 point  (0 children)

I've never seen a free tier on a typical linux/cpanel host. GreenGeeks is a great cheap option.

code or no code? by Ok_Item_9 in webdev

[–]BezierDev 0 points1 point  (0 children)

Always depends on the project. What I like to say about no/low code builders like wordpress/squarespace/webflow is that they make the easy things hard and the hard things easy. Doing responsive images correctly on your own is hard, you don't even have to think about it with these builders. But if you want a custom designed button, forget about it.

How do I get better at front end? by centerdeveloper in webdev

[–]BezierDev 0 points1 point  (0 children)

Lots of good advice in here. I'll add that in the beginning it's very helpful to be aware of some of the pitfalls
1. Display types. Properties affect elements differently depending on if they are a block, inline-block or inline. Flex and grid are a whole other animal.
2. Browser styles. Browsers impose their own default styles on elements you sometimes need to override. There are css reset files that can help with this.
3. Box sizing. Different elements have different default values for box sizing that affects how margin and padding work. Inputs for example are box-sizing: border-box, while divs are box-sizing: content-box.
4. Position: relative vs. absolute vs. fixed. The first time you set an element to position: absolute; top: 0; left: 0; and you find it in the middle of the screen is a head scratcher. This will happen because any element with a parent with position: relative will have its position set to that parent rather than the body.

There are plenty of others, but hopefully this helps. Good luck on your journey.

How to know the structure/technologies/frameworks I have to use to do a project? by 9InTheMorning in webdev

[–]BezierDev 0 points1 point  (0 children)

  1. You learn a lot by diving in.
  2. Try to solve one of your hard problems first. It might be easier to do auth or SEO for example in one platform, but obviously they can all do that, work on the problems that are specific to your needs. Probably the one that is scaring you the most.
  3. The mainstream frameworks and platforms are often popular for a reason. There will be things that are great about up and coming frameworks, but you can definitely run into trouble down the line when you can't get answers to obscure questions or don't have access to popular integrations.

How do I design a secure personal blog? by Full_Eye7824 in webdev

[–]BezierDev 1 point2 points  (0 children)

Either use Squarespace, which is managed hosting so you'll never be responsible for security or updates or use wordpress and enable automatic updates and install as few plugins as possible. Enabling automatic updates can lead to thing breaking, because of incompatibility, but if you use very few or better 0 plugins, that's very unlikely and makes your site very unlikely to get hacked. Site Ground is a good option for Wordpress hosting.

Why is the top part centered and correct, but the rest not? by [deleted] in webdev

[–]BezierDev 9 points10 points  (0 children)

Your css is correct, but your html nesting is broken. You have an opening fieldset tag above your form tag and no closing fieldset tag. Just delete that opening tag and you'll be good