This is a Next.js project.
Edit the .env.local.example
file and rename it to .env.local
.
Edit src/data/config.js
.
Enable Authentication and set up email and password login.
Enable Realtime Database.
Rules: run node src/helpers/firebaseRuleMaker.js
and copy the output into the rules.
Enable Cloud Storage. Cloud Storage is only used to store payment proofs.
Rules:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /paymentProof/{userId}/{document} {
allow read: if true
allow create: if request.auth.uid == userId;
}
}
}
Create a web app from Firebase.
Update the Firebase config in /src/data/config.js
.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.