bash
cd fyp/front-end
npm install
npm start
bash
cd java_backendmvn clean installmvn spring-boot:run
bash
cd fyp/flask_model_service
pip install -r requirements.txt
python app.py
- Go to Firebase Console
- Click "Add Project" and follow setup wizard
- In Firebase Console, click the web icon (</>)
- Register app with a nickname
- Copy the Firebase configuration:
Create front-end/src/firebase.jsx:
import { initializeApp } from "firebase/app";
import { getAnalytics } from "firebase/analytics";
import { getFirestore } from 'firebase/firestore';
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: "",
authDomain: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: "",
measurementId: ""
};
// Initialize Firebase
const firebaseApp = initializeApp(firebaseConfig);
const analytics = getAnalytics(firebaseApp);
const db = getFirestore(firebaseApp);
export { firebaseApp, db, analytics };- Go to Authentication > Sign-in method
- Enable Email/Password
- Enable Google Sign-in (optional)
- Go to Firestore Database
- Create database in test mode
- Choose a location
- Set up security rules:
// firestore.rules
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Allow read/write only for authenticated users
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
match /{userId}/{documentId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
}
}