Skip to content

ItStep-courses/React-Native-Practice-Final-Work

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Below is a revised and well-formatted README for the project:


Dish Management App

Table of Contents

  1. Description
  2. Project Structure
  3. Installation
  4. Environment Variables
  5. Usage
  6. API Endpoints
  7. Future Improvements

Description

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.


Project Structure

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

Installation

Server (back-end)

  1. Navigate to the back-end/ folder:
    cd back-end
  2. Install dependencies:
    npm install
  3. Create a .env file with the following example values:
    PORT=5000
    MONGO_URI=mongodb://localhost:27017/mydatabase
    
  4. Run the server:
    npm start
    The server will run on http://localhost:5000.

Client (front-end)

  1. Navigate to the mobile/ folder:
    cd mobile
  2. Install dependencies:
    npm install
  3. Update API URLs in your client configuration (e.g., in src/config/constants.js) to point to:
    http://localhost:5000/api
    
    (Replace localhost with your computer's IP if testing on a physical device.)
  4. Start the Expo project:
    npm start
    Use Expo Go on your mobile device or an emulator to run the app.

Environment Variables

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).


Usage

  • 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.

API Endpoints (Example)

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

Future Improvements

  • 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.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks