The app uses Firebase for authentication, where both email signup and phone number signup are integrated.
The app also uses Firebase Firestore to store users' data, and it connects to
the Paystack API to get bank details of users. 🔥 Firebase authentication
✉️ Email signup and phone number signup
🔥 Firebase Firestore for data storage
🌠 Paystack API integration for getting bank details of users
😊 Apply for personal loans
😊 Apply for business loans
Before you start, make sure you have the following installed:
🤖 Node.js
⚛️ React Native expo
💻 VS Code or Your favorite IDE
1.Clone the repository:
git clone https://github.com/<your-username>/react-native-flutter-loans.git
2.Install dependencies:
cd react-native-loan-app
npm install
3.Run the app on an Android device or emulator:
npx react-native run-android
Or, run the app on an iOS device or emulator:
npx react-native run-ios
Or, run the app on expo:
npm expo start
To configure Firebase authentication and Firestore, follow these steps:
Go to the Firebase console and create a new project.
Enable Authentication and Firestore in your Firebase project.
1.Install Firebase using npm:
npm install firebase
2.Initialize Firebase in your app and create a Firebase App object:
import { initializeApp } from 'firebase/app';
// TODO: Replace the following with your app's Firebase project configuration
const firebaseConfig = {
//...
};
const app = initializeApp(firebaseConfig);
3.Access Firebase in your app:
import { initializeApp } from 'firebase/app';
import { getFirestore, collection, getDocs } from 'firebase/firestore/lite';
// Follow this pattern to import other Firebase services
// import { } from 'firebase/<service>';
// TODO: Replace the following with your app's Firebase project configuration
const firebaseConfig = {
//...
};
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
// Get a list of cities from your database
async function getCities(db) {
const citiesCol = collection(db, 'cities');
const citySnapshot = await getDocs(citiesCol);
const cityList = citySnapshot.docs.map(doc => doc.data());
return cityList;
}
To use the Paystack API, you will need to sign up for a Paystack account and obtain an API key.
Once you have your API key, add it to the config.js file in the project.