This project is a web application built with Vue 3, utilizing Firebase for authentication, and various other tools for development and testing.
- Vue 3 for building the user interface
- Firebase for authentication
- Pinia for state management
- Vue Router for navigation
- Tailwind CSS for styling
- Cypress for end-to-end testing
- ESLint and Prettier for code linting and formatting
- Node.js (v18 or higher recommended)
- pnpm
- Clone the repository:
git clone https://github.com/gokhantaskan/vue3-firebase-auth.git cd vue3-firebase-auth
- Install dependencies:
pnpm install pnpm prepare # This will install husky hooks
- Create a Firebase project at Firebase Console.
- Set up Firebase Authentication with your desired authentication providers.
- Obtain your Firebase configuration object from the Firebase Console.
- Create a
.env
file in the root of your project and fill it with your Firebase configuration details. You can use the provided.env.example
file as a template. Copy the.env.example
file to.env
and add your Firebase configuration.
Make sure to replace the placeholder values with your actual Firebase configuration values.
This will ensure your app can connect to Firebase and use its authentication services.
To start the development server, run:
pnpm dev
See Vite Configuration Reference.
pnpm build
Run Unit Tests with Vitest
pnpm test:unit
Run End-to-End Tests with Cypress
Before running the end-to-end tests, make sure to install cypress:
pnpm exec cypress install
pnpm test:e2e:dev
This runs the end-to-end tests against the Vite development server. It is much faster than the production build.
But it's still recommended to test the production build with test:e2e
before deploying (e.g. in CI environments):
pnpm build
pnpm test:e2e