fswd university lab writing part
fswd university lab writing part
Software Required:
• Frontend: Flutter (Dart)
• Backend: Firebase, Node.js, Django (choose one)
• Database: Firebase Firestore or SQLite
• Development Platform: Windows
• Tools: Visual Studio Code, Android Studio/Flutter SDK, Firebase
Console
1. Initialize the Project: Set up the Flutter app, connect it with Firebase,
and configure backend services.
2. Design User Interface: Create screens for viewing the menu, cart
management, checkout, and order tracking.
3. Fetch and Display Menu: Retrieve the restaurant's menu from Firebase
Firestore or the database and show it on the UI.
4. Handle Cart Operations: Allow users to add, remove, and update items
in their cart.
5. Process Order and Payment: Save the order details in the database and
integrate a secure payment gateway for transactions.
6. Enable Order Tracking: Update and display real-time order status using
Firebase or backend services.
Pseudocode for Frontend (Flutter - Dart)
# Initialize Firebase and Flutter
initializeFirebase();
initializeFlutterApp();
# Checkout Process
function onCheckout():
orderId = sendOrderToBackend(cart);
navigateToPaymentPage(orderId);
# Process Payment
function processPayment(orderId, paymentDetails):
paymentStatus = paymentGateway.process(paymentDetails);
if paymentStatus == "Success":
database.update("orders", {"status": "Placed"}, where={"id": orderId});
return paymentStatus;
# Run Backend
startServer();
Orders Collection:
- id: String
- userId: String
- items: Array
- totalAmount: Float
- status: String (e.g., "Placed", "In Transit", "Delivered")
- paymentStatus: String (e.g., "Pending", "Success", "Failed")
# Example Queries
OUTPUT:
RESULT:
The food delivery website was successfully executed on the Windows platform.