🔥An artistic "twitter like" community built on gin+zinc+vue+ts 清新文艺微社区
LoggerOpenObserve
feature use OpenObserve to collect log.#370LoggerOpenObserve
to conf.yaml
's Features
section to enable this feature like below:
# file config.yaml
...
Features:
Default: ["Base", "Postgres", "Meili", "LocalOSS", "LoggerOpenObserve", "BigCacheIndex", "web"]
LoggerOpenObserve: # 使用OpenObserve写日志
Host: 127.0.0.1:5080
Organization: paopao-ce
Stream: default
User: [email protected]
Password: tiFEI8UeJWuYA7kN
Secure: False
MinWorker: 5 # 最小后台工作者, 设置范围[5, 100], 默认5
MaxLogBuffer: 100 # 最大log缓存条数, 设置范围[10, 10000], 默认100
...
Friendship
feature support. To custom setup Friendship
use below configure in web/.env
or web/.env.local
# 功能特性开启
VITE_USE_FRIENDSHIP=true
# 模块开启
VITE_ENABLE_FRIENDS_BAR=true
scripts/migration/**/*_home_timeline.up.sql
):CREATE TABLE `p_post_metric` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`post_id` bigint unsigned NOT NULL,
`rank_score` bigint unsigned NOT NULL DEFAULT 0,
`incentive_score` int unsigned NOT NULL DEFAULT 0,
`decay_factor` int unsigned NOT NULL DEFAULT 0,
`motivation_factor` int unsigned NOT NULL DEFAULT 0,
`is_del` tinyint NOT NULL DEFAULT 0, -- 是否删除, 0否, 1是
`created_on` bigint unsigned NOT NULL DEFAULT '0',
`modified_on` bigint unsigned NOT NULL DEFAULT '0',
`deleted_on` bigint unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_post_metric_post_id_rank_score` (`post_id`,`rank_score`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO p_post_metric (post_id, rank_score, created_on)
SELECT id AS post_id,
comment_count + upvote_count*2 + collection_count*4 AS rank_score,
created_on
FROM p_post
WHERE is_del=0;
-- 原来的可见性: 0公开 1私密 2好友可见 3关注可见
-- 现在的可见性: 0私密 10充电可见 20订阅可见 30保留 40保留 50好友可见 60关注可见 70保留 80保留 90公开
UPDATE p_post a, p_post b
SET a.visibility = (
CASE b.visibility
WHEN 0 THEN 90
WHEN 1 THEN 0
WHEN 2 THEN 50
WHEN 3 THEN 60
ELSE 0
END
)
WHERE a.ID = b.ID;
备注:发布版本中,使用如下命令构建paopao-ce: (go version go1.21.1 darwin/amd64)
./build-release.sh && ./build-image.sh
发布的二进制文件中只测试了paopao-ce-darwin_amd64,其余平台的未亲测,如有问题,请使用源码在自己平台下自行构建。
您可以使用如下命令启动一个测试实例尝鲜:
docker compose up -d
# visit http://localhost:8008 👀 paopao-ce
# visit http://localhost:8001 👀 RedisInsight
# visit http://localhost:8080 👀 phpMyAdmin
备注:发布版本中,使用如下命令构建paopao-ce: (go version go1.21.0 darwin/amd64)
./build-release.sh && ./build-image.sh
发布的二进制文件中只测试了paopao-ce-darwin_amd64,其余平台的未亲测,如有问题,请使用源码在自己平台下自行构建。
您可以使用如下命令启动一个测试实例尝鲜:
docker compose up -d
# visit http://localhost:8008 👀 paopao-ce
# visit http://localhost:8001 👀 RedisInsight
# visit http://localhost:8080 👀 phpMyAdmin
备注:发布版本中,使用如下命令构建paopao-ce: (go version go1.21.0 darwin/amd64)
./build-release.sh && ./build-image.sh
发布的二进制文件中只测试了paopao-ce-darwin_amd64,其余平台的未亲测,如有问题,请使用源码在自己平台下自行构建。
您可以使用如下命令启动一个测试实例尝鲜:
docker compose up -d
# visit http://localhost:8008 👀 paopao-ce
# visit http://localhost:8001 👀 RedisInsight
# visit http://localhost:8080 👀 phpMyAdmin
The source code is in r/paopao-ce-plus branch.
备注:发布版本中,使用如下命令构建paopao-ce: (go version go1.21.0 darwin/amd64)
./build-release.sh && ./build-image.sh
发布的二进制文件中只测试了paopao-ce-darwin_amd64,其余平台的未亲测,如有问题,请使用源码在自己平台下自行构建。
您可以使用如下命令启动一个测试实例尝鲜:
docker compose up -d
# visit http://localhost:8008 👀 paopao-ce
# visit http://localhost:8001 👀 RedisInsight
# visit http://localhost:8080 👀 phpMyAdmin
pprof
feature support #327
scripts/migration/**/*_create_view_post_filter.up.sql
):
CREATE VIEW p_post_by_media AS SELECT post.*FROM (SELECT DISTINCT post_id FROM p_post_content WHERE (TYPE=3 OR TYPE=4 OR TYPE=7 OR TYPE=8) AND is_del=0) media JOIN p_post post ON media.post_id=post.ID WHERE post.is_del=0;
CREATE VIEW p_post_by_comment AS SELECT P.*,C.user_id comment_user_id FROM (SELECT post_id,user_id FROM p_comment WHERE is_del=0 UNION SELECT post_id,reply.user_id user_id FROM p_comment_reply reply JOIN p_comment COMMENT ON reply.comment_id=COMMENT.ID WHERE reply.is_del=0 AND COMMENT.is_del=0) C JOIN p_post P ON C.post_id=P.ID WHERE P.is_del=0;
Followship
feature . #355
migration database first(sql ddl file in scripts/migration/**/*_user_following.up.sql
):
DROP TABLE IF EXISTS p_following;
CREATE TABLE p_following (ID BIGSERIAL PRIMARY KEY,user_id BIGINT NOT NULL,follow_id BIGINT NOT NULL,is_del SMALLINT NOT NULL DEFAULT 0,created_on BIGINT NOT NULL DEFAULT 0,modified_on BIGINT NOT NULL DEFAULT 0,deleted_on BIGINT NOT NULL DEFAULT 0);
CREATE INDEX idx_following_user_follow ON p_following USING btree (user_id,follow_id);
# embed web ui to execute file default
make build
# use slim model to disable embed web ui to exectute file
make build TAGS='slim embed'
Friendship
feature and Followship
feature as builtin feature. #362
Lightship
feature. #362
备注:发布版本中,使用如下命令构建paopao-ce: (go version go1.21.0 darwin/amd64)
./build-release.sh && ./build-image.sh
发布的二进制文件中只测试了paopao-ce-darwin_amd64,其余平台的未亲测,如有问题,请使用源码在自己平台下自行构建。
您可以使用如下命令启动一个测试实例尝鲜:
docker compose up -d
# visit http://localhost:8008 👀 paopao-ce
# visit http://localhost:8001 👀 RedisInsight
# visit http://localhost:8080 👀 phpMyAdmin
pprof
feature support #327
scripts/migration/**/*_create_view_post_filter.up.sql
):
CREATE VIEW p_post_by_media AS SELECT post.*FROM (SELECT DISTINCT post_id FROM p_post_content WHERE (TYPE=3 OR TYPE=4 OR TYPE=7 OR TYPE=8) AND is_del=0) media JOIN p_post post ON media.post_id=post.ID WHERE post.is_del=0;
CREATE VIEW p_post_by_comment AS SELECT P.*,C.user_id comment_user_id FROM (SELECT post_id,user_id FROM p_comment WHERE is_del=0 UNION SELECT post_id,reply.user_id user_id FROM p_comment_reply reply JOIN p_comment COMMENT ON reply.comment_id=COMMENT.ID WHERE reply.is_del=0 AND COMMENT.is_del=0) C JOIN p_post P ON C.post_id=P.ID WHERE P.is_del=0;
Friendship
feature . #355
migration database first(sql ddl file in scripts/migration/**/*_user_following.up.sql
):
DROP TABLE IF EXISTS p_following;
CREATE TABLE p_following (ID BIGSERIAL PRIMARY KEY,user_id BIGINT NOT NULL,follow_id BIGINT NOT NULL,is_del SMALLINT NOT NULL DEFAULT 0,created_on BIGINT NOT NULL DEFAULT 0,modified_on BIGINT NOT NULL DEFAULT 0,deleted_on BIGINT NOT NULL DEFAULT 0);
CREATE INDEX idx_following_user_follow ON p_following USING btree (user_id,follow_id);
# embed web ui to execute file default
make build
# use slim model to disable embed web ui to exectute file
make build TAGS='slim embed'
Friendship
feature and Followship
feature as builtin feature. #362
Lightship
feature. #362
备注:发布版本中,使用如下命令构建paopao-ce: (go version go1.21.0 darwin/amd64)
./build-release.sh && ./build-image.sh
发布的二进制文件中只测试了paopao-ce-darwin_amd64,其余平台的未亲测,如有问题,请使用源码在自己平台下自行构建。
您可以使用如下命令启动一个测试实例尝鲜:
docker compose up -d
# visit http://localhost:8008 👀 paopao-ce
# visit http://localhost:8001 👀 RedisInsight
# visit http://localhost:8080 👀 phpMyAdmin
pprof
feature support #327
scripts/migration/**/*_create_view_post_filter.up.sql
):
CREATE VIEW p_post_by_media AS SELECT post.*FROM (SELECT DISTINCT post_id FROM p_post_content WHERE (TYPE=3 OR TYPE=4 OR TYPE=7 OR TYPE=8) AND is_del=0) media JOIN p_post post ON media.post_id=post.ID WHERE post.is_del=0;
CREATE VIEW p_post_by_comment AS SELECT P.*,C.user_id comment_user_id FROM (SELECT post_id,user_id FROM p_comment WHERE is_del=0 UNION SELECT post_id,reply.user_id user_id FROM p_comment_reply reply JOIN p_comment COMMENT ON reply.comment_id=COMMENT.ID WHERE reply.is_del=0 AND COMMENT.is_del=0) C JOIN p_post P ON C.post_id=P.ID WHERE P.is_del=0;
Friendship
feature . #355
migration database first(sql ddl file in scripts/migration/**/*_user_following.up.sql
):
DROP TABLE IF EXISTS p_following;
CREATE TABLE p_following (ID BIGSERIAL PRIMARY KEY,user_id BIGINT NOT NULL,follow_id BIGINT NOT NULL,is_del SMALLINT NOT NULL DEFAULT 0,created_on BIGINT NOT NULL DEFAULT 0,modified_on BIGINT NOT NULL DEFAULT 0,deleted_on BIGINT NOT NULL DEFAULT 0);
CREATE INDEX idx_following_user_follow ON p_following USING btree (user_id,follow_id);
# embed web ui to execute file default
make build
# use slim model to disable embed web ui to exectute file
make build TAGS='slim embed'
Friendship
feature and Followship
feature as builtin feature. #362
Lightship
feature. #362
备注:发布版本中,使用如下命令构建paopao-ce: (go version go1.21.0 darwin/amd64)
./build-release.sh && ./build-image.sh
发布的二进制文件中只测试了paopao-ce-darwin_amd64,其余平台的未亲测,如有问题,请使用源码在自己平台下自行构建。
您可以使用如下命令启动一个测试实例尝鲜:
docker compose up -d
# visit http://localhost:8008 👀 paopao-ce
# visit http://localhost:8001 👀 RedisInsight
# visit http://localhost:8080 👀 phpMyAdmin
Friendship
feature and Followship
feature as builtin feature. #362
Lightship
feature. #362
备注:发布版本中,使用如下命令构建paopao-ce: (go version go1.21.0 darwin/amd64)
./build-release.sh && ./build-image.sh
发布的二进制文件中只测试了paopao-ce-darwin_amd64,其余平台的未亲测,如有问题,请使用源码在自己平台下自行构建。
您可以使用如下命令启动一个测试实例尝鲜:
docker compose up -d
# visit http://localhost:8008 👀 paopao-ce
# visit http://localhost:8001 👀 RedisInsight
# visit http://localhost:8080 👀 phpMyAdmin
Friendship
feature . #355
mirgration database first(sql ddl file in scripts/migration/**/*_user_following.up.sql
):
DROP TABLE IF EXISTS p_following;
CREATE TABLE p_following (ID BIGSERIAL PRIMARY KEY,user_id BIGINT NOT NULL,follow_id BIGINT NOT NULL,is_del SMALLINT NOT NULL DEFAULT 0,created_on BIGINT NOT NULL DEFAULT 0,modified_on BIGINT NOT NULL DEFAULT 0,deleted_on BIGINT NOT NULL DEFAULT 0);
CREATE INDEX idx_following_user_follow ON p_following USING btree (user_id,follow_id);
custom set config.yaml in Features
section add Followship
to enable Followship feature:
...
# add Followship to enable this feature
Features:
Default: ["Meili", "LoggerMeili", "Base", "Sqlite3", "BigCacheIndex", "MinIO", "Followship"]
Base: ["Redis", "PhoneBind"]
...
备注:发布版本中,使用如下命令构建paopao-ce: (go version go1.21.0 darwin/amd64)
./build-release.sh && ./build-image.sh
发布的二进制文件中只测试了paopao-ce-darwin_amd64,其余平台的未亲测,如有问题,请使用源码在自己平台下自行构建。
您可以使用如下命令启动一个测试实例尝鲜:
docker compose up -d
# visit http://localhost:8008 👀 paopao-ce
# visit http://localhost:8001 👀 RedisInsight
# visit http://localhost:8080 👀 phpMyAdmin
# embed web ui to execute file default
make build
# use slim model to disable embed web ui to exectute file
make build TAGS='slim embed'
备注:发布版本中,使用如下命令构建paopao-ce: (go version go1.21.0 darwin/amd64)
./build-release.sh && ./build-image.sh
发布的二进制文件中只测试了paopao-ce-darwin_amd64,其余平台的未亲测,如有问题,请使用源码在自己平台下自行构建。
您可以使用如下命令启动一个测试实例尝鲜:
docker compose up -d
# visit http://localhost:8008 👀 paopao-ce
# visit http://localhost:8001 👀 RedisInsight
# visit http://localhost:8080 👀 phpMyAdmin