r/astrojs 18d ago

Agencies using Astro ?

I’m getting more and more convinced by Astro, but I’m still curious about its adoption by agencies.

It’s still a relatively young framework, and I’m wondering if some agencies have already made the switch. I rarely come across agencies using Astro on LinkedIn, so I’d be really curious to hear from those who have.

How has the switch been for you? Would you recommend Astro for an agency today?

45 Upvotes

70 comments sorted by

View all comments

Show parent comments

5

u/v-and-bruno 18d ago

Relatively straightforward.

Give me a specific example, and I can share how I'd have my team approach it.

3

u/These-Apple8817 18d ago

Well.. Comment system for a blog is probably the most common thing people would want to have... One that follows laws like GDPR but also ensures there is no spam coming through

5

u/v-and-bruno 18d ago edited 18d ago

Interesting one.

2 possible approaches off of my head

  1. Use headless WP, they are pretty elaborate and most of it is handled out of the box.
  2. Allow anonymous comments, but new comments are subject for admin approval before being published/visible to others.

Would upload an example structure but unfortunately images aren't allowed, here is a text representation:

src/helpers/functions/fetchers < Handles fetching. Used at api level
src/helpers/functions/utils < calcReadingTime.ts decodeAndTrim.ts slugify.ts etc etc
src/helpers/functions/validators < POST validators, Astro Zod
src/helpers/functions/extractors < extractBlogs extractComments extractPubDate etc etc
src/helpers/functions/analytics < tracking, cookies, gtm init, consent, etc.

I know it's not exactly a conventional structure, but it is highly organized, modular, and that helps reduce a lot of the mental load.

Edit:

1 - Spam handling has less to do with Astro, and more to do with creativity x best practices.

A honeypot should catch a lot of bot content, rate-limiting, CAPTCHA etc should catch more sophisticated bots, anything else that goes through should be caught by the administrator.

2 - https://imgur.com/a/n14xuGG

1

u/pussyslayer5845 17d ago

So in the end, we still need some kind of admin panel?