Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swarajkumarsingh/olx-clone
Olx clone, with Golang, PostgreSQL, Redis, docker, AWS S3, AWS SES, AWS SQS to achieve blazing performance, with features like product, user, seller, review, report-product, favorite. Monitoring using Prometheus & Grafana, local development using air and many more
https://github.com/swarajkumarsingh/olx-clone
aws aws-ses aws-sqs backend clone docker go-air golang grafana olx-clone postgresql prometheus redis
Last synced: about 10 hours ago
JSON representation
Olx clone, with Golang, PostgreSQL, Redis, docker, AWS S3, AWS SES, AWS SQS to achieve blazing performance, with features like product, user, seller, review, report-product, favorite. Monitoring using Prometheus & Grafana, local development using air and many more
- Host: GitHub
- URL: https://github.com/swarajkumarsingh/olx-clone
- Owner: swarajkumarsingh
- License: mit
- Created: 2023-10-17T20:28:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-14T07:37:21.000Z (5 months ago)
- Last Synced: 2024-06-14T08:50:44.387Z (5 months ago)
- Topics: aws, aws-ses, aws-sqs, backend, clone, docker, go-air, golang, grafana, olx-clone, postgresql, prometheus, redis
- Language: Go
- Homepage: https://github.com/swarajkumarsingh/olx-clone
- Size: 10.6 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
#
Olx clone(Backend)
___
---
## Overview
Olx clone, with Golang, PostgreSQL, Redis, docker, AWS S3, AWS SES, AWS SQS to achieve blazing performance, with features like product, user, seller, review, report-product, favorite and many more, this product compress of 25+ working APIs, also health API.## Table of Contents
- [Features](#features)
- [Prerequisites](#prerequisites)
- [Getting Started](#getting-started)
- [Environment Variables](#environment-variables)
- [Contributing](#contributing)
- [Contact](#contact)
- [License](#license)- [Go](https://golang.org/)
- [Docker](https://www.docker.com/)
- [Gin](https://gin-gonic.com)
- [PostgreSQL](https://www.postgresql.org/)
- [Redis](https://redis.io/)
- [AWS S3](https://aws.amazon.com/)
- [AWS SES](https://aws.amazon.com/)
- [AWS SQS](https://aws.amazon.com/)## Prerequisites
- [Docker](https://www.docker.com/)
## Features
- Olx clone with 25+ working APIs
- For scale we used AWS SES for email service
- For scale we used AWS S3 for file storage
- Performance DB we used PostgresQL
- Dockerized for easy deployment## Environment Variables
Table bellow shows the obligatory environment variables for mariadb container. You should set them based on what was also set for backend container.
Environment variable | Default value | Optional
--- | --- | ---
STAGE | "" | `YES`
DB_HOST | http://127.0.0.1 | `YES`
DB_PORT | 5432 | `YES`
DB_USER | user | `YES`
DB_PASSWORD | postgres | `YES`
DB_NAME | olx-clone | `YES`
REDIS_HOST | | `NO`
REDIS_PORT | | `NO`
REDIS_USER | | `NO`
REDIS_PASSWORD | | `NO`
SENTRY_DSN | | `NO`
DD_AGENT_HOST | | `NO`
S3_BUCKET | | `NO`## Getting started
```
First of all, correctly configure the Golang development environment on your machine, see https://go.dev/doc/install
- Clone this repository:
$ git clone https://github.com/swarajkumarsingh/olx-clone- Enter in directory:
$ cd olx-clone- For install dependencies(optional):
$ make install- Run the app:
$ ./run.sh
```---
## DataBase Design
#### User Table| Column Name | Data Type | Description |
| ----------- | --------- | --------------------------------- |
| id | INT (Primary Key) | Unique identifier for each user |
| username | VARCHAR(255) | Unique identifier for each user |
| fullname | VARCHAR(255) | User's fullname |
| avatar | TEXT | User's profile picture |
| email | VARCHAR(255) | User's email address |
| password | VARCHAR(255) | Securely hashed password |
| location | TEXT | User's profile picture |
| coordinates | TEXT | User's profile picture |
| otp | TEXT | User's profile picture |
| otp_expiration | TIMESTAMP | OTP timestamp |
| created_at | TIMESTAMP | Timestamp of account creation |
| updated_at | TIMESTAMP | Timestamp of account modification|
#### Seller Table| Column Name | Data Type | Description |
| ----------- | --------- | --------------------------------- |
| id | INT (Primary Key) | Unique identifier for each seller |
| username | VARCHAR(255) | Unique identifier for each seller |
| fullname | VARCHAR(255) | Seller's fullname |
| description | TEXT | Seller description |
| is_verified | BOOLEAN | Checks if the seller is verified |
| avatar | TEXT | Seller's profile picture |
| phone | VARCHAR(12) | Seller's phone |
| email | VARCHAR(100) | Seller's email address |
| password | VARCHAR(255) | Securely hashed password |
| city | VARCHAR(50) | Seller's city |
| state | VARCHAR(50) | Seller's state |
| country | VARCHAR(50) | Seller's country |
| zip_code | VARCHAR(50) | Seller's zip-code |
| location | TEXT | Seller's location |
| coordinates | TEXT | Seller's coordinates |
| rating | TEXT | Seller's rating |
| account_status | TEXT | Seller's account_status |
| otp | TEXT | Seller's otp |
| otp_expiration | TIMESTAMP | OTP timestamp |
| created_at | TIMESTAMP | Timestamp of account creation |
#### Product Table| Column Name | Data Type | Description |
| ----------- | --------- | --------------------------------- |
| id | INT (Primary Key) | Unique identifier for each seller |
| title | VARCHAR(255) | Title's for the product |
| description | TEXT | Seller description |
| location | TEXT | Seller's location |
| coordinates | TEXT | Seller's coordinates |
| views | BIGINT | Views count |
| price | VARCHAR(100) | Views count |
| seller_id | ID | Seller's ID |
| created_at | TIMESTAMP | Timestamp of account creation |
#### Review Table| Column Name | Data Type | Description |
| ----------- | --------- | --------------------------------- |
| id | ID (Primary Key) | Unique identifier for each seller |
| user_id | ID | User's ID |
| product_id | ID | Products's ID |
| rating | TEXT | Products's rating |
| comment | TEXT | Products's comment |
| created_at | TIMESTAMP | Timestamp of account creation |
#### Seller Reports Table| Column Name | Data Type | Description |
| ----------- | --------- | --------------------------------- |
| id | ID (Primary Key) | Unique identifier for each seller |
| user_id | ID | User's ID |
| product_id | ID | Products's ID |
| message | VARCHAR(100) | Report message |
| created_at | TIMESTAMP | Timestamp of account creation |
#### Favorites Table| Column Name | Data Type | Description |
| ----------- | --------- | --------------------------------- |
| id | ID (Primary Key) | Unique identifier for each seller |
| user_id | ID | User's ID |
| product_id | ID | Products's ID |
| created_at | TIMESTAMP | Timestamp of account creation |
#### Product Views Table| Column Name | Data Type | Description |
| ----------- | --------- | --------------------------------- |
| id | ID (Primary Key) | Unique identifier for each seller |
| user_id | ID | User's ID |
| product_id | ID | Products's ID |
| created_at | TIMESTAMP | Timestamp of account creation |### Contributing
Contributions are welcome! If you'd like to contribute to this project, please follow these guidelines:
```
1. Fork the repository.
2. Create a new branch for your feature or bug fix.
3. Make your changes and test thoroughly.
4. Commit your changes with clear commit messages.
5. Create a pull request against the main branch.
```## Disclaimer
This application is a personal project built with educational and learning purposes in mind. It is neither affiliated nor endorsed by Amazon in any way. While the app features product details and images inspired by Amazon, these are solely for demonstration purposes and may not represent actual products. All rights to these elements belong to their respective owners. We are using them for educational purposes only and have no intention of commercial exploitation.
Additionally, be aware that any attempts to place orders within this prototype are purely for testing purposes and will not result in actual product deliveries or charges in the real-world. This environment is designated exclusively for simulation and development purposes
## Contact
feel free to contact me!
## License
> You can check out the full license [here](https://github.com/swarajkumarsingh/olx-clone/blob/main/LICENSE)
This project is licensed under the terms of the **MIT** license