Skip to content

cameronapak/freedom-stack

Repository files navigation

Freedom Stack, by faith.tools

A freeing full-stack web stack.

Netlify Status

freedom stack

See Demo

Comes With

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

Stack

P.S. Astro Studio is currently in closed beta. If you do not already have an account, you'll need an invitation.

P.P.S. If you don't have an Astro Studio account, you can use Turso as your database! Learn about libSQL remotes in 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 with Astro Studio. 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.

And, if you do this approach, you can view/manage your database in the libSQL Studio.

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
SENTRY_DSN Sentry Data Source Name for error tracking Optional
SENTRY_AUTH_TOKEN Authentication token for Sentry Optional
SENTRY_PROJECT Sentry project identifier Optional
ASTRO_STUDIO_APP_TOKEN Token for Astro Studio integration Required

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

The ASTRO_STUDIO_APP_TOKEN is required for integrating with Astro Studio features.

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

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.