Before developing the app, I conducted user research to understand my target audience’s preferences and behavior regarding online food ordering. This research informed the app's design and functionality.
- Steps for conducting this study: I created a survey to gather user insights, followed up with in-depth interviews, and analyzed the data to inform design decisions.
- How often do you order food online?
- Do you prefer to browse by food categories (e.g., appetizers, desserts) or by popularity?
- What do you find frustrating about food delivery apps?
- What payment method do you prefer (card, PayPal, digital wallets)?
- How important is fast checkout?
Form Link: Survey for Food Delivery App
Based on the responses, the target audience is:
- Age: 21-46.
- Preferences: Fast, easy-to-use menu browsing, with a preference for category filtering and fast checkout processes.
- Pain Points: Complicated navigation and slow checkout.
Based on this data, I created personas, a site map, and a prototype to guide the project.
Persona Link: Link to Personas
Lo-Fi Prototype Link: Link to Prototype
Site Map Link: Link to Sitemap
For the frontend, I used React with JSX and CSS to design a clean, responsive, and user-friendly interface. Below are the steps I followed to set up the frontend:
-
Install React with Vite:
npm create vite@latest --template react
Chose React (JavaScript) for the project.
-
CSS for Styling:
- I used CSS to style the components for flexibility and full control over the design.
- CSS files are linked directly to each React component for modular and maintainable styling.
-
Frontend Tools:
- React (JSX)
- CSS for custom styling
- React Router for page navigation
-
Category-Based Menu:
- Users can browse food items organized into categories such as Salad, Rolls, Sandwich, Cake, Pure Veg, Pasta, Noodles and Desserts,
-
Cart Management:
- Users can add items to their cart, adjust quantities, and proceed to checkout.
-
User Authentication:
- User sign-up and login features are implemented with JWT-based authentication to ensure secure sessions.
-
Stripe Integration for Payment:
- Stripe is integrated into the checkout page for secure online payments, ensuring smooth transactions.
-
Responsive Design:
- The app is responsive, optimized for mobile, tablet, and desktop using media queries in CSS.
For the backend, I used Node.js and Express with JavaScript. Below are the steps to set up the backend:
-
Initialize Node.js and Express:
npm init -y npm install express dotenv
This sets up the basic Node.js environment with Express as the web server.
-
CORS Setup:
npm install cors
Configured CORS to allow requests from the frontend.
-
Backend Tools:
- Node.js
- Express for server-side handling
- MongoDB for database management
- Stripe API for handling payments
-
File Structure:
- app.js: Handles Express routes and middleware.
- server.js: Runs the server on a specified port.
- routes: Manages different routes for authentication, menu, and orders.
-
User Authentication:
- JWT-based user authentication (register, login, and logout).
-
Menu Management:
- API routes to get food items based on their categories.
-
Order Management:
- Orders are placed and stored in MongoDB, including order status and delivery details.
-
Stripe Payment Integration:
- Stripe API is used to process payments securely. Backend routes are created to initiate and confirm payments.
For the database, I used MongoDB to store user details, food items, and order information.
-
MongoDB Connection:
- I used Mongoose to connect to MongoDB and define schema models.
npm install mongoose
-
Schema Models:
- User: Stores user credentials, order history, and personal details.
- Menu Item: Stores food items categorized by type.
- Order: Stores the order information, including the user, items ordered, payment status, and delivery address.
Stripe is integrated for processing payments.
-
Install Stripe SDK:
npm install stripe
-
Payment Process:
- Users can pay using Stripe, with backend routes handling the payment initiation and confirmation.
- Webhooks are used to listen for payment events from Stripe, ensuring payments are completed securely.
Sure! Here’s another version for your documentation:
For testing purposes, I utilized Thunder Client to test CRUD operations on user accounts and menu items, including login and registration functionalities. Additionally, I employed Insomnia to simulate HTTP requests and validate the overall API functionality.
- GET /menu: Tested the retrieval of food items by category.
- POST /orders: Verified the process of placing an order and confirming payment.
- POST /payments: Checked the initiation and confirmation of payments through Stripe.