https://github.com/eddi3ms/sopha
https://github.com/eddi3ms/sopha
firebase react-hook-form reactjs redux-toolkit shadcn vite zod
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/eddi3ms/sopha
- Owner: Eddi3MS
- Created: 2024-03-04T21:10:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-08T21:07:54.000Z (over 2 years ago)
- Last Synced: 2025-03-30T23:41:15.610Z (over 1 year ago)
- Topics: firebase, react-hook-form, reactjs, redux-toolkit, shadcn, vite, zod
- Language: TypeScript
- Homepage: https://sopha-eight.vercel.app
- Size: 104 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pra rodar:
## Criar um projeto no firebase, e em configurações adicionar um 'App da Web' > , isso te dará as chaves indicadas no .env abaixo
# crie um arquivo .env e inclua suas chaves nesse formato:
```cmd
VITE_URL="http://localhost:5173/login"
VITE_FB_ApiKEY=***
VITE_FB_AuthDomain=***
VITE_FB_ProjectId=***
VITE_FB_StorageBucket=***
VITE_FB_MessagingSenderId=***
VITE_FB_AppId=***
```
## Configurare o Authentication no firebase para aceitar login no formato email/senha:

## src/firebase-config.ts consumindo as variaveis do .env
```js
import { initializeApp } from 'firebase/app'
import { getAuth } from 'firebase/auth'
const firebaseConfig = {
apiKey: import.meta.env.VITE_FB_ApiKEY,
authDomain: import.meta.env.VITE_FB_AuthDomain,
projectId: import.meta.env.VITE_FB_ProjectId,
storageBucket: import.meta.env.VITE_FB_StorageBucket,
messagingSenderId: import.meta.env.VITE_FB_MessagingSenderId,
appId: import.meta.env.VITE_FB_AppId,
}
const app = initializeApp(firebaseConfig)
export const auth = getAuth(app)
```
só rodar.. ```npm run dev```