The Two Stacks

The Two Stacks

Streamlining Development with AstroJS and SvelteKit

After a lot of trial and error, I’ve come to realize that there are only two fundamental types of projects I work on: static sites and web applications. This simplicity has allowed me to distill my tech stack down to two efficient solutions, each catering to these specific types of projects.

1. AstroJS for Static Sites

For static sites that don’t require a database, such as my personal blog, I opt for AstroJS. This JavaScript site generator reads content from markdown files and converts it into simple HTML pages. The output is then hosted on Vercel, taking advantage of their Content Delivery Network (CDN) for maximum speed.

AstroJS offers a straightforward and efficient way to build static sites, making it an ideal choice for content-driven projects.

2. SvelteKit for Web Apps

For web applications, which encompass everything from dynamic websites to complex online systems, I use SvelteKit, a web framework based on Svelte. SvelteKit allows me to write code that can run on both the server (for tasks like reading and writing to a database) and the client (for animations and other client-side functionality). As a database, I rely on MongoDB.

I know that many developers may be skeptical about using MongoDB, as they believe that SQL databases are superior in most ways. However, I encourage them to give MongoDB a try, as it can achieve amazing results at incredible speeds. The key is to understand that MongoDB requires a different approach than traditional SQL databases. You need to rethink your database schema and design it specifically for MongoDB, taking advantage of its unique capabilities and features.

Both SvelteKit and MongoDB are hosted on Railway.app, a modern and user-friendly platform for hosting JavaScript applications. Railway.app offers a Heroku-like experience but with a more contemporary approach.

Style -> TailwindCSS

Regardless of the project type, I’ve found that the UI is often the most time-consuming aspect to get right. To tackle this challenge, I’ve discovered that TailwindCSS is by far the most effective solution. Its utility-first approach and pre-defined classes enable me to rapidly develop and maintain consistent designs. By using TailwindCSS, I’ve been able to significantly reduce the time and effort required to create high-quality UIs, allowing me to focus on the overall project development.

Just don’t lose your sleep over it

In the end, it’s not really about the tools and the frameworks, each of them could be replaced by another that does the same. What’s important is to have one stack, or at most a few, ready to go for when you have an idea to quickly put to the ground, or better online.