Skip to content

Commit

Permalink
updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nishu-saini committed Nov 8, 2023
1 parent 3b84339 commit f4476ef
Show file tree
Hide file tree
Showing 3 changed files with 1,111 additions and 144 deletions.
118 changes: 117 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Kitchen-Maestro-Server
# Kitchen-Maestro-Server# Kitchen-Maestro-Server

Kitchen-Maestro is a server-side application built using Django that serves as a virtual recipe box.

Expand All @@ -17,3 +17,119 @@ This README file provides an overview of the key features and functionalities of
- **Uploading and Viewing Images**: Kitchen-Maestro supports image uploads, allowing users to attach pictures of their dishes to their recipes.

## APIs

### USER

- **POST**: `/api/user/create`

- **GET**: `/api/user/me`

- **PUT**: `/api/user/me`

- **PATCH**: `/api/user/me`

- **POST**: `/api/user/token`

### RECIPE

- **GET**: `/api/recipe/ingredients`

- **PUT**: `/api/recipe/ingredients/{id}`

- **PATCH**: `/api/recipe/ingredients/{id}`

- **DELETE**: `/api/recipe/ingredients/{id}`

- **GET**: `/api/recipe/recipes/`

- **POST**: `/api/recipe/recipes/`

- **GET**: `/api/recipe/recipes/{id}`

- **PUT**: `/api/recipe/recipes/{id}`

- **PATCH**: `/api/recipe/recipes/{id}`

- **DELETE**: `/api/recipe/recipes/{id}`

- **POST**: `/api/recipe/recipes/{id}/upload-image`

- **GET**: `/api/recipe/tags`

- **PUT**: `/api/recipe/tags/{id}`

- **PATCH**: `/api/recipe/tags/{id}`

- **DELETE**: `/api/recipe/tags/{id}`

### SWAGGER DOCS

- **Endpoint**: `/api/docs`

### ADMIN

- **Endpoint**: `/admin/`

**NOTE**: For more detail about API endpoint follow [api-docs](api-docs).

## Installation Guide

**NOTE**: The `main` branch of the repository is ahead by some commits and is set for deployment. For testing purposes, use the `delete-commit-branch`.

- Make sure you have the following tools and software installed:
- Docker
- Docker-Compose
- Python (for Django)
- Postgres database

1. Clone the repository to your local machine (`delete-commit-branch`):

```bash
git clone https://github.com/nishu-saini/Kitchen-Maestro-Server/tree/delete-commit-branch
```

2. Open terminal in project root directory and create a python virtual environment

```bash
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
```

3. Install the project dependencies:

```bash
pip install -r requirements.txt
```

4. Build docker image:

- Note: This will also create the necessary migrations needed to create the database in Django.

```bash
docker-compose build
```

5. Create a superuser for the Django admin:

- Note: Remember email and password for admin route, otherwise need to make new admin user to access admin route.

```bash
docker-compose run --rm app sh -c 'python manage.py createsuperuser'
```

6. To run unit tests, use the following command:

```bash
docker-compose run --rm app sh -c 'python manage.py test'
```

7. Start development server

```bash
docker-compose up
```

## Usage

- Access the API at http://localhost:8000/api/docs.
- Access the Django admin at http://localhost:8000/admin/ to manage recipes and users.
Loading

0 comments on commit f4476ef

Please sign in to comment.