Skip to content

Commit

Permalink
chore(doc): update document
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH committed Dec 10, 2023
1 parent fa9a154 commit f72d9db
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 11 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@

[Demo](https://likit.zeabur.app)

English | [简体中文](./README.zh.md)

## What is Likit
Likit is a backend as a service for like(vote, unlike, count) feature. It is very ease to deploy and use.
Likit is a Backend as a Service for like(vote, unlike, count) feature. It is very ease to deploy and use.

The goal of Likit is help your implement like function within 10 minutes.

Likit is suites small and middle size application. You can select difference vote implement engine to get difference features and performance.
Likit is suitable for small and middle size application. You can select difference vote implement engine to get difference features and performance.

[Getting started](./docs/getting-started.md)

Expand Down
102 changes: 102 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<p align="center">
<img src="https://github.com/CorrectRoadH/Likit/blob/main/img/logo.png?raw=true" height="128"/></a>
</p>

# Likit

[Demo](https://likit.zeabur.app)

[English](./README.md) | 简体中文

## What is Likit
Likit 是一个 Backend as a Service ,提供点赞(投票、点赞、计数)功能。 部署和使用非常容易。

Likit的目标是帮助您在10分钟内实现类似的功能。

Likit 适用于中小型应用程序。 您可以选择差异投票工具引擎来获得不同的功能和性能。
[Getting started](./docs/getting-started.md)

| features | Simple Vote System | Middle Vote System(WIP) |
| -- | -- | -- |
| Vote || 🚧 |
| Unvote || 🚧 |
| Count || 🚧 |
| List the voted users || 🚧 |
| is Voted || 🚧 |
| vote events || 🚧 |
| message queue |||
| requires | redis | redis,postgres |

# Screenshots

![](./img/screenshot-1.png)
![](./img/screenshot-2.png)

# Deployment

## Zeabur
Deloyment on Zeabur by one click

[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/KZOLHA?referralCode=CorrectRoadH)

## Docker Compose
```
wget https://raw.githubusercontent.com/CorrectRoadH/Likit/main/docker-compose.yaml
docker compose up -d
```

## K8S
Coming soon

# Documentation
[Document](./docs/getting-started.md)

## RESTful API

### Vote
POST `http(s)://<your likit ip>/api/v1/vote`

body

```
{
"businessId": "businessId",
"messageId": "messageId",
"userId": "userId"
}
```

POST `http(s)://<your likit ip>/api/v1/unvote`

body

### Unvote
```
{
"businessId": "businessId",
"messageId": "messageId",
"userId": "userId"
}
```

### Count the number of votes
GET `http(s)://<your likit ip>/api/v1/count/:businessId/:messageId`

### List the users who voted
GET `http(s)://<your likit ip>/api/v1/list/:businessId/:messageId`

### Check if the user has voted
GET `http(s)://<your likit ip>/api/v1/isVoted/:businessId/:messageId/:userId`


## gRPC API
Coming soon

## SDK

### Golang
[Likit Go](https://github.com/CorrectRoadH/likit-go)

### Java
Coming soon
2 changes: 1 addition & 1 deletion dashboard/src/api/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const useDatabase = ()=> {
}

return {
database:data.dataSourceConfig||[],
database:data?.dataSourceConfig||[],
isLoading,
isError:error,
createDatabase,
Expand Down
27 changes: 19 additions & 8 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,34 @@
WIP

## Getting started
WIP
Likit is very easy to embed in your backend. You just need to deploy it and create the business Id for your business. Then you can use it in your backend.

### Deployment

#### zeabur
WIP
Deloyment on Zeabur by one click

[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/KZOLHA?referralCode=CorrectRoadH)


#### docker-compose
WIP
```
wget https://raw.githubusercontent.com/CorrectRoadH/Likit/main/docker-compose.yaml
docker compose up -d
```

### Create Business
1. create database connection if you want use extra database

Screenshots-1
![create extract database connect](./imgs/screenshot-1.png)

2. create business by click the button `Create Business` on the top right corner.
1. create business by click the button `Create Business` on the top right corner.

Screenshots-2
![create business](./imgs/screenshot-2.png)

Input the business title and id


### Implement the logic in your backend
Copy business id and use it in your backend.
Message id mean the id of object that be vote, The message id can be any string. It is decided by your business logic.
Expand All @@ -33,4 +41,7 @@ Message id mean the id of object that be vote, The message id can be any string.
WIP

#### RESTful API
WIP
WIP

#### gRPC
WIP
Binary file added docs/imgs/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f72d9db

Please sign in to comment.