A starter pack for getting started with Tailwind, Astro, Firebase, and Svelte.
To use this starter pack, follow these steps:
-
Clone the repository:
git clone https://github.com/Porter-smith/astro-firebase-svelte-tailwind-starter.git
-
Navigate to the project directory:
cd astro-firebase-svelte-tailwind-starter
-
Install the dependencies:
pnpm install
-
Start the development server:
pnpm run dev
Follow this guide to quickly set up Firebase for your project. For more in-depth instructions, see FIREBASE_SETUP.md.
- Go to the Firebase Console.
- Navigate to
Project settings
>Service accounts
. - Click
Generate new private key
, then download and secure the JSON file.
- If you haven't added a web app to Firebase, click the web icon (
</>
) inProject settings
>Your apps
to create one. - Find your web app and you should see your
configuration
- Copy the configuration object.
Place your keys in the appropriate files:
.env
: Add service account key values from the downloaded JSON.src/firebase/client.ts
: Insert the web app configuration object.
To configure your environment variables quickly:
Save your service account creds as service-account.json
in the project's root.
Run
node scripts/createEnvFromServiceAccount.js
A .env file with all Firebase variables will be generated. So you don't have to copy and paste one by one each key.
Note: After setting up the .env file, remember to remove the service-account.json from your project's root directory to protect your credentials.
- In Firebase Console, go to
Authentication
. - Click
Get started
. - Enable your desired sign-in methods and configure each according to Firebase's prompts.
You should now be able to run your application and use Firebase's authentication services.
🚀 Happy coding!