A bookstore web application
- Create a project in firebase and enable authentication via email & password and google(social login) and Firestore database
- Create a collection in firestore named
users - Create an initial document with the following keys
fullnameandemailwith type as string for both and save - Set rules in firestore by navigating to
Firestore database>Rules
In the editor below,replace the pre-existing rule and add the following:allow read, write: if request.resource.data.uid == request.auth.uid;allow read, write: if resource.data.uid == request.auth.uid; - Create an account in RapidAPI and subscribe to the HAPI Books API(to get live book data in the application)
- Clone the project into your local machine
- create a
.env.localfile in your project's root - create a key variable as
VITE_API_KEY=and append your RapidAPI's api key to it - create another key variable as
VITE_API_HOST=and append your RapidAPI's api host to it - add your firebase's project credentials to the keys stored in
root>src>auth>Firebase.tsfile - run
npm installin your editor's terminal to install dependencies - run
npm run devto view it in your browser 🎉
Bonus tip: take note of the ip address in the terminal besides the Network option and paste it in any device which you want to view in! (PS: both you local machine and the external device must be connected to the same network)
- React
- TailwindCSS
- Typescript