The Remix Stack for deploying to Fly.io with Preact, Tailwind, PostCSS, Firebase, testing, linting, formatting, and more
The Remix Lo-Fi Stack is a web development stack that provides various features and tools to create and deploy web applications. It includes a Preact UI runtime, support for atomic styling with Tailwind CSS, theme processing with PostCSS, and build-time imports and nesting. The stack also offers integration with Cloud Firestore for storing and syncing app data, Firebase Authentication for simple sign-in and account management, and deployment to Fly.io. It supports component stories with Storybook, unit testing with Vitest and Testing Library, code formatting with Prettier, linting with ESLint, and static typing with TypeScript.
To install the Remix Lo-Fi Stack, follow these steps:
From your terminal, run the following command:
npm init remix --template your/repo
This will initialize your project with the Remix Lo-Fi Stack template.
Next, set up a Firebase project for authentication and data storage.
SERVICE_ACCOUNT and CLIENT_CONFIG in the .env file.Configure the authentication functionality:
auth.server.ts file, implement the necessary functions for sign-in, sign-up, and require authentication.firestore-admin to verify session cookies and protect loaders and actions.Connect to the Firestore database:
db.server.ts file, export Holocron databases connected to Firestore collections.firebase-admin-SDK to make requests to Firestore.Set up testing, type checking, linting, and formatting as needed:
Finally, configure and deploy the application to Fly.io:
flyctl and sign up and log in to Fly.The Remix Lo-Fi Stack is a comprehensive web development stack that provides a range of features and tools for building and deploying web applications. It offers a lightweight Preact UI runtime, atomic styling with Tailwind CSS, and advanced styling capabilities with PostCSS. Additionally, it integrates with Cloud Firestore for data storage, Firebase Authentication for user sign-in and account management, and Fly.io for easy deployment. With support for component stories, unit testing, code formatting, linting, and static typing, the Remix Lo-Fi Stack offers a robust and efficient development workflow.