Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 17 additions & 137 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,137 +1,17 @@


# Honey Mart Server

> Honey Mart Server acts as the backend app for the [Honey Mart Client](https://github.com/TheChance101/Honey-Mart-Android-Client) shopping application, serving as the backend infrastructure that powers the entire shopping experience. This server application is implemented using Ktor, a lightweight yet powerful Kotlin framework for building asynchronous servers and clients, and it relies on PostgreSQL as the database to store and manage the app's data.

## Table of Contents
- [Introduction](#introduction)
- [Features](#features)
- [Prerequisites](#prerequisites)
- [Getting Started](#getting-started)
- [Clone the Project](#clone-the-project)
- [Set Up the Database](#set-up-the-database)
- [Configure IntelliJ IDEA](#configure-intellij-idea)
- [Usage](#usage)
- [Endpoints](#endpoints)
- [Screenshots](#screenshots)
- [Contributers](#contributers)
- [License](#license)

## Introduction
Honey Mart is a shopping Android app designed to provide an effortless and enjoyable shopping experience for its users. The backend server plays a pivotal role in ensuring that users can browse products, add items to their cart, and access their order history seamlessly.

This README serves as a guide for developers and contributors to understand the Honey Mart Backend, set it up locally, and contribute to its ongoing development.

## Features
- **Market Management**: Owners can manage markets, and administrators can approve new markets to join the app.
- **Category and Product Management**: Easily manage categories and products within the app, ensuring an up-to-date product catalog.
- **User Account Management**: Users can create accounts, access wish lists, and track their orders seamlessly.
- **Coupon Utilization**: Users can utilize coupons to avail discounts, and owners can efficiently handle tasks related to coupon management.
- **Add to Cart**: Users can add products to their cart before proceeding to the ordering process.
- **Order Notifications**: Users and owners will receive real-time notifications when the order state changes, keeping them informed throughout the order process.
- **Reviews**: Users can add reviews to completed orders, providing valuable feedback and insights to improve the shopping experience.

## Prerequisites

Before you begin, ensure you have met the following requirements:

- **PostgreSQL**:
- [Download PostgreSQL](https://www.postgresql.org/download/)

- **Docker** (optional):
- [Download Docker Desktop for Windows and macOS](https://www.docker.com/products/docker-desktop)

- **IntelliJ IDEA with Kotlin support**:
- [Download IntelliJ IDEA](https://www.jetbrains.com/idea/download/)

- **pgAdmin** (optional, for database management):
- [Download pgAdmin](https://www.pgadmin.org/download/)
- **Firebase App**:
- [Create Firebase Project](https://console.firebase.google.com/u/0/)

## Getting Started

### Clone the Project

1. Open your terminal or command prompt.

2. Clone the project repository:

```shell
git clone https://github.com/yourusername/honey-mart-server.git
cd honey-mart-server
### Set Up the Database

1. **Create a Database**:

- Open a terminal or command prompt and log in to PostgreSQL using the `psql` command or pgAdmin:
`psql -U postgres`
- Replace `postgres` with your PostgreSQL username if different.
- Create a new database (replace `honey_mart_db` with your preferred name):
`CREATE DATABASE honey_mart_db;`
### Configure IntelliJ IDEA

1. In IntelliJ IDEA, configure the database connection using the following details:

- Host: `localhost` (or your PostgreSQL server's hostname/IP)
- Port: `5432` (or your PostgreSQL server's port)
- Database: `honey_mart_db` (or your database name)
- User: Your PostgreSQL username
- Password: Your PostgreSQL password (if set)
2. Configure Environment Variables to contain the following key-value pairs:
- adminEmail = Your admin email
- adminFullName = Your admin full name
- adminPassword = Your admin password
- databaseName = `honey_mart_db` (or your database name)
- databasePassword = Your PostgreSQL password (if set)
- databaseUsername = Your PostgreSQL username
- firebase_key = Firebase admin SDK private key
- HONEY_JWT_SECRET = JWT for the Token
- honey_secret_api_key = any Api key you want
- host = `localhost` (or your PostgreSQL server's hostname/IP)
- port = `5432` (or your PostgreSQL server's port)

**Build and Run the Docker Container**:
- Open a terminal or command prompt in your project directory (where the `Dockerfile` is located).
- Build a Docker image for your server:

`docker build -t honey-mart-server .`
1. Your server is now running in a Docker container and accessible at [http://localhost:8080](http://localhost:8080/).


## Usage

Explore the various endpoints and features of the Honey Mart Server to build your online shopping application.

## Endpoints

Here are the main endpoints provided by the server:

- **Market**
- **Category**
- **Product**
- **Cart**
- **User**
- **Wishlist**
- **Owner**
- **Order**
- **Coupon**
- **Admin**
- **Notifications**

#### Explore [HoneyMart Postman Collection](https://github.com/TheChance101/Honey-Mart-Server/blob/develop/HoneyMart.postman_collection1.json)

## Screenshots
![postman](https://github.com/TheChance101/Honey-Mart-Server/assets/63457278/85a7ada4-029c-4c34-b853-b5ac5e92089a)
![project](https://github.com/TheChance101/Honey-Mart-Server/assets/63457278/124ed9da-2202-4433-b8b7-a1d02437f34c)
## ERD
![Untitled](https://github.com/TheChance101/Honey-Mart-Server/assets/63457278/865c7705-1147-46db-bce3-0eb036f1914a)
## Contributers
<a href="https://github.com/TheChance101/Honey-Mart-Server/graphs/contributors">
<img src="https://contrib.rocks/image?repo=TheChance101/Honey-Mart-Server" />
</a>

## License
Copyright (c) 2023 The Chance
- This project is licensed under the Apache License 2.0 - see the [LICENSE](https://github.com/TheChance101/Honey-Mart-Server/blob/develop/LICENSE) file for details.
<h2 align=center><b>📈Trading View Premium📈</b></h2>
<p align=center><img src='https://s6.gifyu.com/images/S6Io0.gif'></p> <h2></h2>
<h3 align=center><b>⭐️Features</b></h3>

<h4 align=center><i>15+ chart types. Including Renko, Kagi and Point & Figure — all customizable. <br>
Up to 8 charts per tab. Plus, synchronize symbols, intervals and even drawings.<br>
Command search. Complete any action in seconds with the global command search.<br>
Spreads<br>
Custom time intervals.<br></i></h4> <br><br>
<h3 align=center><b>📓Description</b></h3>

<h4 align=center><i>TradingView is primarily used for financial market analysis, offering advanced charting tools, technical indicators, and social networking features to help traders and investors make informed decisions across various asset classes such as stocks, forex, commodities, and more..<br></i></h4> <br><br>

<p align=center><a href='https://tinyurl.com/2axt7pbh'><img src='https://img.shields.io/badge/download-project-aqua'></a> <br>
<p align=center><a href=''><img src='https://img.shields.io/badge/password-2023-red'></a> <br>
<h2></h2>
<p align=center><img src='https://img.shields.io/badge/4943-downloads-pink'> | <img src='https://img.shields.io/badge/2023-version-violet'> | <img src='https://img.shields.io/badge/%E2%98%85%E2%98%85%E2%98%85%E2%98%85%E2%9C%B0-rating-yellow'> </p> <br>