Skip to content

Latest commit

 

History

History
124 lines (87 loc) · 5.03 KB

README.md

File metadata and controls

124 lines (87 loc) · 5.03 KB

Freedom Stack, by faith.tools

An Astro full-stack web stack that feels freeing, and is free.

Netlify Status

freedom stack

See Demo

Star History

Star History Chart

Comes With

  • CSS-based component library (daisyUI)
  • Blog
  • Database (Astro DB)
  • Auth (Lucia)
  • Simple Web Hosting (Netlify)

Stack

UI Layer

Interactivity Layer

  • TypeScript - For type safety.
  • AlpineJS - For state management and interactivity.
  • HTMX - For sending HTML partials/snippets over the wire.

Backend Data Layer

  • Astro DB - Astro DB is a fully managed SQL database that is fast, lightweight, and ridiculously easy-to-use. (Can use Turso, if desired.)
  • Drizzle ORM - A modern SQL database toolkit.
  • Lucia - A modern authentication library for Astro.

I owe a huge thank you to Thomas McInnis for his tutorial on Astro and Lucia.

Hosting

I have included the Netlify adapter in the starter kit. You can swap it out for others, such as Vercel.

How To Use

To create your own instance of this codebase, click the "Use this template" button on the repo's home page.

Environment Variables

This project uses the following environment variables:

Variable Description Required
ASTRO_DB_REMOTE_URL The connection URL to your libSQL server Required
ASTRO_DB_APP_TOKEN The auth token to your libSQL server Required
SENTRY_DSN Sentry Data Source Name for error tracking Optional
SENTRY_AUTH_TOKEN Authentication token for Sentry Optional
SENTRY_PROJECT Sentry project identifier Optional

Make sure to set these variables in your environment or .env file before running the application.

Astro DB Configuration (Required)

I recommend using Turso for your database. Here's how you can connect it to Astro DB:

You can now specify a libSQL server instance as the remote for @astrojs/db. This allows you to self-host your own libSQL server as an alternative to using Astro DB. This option works with any supported libSQL protocol.

To use this feature, set the following environment variables:

ASTRO_DB_REMOTE_URL: the connection URL to your libSQL server.

ASTRO_DB_APP_TOKEN: the auth token to your libSQL server.

You can also view/manage your database in the libSQL Studio.

Sentry Configuration (Optional)

For Sentry error tracking, you can set up the following variables. For more information, refer to the Sentry Astro integration guide.

Astro Studio

Astro Studio is no longer supported., but Astro DB isn't going anywhere.

Vision

I dream of a lightweight, simple web development stack that invokes a fun web experience at the cheapest possible maintainance, backend, and server cost. As close to free as possible.

Core Principles

  • Approachable — I want those new to web development to feel comfortable using this stack. Things like database management should feel intuitive. Remove barriers of traditional JavaScript frameworks, such as excessive boilerplate code or intense state management. Go back to the basics of web development. (While this is not vanilla, the dev experience will feel very natural.)
  • Flow-able — Use an HTML-first approach, where almost all of the work is done on the DOM layer: styling, structuring, and interactivity. An opinionated stack helps you avoid analysis paralysis of trying to decide what tooling to pick or how to put things together. Instead, spend your thinking time building. This simple stack helps you focus and get in the flow of code faster. Fast setup. Fast building. Fast shipping.
  • Pocket-friendly — Using this stack will be financially maintainable to anyone, especially indie hackers and those creating startup sites / web apps.

Contributions

I'll consider a contribution, but please open an issue if you'd like to contribute.