Below is a revised and well-formatted README for the project:
- Description
- Project Structure
- Installation
- Environment Variables
- Usage
- API Endpoints
- Future Improvements
This is a learning project for a Dish Management App. The application enables users to manage dishes by creating, viewing, editing, deleting, and searching for them. Features include:
- Create a Dish: Input details such as name, description, cooked date/time, tags, and priority.
- View Dishes: See a list of dishes and detailed information for each dish.
- Edit & Delete: Modify or remove existing dishes.
- Search & Filter: Find dishes based on various criteria (e.g., name, description, tags, priority).
The project is built as a full-stack application with a back-end powered by Node.js, Express, and MongoDB, and a front-end mobile application developed using React Native with Expo.
DishManagementApp/
├─ back-end/ # Node.js + Express + MongoDB back-end
│ ├─ config/ # Database configuration and other settings
│ ├─ controllers/ # Request handling
│ ├─ models/ # Mongoose schemas
│ ├─ routes/ # API endpoints
│ ├─ middleware/ # Custom middleware
│ ├─ .env # Environment variables
│ ├─ server.js # Server entry point
│ └─ package.json
└─ mobile/ # React Native (Expo) front-end
├─ assets/ # Images, fonts, etc.
├─ components/ # Reusable UI components
├─ config/ # Global configuration
├─ navigation/ # Navigation setup
├─ screens/ # Screens
├─ services/ # API services
├─ App.js # Mobile app entry point
└─ package.json
- Navigate to the
back-end/folder:cd back-end - Install dependencies:
npm install
- Create a
.envfile with the following example values:PORT=5000 MONGO_URI=mongodb://localhost:27017/mydatabase - Run the server:
The server will run on
npm start
http://localhost:5000.
- Navigate to the
mobile/folder:cd mobile - Install dependencies:
npm install
- Update API URLs in your client configuration (e.g., in
src/config/constants.js) to point to:(Replacehttp://localhost:5000/apilocalhostwith your computer's IP if testing on a physical device.) - Start the Expo project:
Use Expo Go on your mobile device or an emulator to run the app.
npm start
In the back-end .env file, include:
PORT=5000
MONGO_URI=your_mongo_connection_string
You can add more variables as needed (e.g., JWT_SECRET).
- Create a Dish: Fill out the form with details (name, description, cooked date/time, tags, and priority) and submit.
- View Dishes: Browse a list of all dishes.
- Edit a Dish: Modify dish details by navigating to the edit screen.
- Delete a Dish: Remove a dish with delete functionality.
- Search & Filter: Use search and filter screens to find dishes based on various criteria.
GET /api/dishes
POST /api/dishes
GET /api/dishes/:id
PUT /api/dishes/:id
DELETE /api/dishes/:id
GET /api/dishes/search
GET /api/dishes/filter
- Add authentication and authorization (e.g., JWT).
- Implement notifications (push or email).
- Allow file uploads for dish images.
- Provide advanced filtering and sorting options.
- Enhance UI/UX with additional animations and themes.
This README outlines the initial requirements and setup for the project, including the server running on port 5000, and covers the basic features of the Dish Management App.