- Change name of .env.example to .env.development
- Fill all fields with values from firebase project
- Install node packages with
npm i
command in terminal while beeing inside of project directory
Any environment variable prefixed with VITE_
has the potential to be leaked to the client browser if you use it in your Svelte components. Make sure to do the following to keep potential secrets safe:
- ✅ ALWAYS: Only use secret keys in "endpoints" or other server-side code (e.g. a database connection string, auth token or secret)
- 🛑 NEVER: do something like
const env = import.meta.env
in a component as now anyone can access all the values attached toenv
. - 🛑 NEVER: access your private environment variables in React components or routes (e.g. DON'T do this in a component:
console.log(import.meta.env.VITE_DATABASE_URL)
).
- project created using
$ npm create vite@latest
- react router
- firebase
- react-firebase-hooks
- react-hook-form
- yup schema resolver for validation
- react-tostify
- dayjs for date formatting