Food-App is a full-stack TypeScript-based web application that allows users to browse, order, and manage food-related services. The project is split into two main parts:
- Frontend: A React-based application that handles the user interface and interaction.
- Backend: A Node.js application that handles the server-side logic, including data storage, authentication, and API requests.
- React: A JavaScript library for building user interfaces.
- TypeScript: A strongly-typed superset of JavaScript that improves code quality and maintainability.
- Zod: A TypeScript-first schema declaration and validation library for validating data, ensuring type safety in forms and API responses.
- Zustand: A minimalistic state management library for React to manage global app state.
- Tailwind CSS: A utility-first CSS framework for styling the frontend and making it responsive.
- Node.js: A JavaScript runtime built on Chrome's V8 engine for building fast and scalable server-side applications.
- Express.js: A lightweight web application framework for Node.js to build RESTful APIs.
- MongoDB: A NoSQL database for storing user profiles, orders, and restaurant/menu data.
- JWT (JSON Web Tokens): For secure user authentication, ensuring safe communication between client and server.
- Stripe: For handling secure payments when users place orders.
- Cloudinary: For storing and fetching images (e.g., restaurant logos, food images).
-
Restaurant Search:
- Users can search for restaurants based on the place or type of food they are interested in. The frontend fetches matching restaurants and displays relevant results.
- Example search options include "Indian cuisine in New York" or "Pizza places near me."
-
Restaurant Exploration:
- After searching, users can view detailed information about the restaurant, including:
- Menu items
- User ratings and reviews
- Address and contact information
- Users can add their preferred dishes to the cart directly from the restaurant page.
- After searching, users can view detailed information about the restaurant, including:
-
Order Placement:
- Users can select their favorite meals and add them to the cart.
- After selecting items, users can proceed to checkout, where they can securely pay using Stripe.
-
User Authentication:
- JWT is used to authenticate users securely.
- When a user logs in, a token is generated and sent back to the client to authorize further requests.
-
Stripe Integration:
- The backend handles payment requests through Stripe.
- Orders placed by users are processed using Stripe's secure API, ensuring proper transactions and payment confirmations.
Clone the repository to your local machine:
git clone https://github.com/Grgnavin/Food-App.git
-
Navigate to the
client
directory:cd client
-
Install dependencies:
npm install
-
Run the project:
npm start
-
Navigate to the
server
directory:cd server
-
Install dependencies:
npm install
-
Run the project:
npm start
Make sure to create .env
files for both the client and server with the necessary configuration:
PORT=5000
DB_URI=your_mongo_database_uri
JWT_SECRET=your_jwt_secret_key
STRIPE_SECRET_KEY=your_stripe_secret_key
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
The backend will be available at http://localhost:8000
, and the frontend will be available at http://localhost:8000
.
You can deploy both the frontend and backend to platforms like Heroku, Netlify, or Vercel. Make sure to update the environment variables for production and configure your Stripe and Cloudinary keys accordingly.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -am 'Add new feature'
). - Push the branch to your forked repository (
git push origin feature-branch
). - Create a pull request.
- Project Description: Update the "Description" part at the top based on the exact features of your app.
- Technologies Used: Adjust the list to match the exact tools you're using.
- Environment Variables: Ensure the
.env
sections are correct for your actual setup. - Deployment: Add more specifics if you're deploying to specific platforms.
Let me know if you need further adjustments!