Cravings
Feed Your Craving, Anytime
The problem Cravings solves
The Problem It Solves
Many people rely on food delivery platforms to order meals from nearby restaurants, but existing systems often have limitations such as high commission fees for restaurants, lack of transparency in payments, and limited control for small or local food businesses.
The Cravings platform aims to solve these problems by providing a complete food ordering and delivery management system where customers, restaurants, and delivery partners can interact efficiently within a single platform.
Customers can easily browse restaurants, view menus, and place orders online, making the food ordering process faster and more convenient. Restaurants get a dedicated dashboard where they can manage menus, update food items, track orders, and manage their business digitally without relying completely on third-party platforms.
The platform also helps delivery partners by providing a system to manage delivery requests and track orders, which improves the overall delivery process.
By combining these features into a single MERN stack application, Cravings simplifies the food ordering workflow, improves operational efficiency for restaurants, and provides a convenient experience for customers while maintaining a scalable and secure system for online food services.
Challenges we ran into
Challenges I Ran Into
While working on the Cravings MERN full-stack food delivery platform, we encountered several challenges during development.
1. Environment Variables & Payment Configuration
One of the major issues occurred while integrating the payment gateway. The backend was throwing errors such as “key_id or oauthToken is mandatory”. This happened because the payment credentials were not properly loaded from the .env file.
We solved this by carefully configuring environment variables, ensuring the correct variable names were used in the backend code and restarting the server so the environment variables could load properly.
2. Authentication & Role-Based Access
Since the platform supports multiple roles (Customer, Restaurant, Rider, Admin), managing authentication and authorization was challenging. Sometimes protected routes were not recognizing the logged-in user correctly.
We fixed this by implementing JWT-based authentication and middleware checks, ensuring that each API route validates the user's role before allowing access.
3. Frontend–Backend Connection Issues
Another hurdle was connecting the React frontend with the Express backend APIs. Occasionally requests failed due to incorrect API URLs or CORS configuration.
We resolved this by properly configuring the API base URL, enabling CORS on the server, and testing endpoints with tools like Postman before connecting them to the frontend.
4. Database Connection Problems
During development we also faced issues connecting the application to MongoDB, especially when the connection string or network access settings were incorrect.
After reviewing the MongoDB URI and environment configuration, we successfully established a stable database connection.
Learning Outcome
These challenges helped us gain deeper understanding of environment configuration, authentication systems, API integration, and full-stack debugging, which are essential skills for building scalable web applications.
Tracks Applied (1)
Algorand Bharat
Algorand Bharat
Technologies used
